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

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



Hi,

the mystery has been resolved -- question how did I not catch it right away?

I found that my old Red Hat system and Debian Wheezy/Squeezy resolve computer name into ip address in different ways.

Red Hat mount maps computer name to DHCP ip address
Debian mount maps computer name to loopback interface

My attention was somewhat distracted and I've missed that in this case in /etc/exports a record should look

not like
/export/home    192.168.0.0/24(rw,sync,no_subtree_check)

but instead
/export/home 192.168.0.0/24(rw,sync,no_subtree_check) 127.0.0.0/16(rw,sync,no_subtree_check)

The clue was found in logfiles
/var/log/syslog.1:Apr 24 10:29:19 vega mountd[1320]: refused mount request from 127.0.1.1 for /export/home (/export/home): unmatched host

The mystery is resolved.

Cheers,
Andy

On 4/24/2014 3:25 AM, Ron Leach wrote:
On 24/04/2014 09:49, Snow Leopard wrote:
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 directoryjust 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 .



I wonder if it is letting you mount as 'nfs' when you supply the IP address, but is not letting you mount as 'nfs' when you try to address the device locally (which doesn't surprise me).

While I don't use mount, I do use fstab to mount the device containing our nfs export, locally

/dev/md5  /mnt/point  ext4    rw,auto,users,exec

Isn't the 'right' way to mount local filesystems directly as 'ext4' or whatever, and only mount as 'nfs' if the filesystem has to be accessed at another IP address?

regards, Ron


Reply to: