Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Apr 2007 15:52:05 -0500
From:      Barry Pederson <bp@barryp.org>
To:        Pawel Jakub Dawidek <pjd@FreeBSD.org>
Cc:        freebsd-fs@FreeBSD.org
Subject:   Re: ZFS: inherited mountpoints with root filesystem
Message-ID:  <463110F5.1090102@barryp.org>
In-Reply-To: <20070426170824.GO41670@garage.freebsd.pl>
References:  <462F65DB.5010305@barryp.org> <20070426170824.GO41670@garage.freebsd.pl>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?463110F5.1090102>