3

I set up my NFS server without doing any bigger changes in configuration files. After that I added these entries to /etc/exports(both paths are valid) on server(192.168.1.11):

/export         192.168.1.0/192.168.255.255(rw,fsid=0,insecure,no_subtree_check,async)
/export/users   192.168.1.0/192.168.255.255(rw,nohide,insecure,no_subtree_check,async)

Then I restarted the computer and I tried to get exports list:

$ showmount -e 192.168.1.11
/export        192.168.1.0/192.168.255.255
/export/users  192.168.1.0/192.168.255.255

According to this output there's not problem with connection. Now I want to mount /export to client filesystem(192.168.1.12):

sudo mount -t nfs4 192.168.1.11:/export /mnt

After typing this there's no output and I can't do anything. Another terminal line start is not being displayed. Command is stuck.

Does anybody know am I doing wrong? Please help me.

user35443
  • 155
  • 1
  • 1
  • 5

2 Answers2

2

ON SERVER

Try changing your /etc/exports to

/export         192.168.1.0/24(rw,fsid=0,insecure,no_subtree_check,async)
/export/users   192.168.1.0/24(rw,nohide,insecure,no_subtree_check,async)

Then run exportfs -av

ON CLIENT

sudo mount -t nfs 192.168.1.11:/export /mnt or -t nfs4

Would be nice if you could post some output from /var/log/messages if there's any error.

Amirul Ali
  • 46
  • 4
  • Works, thanks! Interesting is that when I connect with `-t nfs4` it throws this error: `mounting 192.168.1.11:/export failed reason given by server:No such file or directory`. It works with `-t nfs`. But: I have specified rw option, but on client I cannot write my file. Any idea? – user35443 Jan 20 '13 at 08:17
  • You need to make sure both server having the same uid and guid for the files and folder. Usually distro comes with nfsnobody. `chown -R nfsnobody.nfsnobody /export` – Amirul Ali Jan 21 '13 at 02:44
  • [how-to-properly-set-permissions-for-nfs-folder-permission-denied-on-mounting-en](http://serverfault.com/questions/240897/how-to-properly-set-permissions-for-nfs-folder-permission-denied-on-mounting-en) – Amirul Ali Jan 21 '13 at 02:48
0

It looks like you are trying to mount your NFS export to the /mnt directory on your client.

You should create a mount point under /mnt, let's say /mnt/foo, and try mounting there.

JasonAzze
  • 851
  • 10
  • 15