ZFS root partition referring to volumes without using vdevs

swimboy

Member
Mar 29, 2015
14
0
21
I've set up a new instance of Proxmox VE 3.4 using a RAID 1 ZFS volume for the root partition. When I use "zpool status" to look at the status of rpool, it shows that the two member volumes are sda3 and sdb3.

I was under the impression that one shouldn't refer to volumes directly, since the letters can change with the addition or deletion of other drives, and that vdevs should be used. I've created vdevs for sda and sdb but can't figure out how to re-configure the pool to use them.

Ordinarily, one could run the following commands:

sudo zpool export rpool
sudo zpool import -d /dev/disk/by-vdev rpool

and the pool would refer to the volumes by their vdevs. Unfortunately, since this is the root partition, it can't be exported. Is there any other way to fix this?
 
Theoretically you can edit grub boot script to change import method. But does it give you any advantage ? I think ZFS is not so stupid and can import pool in anyway. Like I use USB flash drive for my desktop PC with ubuntu. Upgrading ZFS was changes with GRUB and it started to not import pool. Grub starts busybox and I import or re-import pool manually and continue start OS, but its only my problem. As for you, you can changes HDD sata ports and ZFS dont care about it.

I have 1 SSD for OS and 5 HDD for 2 pools. One time I plugged HDD over USB and all sdx had changed after reboot. ZFS dont care it. And I forget to do anything because ZFS did everything for me.

Another way to try is to boot with life cd and tro to import manually zpool import -d /dev/disk/by-vdev rpool
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!