On my bionic test VM, non-root pools import using whatever name I created them with. If I use /dev, they import later with /dev. If I use /dev/disk/by-id, they import later with /dev/disk/by-id. This is true immediately, and true across reboots.
Root pools seem to behave the same way. My root pool was created using /dev/disk/by-id per the HOWTO (which I maintain) and is being imported with /dev/disk/by-id. This is with no zpool.cache, either on the live system or in the initramfs (which I unpacked to verify).
In other words, I cannot reproduce this on bionic. I'm pretty confident this is an issue on Xenial, though I haven't re-tested just now to absolutely confirm. But I will say that on my Xenial laptop at the moment, my root pool is imported with a /dev name.
In short, I think this is fixed in Bionic, but I'm not 100% sure which code changed to fix it.
I haven't had a chance to write and test the zpool.cache copying. I keep meaning to get to it every day, but pushing it back for lack of time.
The zfs-initramfs script in 16.04 (always) and in 18.04 (by default) runs a plain `zpool import`.
ZoL 0.7.5 has a default search order for imports that prefers /dev/disk/by-id: /github. com/zfsonlinux/ zfs/blob/ zfs-0.7. 5/lib/libzfs/ libzfs_ import. c#L1835
https:/
That said, so did ZoL on Xenial (0.6.5.6).
On my bionic test VM, non-root pools import using whatever name I created them with. If I use /dev, they import later with /dev. If I use /dev/disk/by-id, they import later with /dev/disk/by-id. This is true immediately, and true across reboots.
Root pools seem to behave the same way. My root pool was created using /dev/disk/by-id per the HOWTO (which I maintain) and is being imported with /dev/disk/by-id. This is with no zpool.cache, either on the live system or in the initramfs (which I unpacked to verify).
In other words, I cannot reproduce this on bionic. I'm pretty confident this is an issue on Xenial, though I haven't re-tested just now to absolutely confirm. But I will say that on my Xenial laptop at the moment, my root pool is imported with a /dev name.
In short, I think this is fixed in Bionic, but I'm not 100% sure which code changed to fix it.