Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Operation not permitted with local nfs export #71

Open
Jaykah opened this issue Sep 2, 2016 · 5 comments
Open

Operation not permitted with local nfs export #71

Jaykah opened this issue Sep 2, 2016 · 5 comments

Comments

@Jaykah
Copy link

Jaykah commented Sep 2, 2016

I am trying to mount a locally exported NFS share, but am getting permissions errors every time:

root@ubuntu:/home/user# docker run -i -t --volume-driver=nfs -v 127.0.0.1/mnt/info:/tmp ubuntu /bin/bash
docker: Error response from daemon: chown /var/lib/docker-volumes/netshare/nfs/127.0.0.1/mnt/info: operation not permitted.
DEBU[0141] Host path for 127.0.0.1/mnt/info is at /var/lib/docker-volumes/netshare/nfs/127.0.0.1/mnt/info
DEBU[0141] Entering Mount: {127.0.0.1/mnt/info map[]}
INFO[0141] Mounting NFS volume 127.0.0.1:/mnt/info on /var/lib/docker-volumes/netshare/nfs/127.0.0.1/mnt/info
DEBU[0141] Mounting with NFSv4 - src: 127.0.0.1:/mnt/info, dest: /var/lib/docker-volumes/netshare/nfs/127.0.0.1/mnt/info
DEBU[0141] exec: mount -v -t nfs4 127.0.0.1:/mnt/info /var/lib/docker-volumes/netshare/nfs/127.0.0.1/mnt/info

DEBU[0142] Entering Unmount: {127.0.0.1/mnt/info map[]}
INFO[0142] Unmounting volume name 127.0.0.1/mnt/info from /var/lib/docker-volumes/netshare/nfs/127.0.0.1/mnt/info
INFO[0142] Removing un-managed volume

What is curious is that if I mount directly it works:

root@ubuntu:/home/user# mount -v -t nfs4 127.0.0.1:/mnt/info /var/lib/docker-volumes/netshare/nfs/127.0.0.1/mnt/info
mount.nfs4: mount point /var/lib/docker-volumes/netshare/nfs/127.0.0.1/mnt/info does not exist
root@ubuntu:/home/user# mkdir /var/lib/docker-volumes/netshare/nfs/127.0.0.1/mnt/info
root@ubuntu:/home/user# mount -v -t nfs4 127.0.0.1:/mnt/info /var/lib/docker-volumes/netshare/nfs/127.0.0.1/mnt/info
mount.nfs4: timeout set for Fri Sep  2 16:04:45 2016
mount.nfs4: trying text-based options 'addr=127.0.0.1,clientaddr=127.0.0.1'
root@ubuntu:/home/user# ls  /var/lib/docker-volumes/netshare/nfs/127.0.0.1/mnt/info
README

What am I doing wrong?

@gondor
Copy link
Member

gondor commented Sep 3, 2016

Looks like netshare is not running as root? It must have rights to create the directory the mount is going too and since it runs as a system process it typically needs root.

@Jaykah
Copy link
Author

Jaykah commented Sep 3, 2016

Running as root.

@Jaykah
Copy link
Author

Jaykah commented Sep 3, 2016

4.4.0-36-generic
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04 LTS"

@Jaykah
Copy link
Author

Jaykah commented Sep 12, 2016

Let me know if I can provide any additional information pertaining to the issue at hand.

@Jaykah
Copy link
Author

Jaykah commented Sep 19, 2016

Is anyone successfully using Netshare for NFS exports?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants