So I did some replacement and upgrades of drives on a PVE node using ZFS and some hot swap enclosures. Everything went fine until the next reboot. Suddendly the zfs pool was degraded. The problem was some drives changing names in the form /dev/sda and so on. That's because I left a "hole" and I had like sda, sdb and sdd but on reboot they became sda, sdb and sdc. ZFS won't accept the change.
So after some digging I found out that the recommended way to name devices is using /dev/by-id so I uncommented the ZPOOL_IMPORT_PATH="/dev/disk/by-vdev:/dev/disk/by-id" line from /etc/default/zfs and did an export/import. Indeed now the zpool looks like this.
Which I guess is more robust but those identifiers are pretty hard to correlate to drives so I would prefer to use the ata-* variants like
What's your recommendation? Is it possible to force the usage of the make-model-serial string?
So after some digging I found out that the recommended way to name devices is using /dev/by-id so I uncommented the ZPOOL_IMPORT_PATH="/dev/disk/by-vdev:/dev/disk/by-id" line from /etc/default/zfs and did an export/import. Indeed now the zpool looks like this.
Code:
pool: pool1
state: ONLINE
scan: scrub repaired 0B in 0 days 11:46:23 with 0 errors on Wed Jan 22 00:32:01 2020
config:
NAME STATE READ WRITE CKSUM
pool1 ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
wwn-0x500003992bb007f4 ONLINE 0 0 0
wwn-0x50000399ac602417 ONLINE 0 0 0
mirror-1 ONLINE 0 0 0
wwn-0x5000c500a4cd8267 ONLINE 0 0 0
wwn-0x500003993b7003b0 ONLINE 0 0 0
mirror-2 ONLINE 0 0 0
wwn-0x500003992bd8088d ONLINE 0 0 0
wwn-0x500003992ba00c20 ONLINE 0 0 0
Which I guess is more robust but those identifiers are pretty hard to correlate to drives so I would prefer to use the ata-* variants like
ata-ST6000VN0041-ABC123_ZXYA1B2
. But somehow this WWN identifiers have more priority.What's your recommendation? Is it possible to force the usage of the make-model-serial string?