turning off ZFS mountpoint property behavior?

James R. Van Artsdalen james-freebsd-fs2 at jrv.org
Sat Apr 11 20:52:07 PDT 2009


Is there a knob to turn off ZFS's mounting of filesystems based on the
mountpoint property?  It is most unhelpful when receiving replicas of
filesystems to have a received snapshot suddenly mounted over /usr.

I have two systems "prime" and "subprime", both of which have a large
ZFS pool and a small UFS partition for maintenance.  They are
essentially the same except that /boot/loader.conf boots one into ZFS
and the other into UFS.

"prime" is the operational server using ZFS.  "subprime" is essentially
a hot spare booting UFS whose ZFS pool is to be kept in sync with the
pool on "prime" sync zfs send/recv replication.  Should the pool on
"prime" fail, /boot/load.conf on "subprime" can be changed to boot its
ZFS pool and the server is quickly available again, at the last snapshot
replicated.

Unfortunately when zfs recv runs and it receive a filesystem with
property mountpoint=/usr it mounts that filesystem there.  That's not
desirable in my situation nor I suspect many others.

Is there a sysctl or some other way to disable the automatic mount behavior?


More information about the freebsd-fs mailing list