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
F170721526: D4556.id11257.diff
Sun, Sep 6, 5:26 AM
F170709378: D4556.id11257.diff
Sun, Sep 6, 3:39 AM
F170697820: D4556.id11537.diff
Sun, Sep 6, 2:12 AM
F170649683: D4556.id.diff
Sat, Sep 5, 7:44 PM
F170598078: D4556.diff
Sat, Sep 5, 2:08 PM
F170590578: D4556.diff
Sat, Sep 5, 1:22 PM
F170565581: D4556.id.diff
Sat, Sep 5, 10:48 AM
Unknown Object (File)
Wed, Sep 2, 9:22 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.