Error was “mount.nfs: Operation not permitted “.
Ok, I check my mount options
#cat /etc/fstab <ipaddress>:/c/folder /mnt/folder nfs rw,user,noauto 0 0
Fstab is ok but problem persists.
Request mount to be verbose (from my pc – debian sid)
<myhost>:/home/giulio# mount -v /mnt/folder mount.nfs: timeout set for Sun Jan 17 13:34:47 2010 mount.nfs: trying text-based options 'addr=<readynas-ip-address>,vers=4,clientaddr=<my-pc-address>' mount.nfs: mount(2): Operation not permitted mount.nfs: Operation not permitted
Request mount to be verbose (from my server – debian lenny)
mount.nfs: trying <readynas-ip-address> prog 100003 vers 3 prot TCP port 2049 mount.nfs: trying <readynas-ip-address> prog 100005 vers 3 prot UDP port 3078 <readynas-ip-address>:/c/folder on /mnt/folder type nfs (rw,noexec,nosuid,nodev,noauto,user)
Wow, ok, there is a difference.
My pc try to mount nfs with version 4, my server doesn’t use v4, but it uses v3!
What is strange?
I’ve read a lot of tutorial/faq but my problem remains. So I read man pages but this is what I find, for example in man mount.nfs…
mount.nfs is meant to be used by the mount(8) command for mounting NFS shares. This subcommand, however, can also be used as a standalone command
with limited functionality.
mount.nfs4 is used for mounting NFSv4 file system, while mount.nfs is used to mount NFS file systems versions 3 or 2. remotetarget is a server
share usually in the form of servername:/path/to/share. dir is the directory on which the file system is to be mounted.
It seems to be false. On my pc I use mount.nfs and always mount tries with nfs4.
Ok, let’s go to solution..
You can force the NFS version to use with nfsvers=3.
So I change my /etc/fstab like this:
<readynas-ip-address>:/c/folder /mnt/folder nfs rw,user,noauto,nfsvers=3 0 0
Now mount uses the right version and all goes well.