[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Q: nfs server fails to mount own exported resource, but other client able to mount



Hi,

I came across strange "mount" problem on nfs server -- it refuses to mount it's own directory while other nfs clients able mount nfs server exported directory just fine

1. nfs server
    name: install.myclub.com
    OS: wheeze (Debian)
    ip: 192.168.0.62
    /etc/exports:   /export/home 192.163.0.0/24(rw,subtree_check)
    drxwrxwrxw      /export/home

2. client1
    name: meteor.myclub.com
    OS: Valhalla (Red Hat 7.3)
    ip: 192.168.0.1
    mount -t nfs install:myclub.com:/export/home /mnt
    mounts directory without any error

3. client2
    name: moon.myclub.com
    OS: squeeze (Debian)
    ip: 192.168.0.64
    mount -t nfs install:myclub.com:/export/home /mnt
    mounts directory without any error

4. client3 (nfs server itself)
    name: install.myclub.com
    OS: wheeze (Debian)
    ip: 192.168.0.62
    mount -t nfs 192.168.0.62:/export/home /mnt
    mounts directory without any error

5. client4 (nfs server itself)
    name: install.myclub.com
    OS: wheeze (Debian)
    ip: 192.168.0.62
    mount -t nfs install:/export/home /mnt
    mounts fails with an error
   
mount -v -t nfs install:/export/home /mnt
mount.nfs: timeout set for Thu Apr 24 01:21:36 2014
mount.nfs: trying text-based options 'vers=4,addr=127.0.1.1,clientaddr=127.0.0.1'
mount.nfs: mount(2): Permission denied
mount.nfs: access denied by server while mounting install:/export/home

mount -v -t nfs install.myclub.com:/export/home /mnt
mount.nfs: timeout set for Thu Apr 24 01:22:50 2014
mount.nfs: trying text-based options 'vers=4,addr=127.0.1.1,clientaddr=127.0.0.1'
mount.nfs: mount(2): Permission denied
mount.nfs: access denied by server while mounting install.myclub.com:/export/home

The error indicates that when I attempt to mount by using FQDN of nfs server -- the name resolves to 127.0.1.1 and client resolves to 127.0.0.1 .

cat /etc/hosts
127.0.0.1       localhost
127.0.1.1       install.myclub.com      install

If I modify /etc/hosts to

cat /etc/hosts
127.0.0.1       localhost
#127.0.1.1      install.myclub.com      install

then

mount -v -t nfs install.myclub.com:/export/home /mnt
mount.nfs: timeout set for Thu Apr 24 01:29:50 2014
mount.nfs: trying text-based options 'vers=4,addr=192.168.0.62,clientaddr=192.168.0.62'

mounts directory without any error, while

mount -v -t nfs install:/export/home /mnt
mount.nfs: timeout set for Thu Apr 24 01:29:27 2014
mount.nfs: trying text-based options 'vers=4,addr=127.0.0.1,clientaddr=127.0.0.1'
mount.nfs: mount(2): Permission denied
mount.nfs: access denied by server while mounting install:/export/home

I do not recall when a record "127.0.1.1" appear in /etc/hosts (Squeezy and Wheeze both have it) for first time, it is default record added during installation.

I puzzled and run out of ideas why nfs server is not able to mount own exported directory. I see that "mount" tries to mount through loopback and for some inexplicable to me reason it fails. Why does it happen?

What am I missing?

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=719621

--- Quote ------------------------------------------------------
The IP address 127.0.1.1 in the second line of this example may not be found on some other Unix-like systems. The Debian Installer creates this entry for a system without a permanent IP address as a workaround for some software (e.g., GNOME) as documented in the bug #719621.
--- End of Quote -----------------------------------------------

Thank you for any clue how this problem can be fixed.

Andy



Reply to: