← Back to team overview

kernel-packages team mailing list archive

[Bug 1571241] Re: ZFS initrd script does not import zpool using /dev/disk/by-id device paths

 

@svde-tech: Can you please test from this PPA:
https://launchpad.net/~rlaager/+archive/ubuntu/zfs

Here's what I think should happen. Right now, you're seeing /dev/sdX
names. If you reboot with this package, you'll still see /dev/sdX names.
Reboot again and edit your GRUB command line (at boot, not permanently)
and change the pool name to be wrong. When the initrd fails to import
it, import it manually with: zpool import -d /dev/disk/by-id -f -R / -N
POOLNAME Then export it with: zpool export POOLNAME Finally: reboot At
that point, the system should come up normally.

I tested this and it works for me.

If you do test from my PPA, please remove it from your APT sources when
you're done testing. I don't want some future experiment I upload to
break your system.

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to zfs-linux in Ubuntu.
https://bugs.launchpad.net/bugs/1571241

Title:
  ZFS initrd script does not import zpool using /dev/disk/by-id device
  paths

Status in zfs-linux package in Ubuntu:
  Confirmed

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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/zfs-linux/+bug/1571241/+subscriptions