few ideas for zfsloader

Andriy Gapon avg at icyb.net.ua
Tue Mar 16 19:07:16 UTC 2010


I have three crazy-ish ideas for zfsloader.
Unfortunately, right now I am short on time and I am very short on ZFS knowledge
to go for implementing them myself.

1. If vfs.root.mountfrom is not already set and there is no root mount entry in
fstab then set vfs.root.mountfrom to "zfs:<current-dataset>".
This obviously requires being able to get properties of the current dataset
(filesystem) and get the name from them.

2. Currently nextboot functionality doesn't work properly with ZFS because there
is no RW support in zfsloader.  Adding that support seems to be quite hard given
the transactional nature of ZFS, checksums, compression and what not.
Here's an alternative idea: honor nextboot.conf only if boot filesystem has a a
special property set on it, for example org.freebsd:nextboot.
Then all we need is to flip the property off.
Although doing this is still not trivial it should be simpler than filesystem RW
support.

3. Currently ZFS boot chain lacks an ability to switch bootfs property of a pool.
So, if a (new) boot environment is not quite bootable and bootfs points to it,
then an alternative boot media (e.g. livecd) is needed to correct the situation.
Implementing selection of a boot filesystem in ZFS boot chain seems like a hard task.
Alternative idea: a new FreeBSD-specific pool property, nextbootfs.  This property
would designate a boot filesystem for the next boot and would be automatically
reset by a boot loader at sufficiently early stage.  If the next boot doesn't
succeed, then we are back to the regular bootfs property, if it does succeed, then
bootfs can be safely changed to the new value.


-- 
Andriy Gapon


More information about the freebsd-fs mailing list