ZFS: inherited mountpoints with root filesystem

Barry Pederson bp at barryp.org
Thu Apr 26 20:52:11 UTC 2007


Pawel Jakub Dawidek wrote:
> On Wed, Apr 25, 2007 at 09:29:47AM -0500, Barry Pederson wrote:
>> Is this double-mountpoint setup the way things should be?  If so, is/can there be an option to have the ZFS-mountpoint for a root-mounted filesystem also be "/", so that 
>> inherited mountpoints for sub-filesystems are under "/" instead of "/<pool-name>"?
> 
> For file systems that are mounted not via 'zfs mount -a' (eg. they are
> mounted by hand or via /etc/fstab), you should set mountpoint property
> to 'legacy'.

So you're saying that if you're doing vfs.root.mountfrom="zfs:tank" in 
loader.conf, then tank's mountpoint should be "legacy"?

I'm trying that now, but the drawback there is that the sub-filesystems 
like "tank/home" also inherit that "legacy" mountpoint, so they have to 
be manually listed in /etc/fstab.  That seems to carry on down to 
sub-sub filesystems like "tank/home/bob" and so on.  So you lose out on 
the nice auto-mounting feature in ZFS.

I was hoping that booting with vfs.root.mountfrom="zfs:tank" would be 
equivalent to something like:

	zpool import -R /

I wonder now if it wouldn't have been better to have created the pool as 
an Alternate Root Pool in the first place.

Is there a way to change an existing pool's mountpoint to '/' like an 
Alternate Root pool?  A simple "zfs set mountpoint=/" doesn't fly 
because it wants to unmount root to do it.  I'd kind of need to change 
it, but not have it take effect immediately.

	Barry


More information about the freebsd-fs mailing list