[clug] NFSv4 "Invalid argument"

Scott Ferguson scott.ferguson.clug at gmail.com
Mon Oct 13 03:41:21 MDT 2014


On 13/10/14 20:57, George at Clug wrote:
>     HI,
> 
> I am unable to understand how NFS works with user permissions.  Does
> anyone have experience with NFS shares in Debian Wheezy and could
> explain to me how to manage user permissions for an NFS share ? 

man nfs
man exports

> Maybe
> it is not even needed?

um, only if security is not needed ;)

> 
> I searched the Internet but did not find anything useful, I did find
> mentions of libnss-mysql and nfs4_disable_idmapping but I could not
> find any detail on how this related to Debian.
> 
> # umount 192.168.0.12:/mnt/vg2/vol1/san12_nfs_ds1/kvm-images/images
> 
> # mount -t nfs  -v
> 192.168.0.12:/mnt/vg2/vol1/san12_nfs_ds1/kvm-images/images
> /var/lib/libvirt/images
> mount.nfs: timeout set for Mon Oct 13 20:42:13 2014
> mount.nfs: trying text-based options
> 'vers=4,addr=192.168.0.12,clientaddr=192.168.0.137'




> 
> # chown root:root
> /var/lib/libvirt/images/ISO/debian-7.5.0-amd64-DVD-1.iso 
> chown: changing ownership of
> `/var/lib/libvirt/images/ISO/debian-7.5.0-amd64-DVD-1.iso': Invalid
> argument
> 
> # ls -al /var/lib/libvirt/images/ISO
> total 11143136
> drwxr-sr-x 2 nobody nogroup       4096 Oct 11 08:50 .
> drwx--s--x 3 nobody nogroup       4096 Oct 11 09:45 ..
> -rw-r--r-- 1 nobody nogroup 3938795520 Oct 11 08:49
> debian-7.5.0-amd64-DVD-1.iso

(I suspect) If you mounted the shares as nobody:nogroup then you can't
chown them to another user - intentionally. See nfs user-id mapping
(anonuid=0,anongid=0 in your exports), or try remount.

> 
> I also tried the following;
> # umount 192.168.0.12:/mnt/vg2/vol1/san12_nfs_ds1/kvm-images/images
> 
> # mount -t nfs -o
> auto,noatime,nolock,bg,nfsvers=3,intr,tcp,actimeo=1800  -v
> 192.168.0.12:/mnt/vg2/vol1/san12_nfs_ds1/kvm-images/images
> /var/lib/libvirt/images
> mount.nfs: trying text-based options
> 'nolock,bg,nfsvers=3,intr,tcp,actimeo=1800,addr=192.168.0.12'
> mount.nfs: prog 100003, trying vers=3, prot=6
> mount.nfs: trying 192.168.0.12 prog 100003 vers 3 prot TCP port 2049
> mount.nfs: prog 100005, trying vers=3, prot=6
> mount.nfs: trying 192.168.0.12 prog 100005 vers 3 prot TCP port 33224


uname -r??
I suspect you are running nfs v4

What comes from:-
dpkg -l nfs-common
?

cat /etc/exports
?


-----8<------------>8--------------------------

HTH




Kind regards


More information about the linux mailing list