Docker Community Forums

Share and learn in the Docker community.

Docker volume nfs usrquota

docker

(Ngabcs) #1

Hi,

I have a problem with docker volume nfs driver with quota option.
My NFS server setup is correct.

if I mount my NFS v3 server with this options:
-o rw,nosuid,relatime,vers=3,rsize=8192,wsize=8192,namlen=255,hard,nolock,local_lock=all

then user quota is working fine.

$ quota -s -u 1000
Disk quotas for user #1000 (uid 1000):
Filesystem space quota limit grace files quota limit grace
IP:/exports/vol1/
94725M 101376M 101376M 78325 0 0

But if I create the docker volume this options:
docker volume create --driver local
–opt type=nfs --opt \ o=addr=IP,rw,rsize=8192,wsize=8192,intr,hard,nosuid,nolock,tcp,nfsvers=3
–opt device=:/exports/vol1/
vol1

and start docker conatiner (with volume vol1),
then the user quota is not working.

$ mount -a | grep vol1
:/exports/vol1/ on /var/lib/docker/volumes/cnt1_vol1/_data type nfs (rw,nosuid,relatime,vers=3,rsize=8192,wsize=8192,namlen=255,hard,nolock,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=IP,mountvers=3,mountproto=tcp,local_lock=all,addr=IP)

$ quota -s -u 1000
quota: error while getting quota from :/exports/vol1/ for #1000 (id 1000): Connection refused

How can I use the NFS user quota option in the docker container.

docker Version: 17.12.0-ce
debian linux 9.3
kernel 4.9.0-5-amd64

thx.