Re: Q: nfs server fails to mount own exported resource, but other client able to mount
On Thu, Apr 24, 2014 at 4:49 AM, Snow Leopard
<snow.leopard.deb@gmail.com> wrote:
>
> 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?
The "127.0.1.1" entry is a good thing...
Can you mount the nfs share locally using 127.0.0.1, 127.0.1.1, or the
dhcp-supplied ip address?
Can you mount the share locally when you add "-o vers=3" to the above mounts?
What's in "/etc/exports"?
What's in "/etc/hosts.allow" and "/etc/hosts.deny"?
Reply to: