I have created a raidz2 pool consisting of 8 physical drives using device files /dev/sda through /dev/sdh and I then exported and reimported the pool to convert the pool to using disk serials instead of device files.
root@fs:/home/ubuntu# zpool create pool1 raidz2 /dev/sda /dev/sdb /dev/sdc /dev/sdd /dev/sde /dev/sdf /dev/sdg /dev/sdh
root@fs:/home/ubuntu# zpool export pool1
root@fs:/home/ubuntu# zpool import -d /dev/disk/by-serial/ pool1
I'm new to ZFS, so I've played around with creating and destroying test pools a few times on this system. I used to be able to do the export/import to convert to disk serials such that after the zpool import -d, doing zpool status pool1 displayed pool1 with the appropriate disk serials instead of device file names.
At some point, possibly due to configurations getting messed up, after creating the pool from scratch and exporting, I now get a message: "cannot import 'pool1': no such pool available"
I have tried:
- destroying pool1, doing a "wipefs -a" on the constituent drives, and then recreating the pool from scratch, and then exporting/reimporting the pool to convert to disk serials. Each time through the destroy/create/export/import cycle, the import to convert disk serials results in the same "cannot import 'pool1': no such pool available" error.
- thinking that a configuration file somewhere got messed up, I have purged and reinstalled the zfsutils-linux package. Recreating the pool from scratch and exporting and reimporting as before still results in the "cannot import 'pool1': no such pool available" error.
Here's what my /dev/disk/by-serial/ directory looks like:
root@fs:/home/ubuntu# ls -l /dev/disk/by-serial/
total 0
lrwxrwxrwx 1 root root 9 Jun 8 07:42 WD-C80J0VVG -> ../../sdg
lrwxrwxrwx 1 root root 9 Jun 8 07:42 WD-C80JB4KG -> ../../sda
lrwxrwxrwx 1 root root 9 Jun 8 07:42 WD-C80JEAHG -> ../../sdh
lrwxrwxrwx 1 root root 9 Jun 8 07:42 WD-C80JLDTG -> ../../sdf
lrwxrwxrwx 1 root root 9 Jun 8 07:42 WD-C80JLDXG -> ../../sdb
lrwxrwxrwx 1 root root 9 Jun 8 07:42 WD-C80JT3WG -> ../../sdd
lrwxrwxrwx 1 root root 9 Jun 8 07:42 WD-C80JT4SG -> ../../sdc
lrwxrwxrwx 1 root root 9 Jun 8 07:42 WD-C80JWWGG -> ../../sde
Why isn't exporting/reimporting working as expected to convert to disk serials anymore?
I'm running Ubuntu 20.04.