AUTOFS (automount) and NFS server not playing together nicely

David Boyd David.Boyd49 at twc.com
Tue Apr 21 14:47:42 UTC 2015


At the risk of being dubbed insane, here goes:

On five FreeBSD 10.1-RELEASE-p9 production servers autofs(5) is enabled
and working as advertised.  On the same servers nfs v3 clients are also
fat, dumb and happy.

On a test server where autofs(5) is also enabled and working well, I am
testing nfs v3 (later v4) server. Strange things are happening.

When nfs mountd(8) is running, the autofs(5) auto-mount (via automountd)
function seems to work, but the autofs(5) auto-unmount (via
autounmountd) never occurs.

Without nfs mountd(8), when the filesystem /disc is auto-mounted (via
autoumountd), the mount(8) command shows status of (ufs, local,
journaled soft-updates, auto-mounted) for the auto-mounted filesystem
and after the autofs(5) timeout period (600 seconds) the filesystem is
auto-unmounted (via autounmountd). No problem.

With nfs mountd(8) the mount(8) command shows (ufs, local, journaled
soft-updates).  The auto-mounted filesystem is never (a long, long time)
unmounted. Big problem.

Without nfs mountd(8) running, the mount(8) command "mount -o
automounted /dev/ada0p8 /disc" mounts the filesystem and the mount(8)
command shows (ufs, local, journaled soft-updates, automounted) for the
manually mounted filesystem and after the autofs(5) timeout period (600
seconds) the filesystem is auto-unmounted even though it was not mounted
automatically.  No problem.

With nfs mountd(8), the mount(8) command "mount -o
automounted /dev/ada0p8 /disc" mounts the filesystem but the mount(8)
command shows (ufs, local, journaled soft-updates) and after the timeout
period (600 seconds) the filesystem is remains mounted.  Big problem.

It appears that nfs mountd(8) is interferring with the mount(8)
command's -o option processing but admittedly that is just a very weak
SWAG.

I have adequate hardware (real and virtual) to do any testing that may
be suggested.  Most days there is no time constraint either.

--------------------------------------------------------
The /etc/auto_master file is two lines:

1:/net	-hosts	-nobrowse,nosuid            (original)

2:/-	/etc/autofs/auto_disc

--------------------------------------------------------
The /etc/autofs/auto_disc file is one line:

1:/disc	-fstype=ufs	:/dev/ada0p8

--------------------------------------------------------

Once again, everything works well when nfs mountd(8) is not present in
the system.

Thanks for any assistance that you may be able to supply.

David Boyd.









More information about the freebsd-stable mailing list