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)
May 9 2024, 3:02 PM
Unknown Object (File)
Apr 29 2024, 3:40 PM
Unknown Object (File)
Apr 29 2024, 3:36 PM
Unknown Object (File)
Feb 21 2024, 3:39 AM
Unknown Object (File)
Feb 18 2024, 9:48 PM
Unknown Object (File)
Feb 15 2024, 11:18 PM
Unknown Object (File)
Feb 15 2024, 11:17 PM
Unknown Object (File)
Dec 20 2023, 3:01 PM
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.