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)
Wed, Dec 11, 3:49 PM
Unknown Object (File)
Wed, Dec 11, 9:52 AM
Unknown Object (File)
Oct 22 2024, 4:23 AM
Unknown Object (File)
Sep 27 2024, 9:23 AM
Unknown Object (File)
Sep 26 2024, 11:01 AM
Unknown Object (File)
Sep 24 2024, 9:05 AM
Unknown Object (File)
Sep 23 2024, 7:26 PM
Unknown Object (File)
Sep 23 2024, 1:26 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.