Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Feb 2015 21:53:45 -0600
From:      John Goerzen <jgoerzen@complete.org>
To:        freebsd-questions@freebsd.org
Subject:   10.1 ZFS - why canmount=off for /usr and /var by default?
Message-ID:  <54E01849.3020500@complete.org>

next in thread | raw e-mail | index | archive | help
So this is a fresh 10.1-RELEASE install, with the guided/automatic ZFS
setup on a single hard disk.  Couldn't be simpler, right?  Except
something is odd with /usr and /var.  Consider:

# zfs list | egrep 'NAME|usr'
NAME                 USED  AVAIL  REFER  MOUNTPOINT
zroot/usr            607M   216G    96K  /usr
zroot/usr/home       180K   216G   180K  /usr/home
zroot/usr/ports      607M   216G   607M  /usr/ports
zroot/usr/src         96K   216G    96K  /usr/src

Now, I've installed 5GB of packages into /usr/local.  There's no way
/usr is only using 607M.  So I thought, hmm, maybe they're not being
mounted.  And indeed:

# zfs list -o name,mountpoint,canmount,mounted | egrep 'NAME|no'
NAME                MOUNTPOINT  CANMOUNT  MOUNTED
zroot               none              on       no
zroot/ROOT          none              on       no
zroot/usr           /usr             off       no
zroot/var           /var             off       no

And, of course:

# df -h /usr/local
Filesystem            Size    Used   Avail Capacity  Mounted on
zroot/ROOT/default    220G    4.5G    216G     2%    /

(I have compress=3Dlz4 set for everything)

So, the next question is: why?  Why is there a /usr and a /var, which
show up in zfs list with a mountpoint of /usr and /var, but which aren't
being mounted?  Why is canmount=3Doff for these?  And if canmount=3Doff, =
why
give it a mountpoint which looks rather misleading in a zfs list?

I promise to stop asking questions soon! :-)

Thanks,

John




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?54E01849.3020500>