Page MenuHomeFreeBSD

Fix "mount -a" for NFS and ZFS filesystems with shared mountpoints
ClosedPublic

Authored by asomers on Dec 15 2015, 12:41 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Oct 11, 3:19 AM
Unknown Object (File)
Thu, Oct 9, 1:39 PM
Unknown Object (File)
Wed, Oct 1, 7:05 PM
Unknown Object (File)
Tue, Sep 30, 8:43 PM
Unknown Object (File)
Sun, Sep 28, 8:06 PM
Unknown Object (File)
Wed, Sep 24, 7:42 AM
Unknown Object (File)
Sep 12 2025, 2:48 AM
Unknown Object (File)
Jul 30 2025, 2:36 AM
Subscribers

Details

Summary

sbin/mount.c
Check whether an fstab entry has the same fstype as a mounted
filesystem before declaring it to be mounted. This will allow NFS
filesystems that share a mountpoint with a local filesystem to be
automatically mounted at boot.

This is not such an unusual situation. For example, if somebody uses the
standard installer with a ZFS root, he'll get a /usr/home filesystem, even
though he may choose to mount /usr/home over NFS.

Test Plan
  1. Create a ZFS or UFS filesystem with mountpoint set to /usr/home
  2. Add an NFS entry for /usr/home to /etc/fstab. Don't mount it.
  3. Run "mount -d -a -t nfs". It should print the entry from step 2
  4. Mount /usr/home
  5. Run "mount -d -a -t nfs". It should print nothing.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

asomers retitled this revision from to Fix "mount -a" for NFS and ZFS filesystems with shared mountpoints.
asomers updated this object.
asomers edited the test plan for this revision. (Show Details)
asomers added a reviewer: trasz.
asomers added a subscriber: allanjude.
trasz edited edge metadata.
This revision is now accepted and ready to land.Dec 21 2015, 10:10 PM
This revision was automatically updated to reflect the committed changes.