Linux – mounting nfs gives “access denied by server while mounting (null)”

debianlinuxmountnfs

I've recently upgraded one of our machines to debian Squeeze from lenny.
Previously, these machines mounted 2 NFS shares /home and /home/scans/data

After the upgrade they can only mount one at a time. If I try and mount them together I get the following error:

mount.nfs: access denied by server while mounting (null)

I also have to specify vers=3 in the fstab file or they are unable to mount at all due to the nfs server still being on Lenny.

Nothing permission wise has changed since the upgrade. There are other machines still on Lenny which still run with both shares mounted.

fstab entries for this machine:

nfs:/home /home nfs vers=3,exec,suid,nodev,nolock 0 0

nfs:/home/scans/data /home/scans/data nfs vers=3,exec,suid,nodev,nolock 0 0

Best Answer

Mmmm... so your NFS server is called nfs? I am wondering if the code parsing your fstab is interpreting that as a protocol type rather than a hostname. That would mean that the hostname would effectively be null, which agrees with what the error message says.

I would try adding an alias in your hosts file and using the alias in your fstab.

Failing that, try showmount -e nfs.

Related Question