Chown on NFS shares?

Status
Not open for further replies.

shawly

Dabbler
Joined
Apr 2, 2014
Messages
45
I'm currently learning docker, so I installed RancherOS within a VM on my ESXi host.
I'm also trying to get persistent storage via NFS, the problem here is, that many containers want to call chown to their working directories, which in my case are located on my NAS.

Is there any way to make NFS clients be able to change the ownership of the files within an NFS share? I already tried setting a user within maproot or mapall in the NFS share settings, but the clients still can't change the ownership.. NFS v4 is enabled, since Ranchers NFS driver doesn't like NFS v3 anymore.
 

shawly

Dabbler
Joined
Apr 2, 2014
Messages
45
They match. The thing is, when I log into a container with an nfs volume mounted I can add, remove and modify files, but the uid and gid are set to 4294967294 since NFSv4 doesn't actually uses UIDs and GIDs. Seems like rancher-nfs also ignores the domain I manually set within /etc/idmapd.conf
I've read that I need to enable Kerberos for my NFS server, but I'm not really sure what I need to do with the client after I enabled Kerberos.

I also tried using the NFSv3 ownership model for NFSv4 but the UID/GID within the client still shows up as 4294967294.

Just checked, nfsuserd seems to send the correct uid and gid and doesn't throw any errors:
Code:
Jun 29 12:08:30 store nfsuserd:[53183]: Added uid=1101 name=docker			 
Jun 29 12:08:30 store nfsuserd:[53183]: Added gid=1101 name=docker


I'm trying to get this working since almost a week but no one in the whole web seems to use FreeNAS and Rancher.. Under Linux the fix should be the no_root_squash option, I've read that mapall should be the equivalent to no_root_squash but using root:wheel with mapall doesn't work and also a non-root user like my docker user doesn't make a difference. I also tried to allow non-root mounts and the support 16 > groups option, nothing made a difference.
 
Last edited:
Status
Not open for further replies.
Top