ZFS initrd script does not import zpool using /dev/disk/by-id device paths
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
zfs-linux (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Xenial |
Fix Released
|
Undecided
|
Unassigned | ||
Yakkety |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Ubuntu 16.04 includes initrd zfs support, but the provided script does not allow zpools to be imported using the /dev/disk/by-id paths. As a result, the pool will be imported using "/dev/sdX" device names, which is not the preferred way.
Tested and validated solution/proof of concept:
- extract system generated initrd
- edit scripts/zfs file: replace "zpool import -o readonly=on -N" with "zpool import -o readonly=on -d /dev/disk/by-id -N"
- manually generate initrd using the altered script (using cpio)
- replace system generated initrd with altered one
I'd suggest adding a variable to /etc/default/zfs that would be reflected in the initrd zfs script, but perhaps the ZoL folks are better suited to give advice on this.
Changed in zfs-linux (Ubuntu): | |
status: | Confirmed → Fix Released |
Changed in zfs-linux (Ubuntu Xenial): | |
status: | New → Confirmed |
Changed in zfs-linux (Ubuntu Xenial): | |
status: | Confirmed → Fix Released |
I'm away from my computer at the moment, or I'd test more myself. Did you initially have the pool imported using the by-id names? Is the problem that the initrd needs a zpool.cache file?