Ok, pinned it down.

The problem appears to be very simple: when using rootdelay, the
zfs_test_import() function is called which tries to do a readonly "zpool
import" immediately followed by exporting the pool. This import/export
sequence goes to fast for my system (which indeed has low specs).

So: the export fails with a generic "dataset is busy" message. The zpool
health status is "ONLINE" prior to the export. A delay of merely 5
seconds before exporting in zfs_test_import() fixes the issue in my
case. The "delay", "ZFS_RPOOL", "ZFS_BOOTFS" and "retry_nr" were all set
correctly on each iteration.

I see 2 possible angles to this:
- The pool returns status "ONLINE" but does not accept certain commands. Is the 
pool status wrong, or the interpretation of the "ONLINE" status? Quite 
important when relying on this in scripts.
- Should we not check if the zpool export goes bad in the init script or at 
least give it a bit more time, especially since the rootdelay parameter is 
already used on systems that are expected to require longer initialization 
times ? 

The second one is the short term option I guess.

I now boot without the rootdelay parameter as it was a leftover
configuration I had forgotten about, but I'd be happy to test any new
versions of the script as I can reproduce this quite easily.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1577057

Title:
  zfs initrd script fails when rootdelay boot option is set

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

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to