Skip to contentSkip to conversation

NFSv4: Unable to mount, nonsensical error

DISCUSSION Andreas Reis 2 participants 2 messages Sep 27, 2014 – Sep 28, 2014 Kernel automounter

lore
Share & tools
lore
#0 lore raw

Hi,

I'm trying to automount a NFSv4 share to /mnt/bar from Host A via a direct map, but can't get it to work no matter what.

Mounting it manually with the very same options works perfectly fine.

auto.master:

/-     /etc/autofs/bar.nfs    --timeout=15 --ghost
/foo   /etc/autofs/auto.nfs   --timeout=15

The second line is an executable map for NFSv3 shares from Host B. That one works as intended. However…

fs.nfs:
/mnt/bar -fstype=nfs4,rw,soft,async,_netdev,rsize=8192,wsize=8192 192.168.1.144:bar (on one line)

… fails. Instead, the folder is still created, but accessing it yields "No such file or directory".

Meanwhile automount prints a nonsensical …

"validate_location: expected colon delimeter not found in location 192.168.1.144:bar"

… which from an error path (with a typo) in parse_sun.c's validate_location that was added in autofs 5.0.6.

Maybe the person who added it missed that unlike mount requests for NFSv3 shares, NFSv4 ones need not (depending on the server, must not) have a "/" after the ":"?

Because that however is what the somewhat misleadingly named check_colon function called by validate_location checks.

Nonetheless, patching that path to still return 1 resolved nothing.

Any ideas?

(Distro is Arch, updated packages, ie. autofs 5.1.0.)

Thanks,
Andreas

maintainer
#1 lore raw
Quoted 27 lines · Andreas Reis

Hi,

I'm trying to automount a NFSv4 share to /mnt/bar from Host A via a direct map, but can't get it to work no matter what.

Mounting it manually with the very same options works perfectly fine.

auto.master:

/-     /etc/autofs/bar.nfs    --timeout=15 --ghost
/foo   /etc/autofs/auto.nfs   --timeout=15

The second line is an executable map for NFSv3 shares from Host B. That one works as intended. However…

fs.nfs:
/mnt/bar -fstype=nfs4,rw,soft,async,_netdev,rsize=8192,wsize=8192 192.168.1.144:bar
(on one line)

… fails. Instead, the folder is still created, but accessing it yields "No such file or directory".

Meanwhile automount prints a nonsensical …

"validate_location: expected colon delimeter not found in location 192.168.1.144:bar"

Quoted 6 lines

… which from an error path (with a typo) in parse_sun.c's validate_location that was added in autofs 5.0.6.

Maybe the person who added it missed that unlike mount requests for NFSv3 shares, NFSv4 ones need not (depending on the server, must not) have a "/" after the ":"?

It is surprising that I'm not aware of this "convention" since a simple search turns up results from quite a few years past.

Unfortunately there are a number of other places where this will cause problems and some won't be at all straight forward to change.

Ian