ZFS: inherited mountpoints with root filesystem

Pawel Jakub Dawidek pjd at FreeBSD.org
Thu Apr 26 17:08:53 UTC 2007


On Wed, Apr 25, 2007 at 09:29:47AM -0500, Barry Pederson wrote:
> I've been fooling with using ZFS for the root filesystem, and a CompactFlash device to hold a UFS /boot  -  It seems to work very well, CF devices are big enough that you 
> can put a pretty full install of FreeBSD on it which is nice for recovery/maintenance work on the real disk.
> 
> One problem I've noticed though is that there's a difference between the mountpoint of a pool's root filesystem that FreeBSD sees and what ZFS sees.  For example, the 
> "mount" command shows"
> 
> 	tank on / (zfs, local)
> 
> but "zfs list" shows:
> 
> 	NAME      USED  AVAIL  REFER  MOUNTPOINT
> 	tank     1.98G  16.4G  16.7M  /tank
> 
> I'm finding that having the "tank" filesystem be "/" and "/tank" simultaneously makes it awkward when creating sub-filesystems, say for example "tank/usr" and "tank/var".
> 
> Currently, they inherit the "/tank" mountpoint, and show up as "/tank/usr" and "/tank/var" - where I'd like them to inherit "/" and end up as "/usr" and "/var".
> 
> For now, I've worked around this with symlinks in the "tank" filesystem like: usr -> tank/usr , but the problem is that when mounting the CompactFlash as root and importing 
> "tank", it complains that it can't mount "tank/usr" (because the symlink is in the way).
> 
> I've also tried explicity setting the mountpoint for "tank/usr" to "/usr", which is fine except again for when the CF is used as root, which would then conflict with the CF 
> filesystem's "/usr"
> 
> 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'.

-- 
Pawel Jakub Dawidek                       http://www.wheel.pl
pjd at FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20070426/5d3dbca3/attachment.pgp


More information about the freebsd-fs mailing list