Bug #3324


Re: DragonFly automountd NFS mounting broken

Added by tkusumi over 1 year ago. Updated over 1 year ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:


Right now when I try using autofs to automount NFS shares it fails each
time with the same error. Can't tell when it was definitely working, but
that was more then a month ago:


Probably this has something to do with automountd indirect directories,
that's why direct mounts are not working.

I don't have any issue with automount with indirect map.

Also note that these intermediate directories in indirect map have nothing to do with autofs itself.
These are just regular directories in parent directory's filesystem.

# cat /etc/auto_master
# $FreeBSD$
# Automounter master map, see auto_master(5) for details.
#/net           -hosts          -nobrowse,nosuid,intr
# When using the -media special map, make sure to edit devd.conf(5)
# to move the call to "automount -c" out of the comments section.
#/media         -media          -nosuid,noatime
#/-             -noauto
/mnt/a/b/c/d/e          auto_nfs
# cat /etc/auto_nfs
NFS -intr,nfsv3
# automount -L
/mnt/a/b/c/d/e                                  auto_nfs             # indirect map referenced at /etc/auto_master:10
# mount | grep autofs
map auto_nfs on /mnt/a/b/c/d/e (autofs)
# mount | grep automounted
# tree /mnt/a > /dev/null    <------ this is where a/b/c/d/e are mkdir'ed before automount
# mount | grep automounted on /mnt/a/b/c/d/e/NFS (nfs, automounted)
Actions #1

Updated by tkusumi over 1 year ago

  • Status changed from New to Closed

No response, closing.

Actions #2

Updated by over 1 year ago

Sorry, probably I wasn't quite clear in my email. I guess I said direct mounts are not working while showing they are... Doh.

Direct mounts have mount directory so they are just escaping this bug. For example with:

/- -noauto

/dev/serno/13I0LM9AS.s0         /mnt/efi        msdos   rw,noauto        2       2

arcade@probe2\/etc/mrc# ls /mnt/efi
boot0  boot1.efi  efi  System Volume Information

arcade@probe2\/etc/mrc# mount | grep autofs
map -hosts on /net (autofs)
map -noauto on /mnt/efi (autofs, automounted, local)
map -noauto on /mnt/cd (autofs)

Here /mnt/efi is correctly automounted on request.

Indirect maps are a little bit different, as they just provide the first directory, but everything under it might be dynamically created:

> mount | grep net
map -hosts on /net (autofs)

> ls /net/limbo/
"/net/limbo/": Not a directory (os error 20)

What happens here is:

1. Systems requests contents of /net/.
2. automountd receives request and uses -hosts map to resolve whether that directory is present, in this case whether hostname is resolvable.
3. Upon receiving responce from -hosts map autmountd attempts to create virtual directory /net/<hostname>/ to use as a mountpoint base.
4. automountd attempts to list contents of that directory according to map.

And here we are getting an error. Something is getting wrong inside virtual autofs mount, when virtual directory is getting created:

Oct 7 11:42:15 probe2 automountd[127811]: cannot create /net/limbo: Invalid argument

It looks like some basic filesystem calls have changed and automountd is now unable to properly work with it's virtual autofs filesystem.

Hope that clears up what happens on my side. Sorry for disinformation.

Actions #3

Updated by tkusumi over 1 year ago

I guess you meant to say you had a problem in autofs' intermediate inmemory directories when using direct map.

Try without "-noauto" and "-hosts" if you haven't.
Those special map options make things less simple.
If that works, it's specific to special map options, which basically come from userspace scripts.

See "INDIRECT VERSUS DIRECT MAPS" section in auto_master(5) for details.

I tried with below, and didn't have any issue automounting NFS under autofs directories "n", "f", "s", under HAMMER directory "/mnt".

# cat /etc/auto_master | grep "^/-" 
/-              auto_nfs
# cat /etc/auto_nfs
/mnt/n/f/s -intr,nfsv3

Also available in: Atom PDF