Using vfs.mountroot.timeout for ZFS root pools as well

Fabian Keil freebsd-listen at fabiankeil.de
Thu Mar 19 11:15:19 UTC 2015


On some of my systems booting FreeBSD (and thus ElectroBSD) from a
(geli-encrypted) ZFS rootpool on an USB device does not work without
user interaction because kernel_mount() is called before the USB device
is detected.

The vfs.mountroot.timeout doesn't help because it is ignored for ZFS.

This can be changed without having to figure out the pool layout
by just calling kernel_mount() repeatedly:
https://www.fabiankeil.de/sourcecode/electrobsd/parse_mount-Use-vfs.mountroot.timeout-for-ZFS.diff

As an alternative the retrying could be delegated to kernel_mount().

Any comments on this?

Note that for the boot process on the affected system to work
(with user interaction or with the patch), spa_import_rootpool()
has to properly unlock spa_namespace_lock when failing:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=198563

Fabian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20150319/f45b195f/attachment.sig>


More information about the freebsd-fs mailing list