-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[nfs-provisioner] Quota not working #855
Comments
Thanks for your detailed logs. Truth is, this feature is more a proof-of-concept (all of nfs-provisioner is, to some extent, but this feature more than anything else), and I have not tested it since its implementation. Of course, it has not changed since its implementation and neither has xfs so I'm at a loss as to why it doesn't work; if any xfs_quota commands failed I would expect to see them in the nfs-provisioner log. |
Thank you for quick response.
I did the command you gave me, but the
So when I created the project with the host path, I saw that the project was added.
After manually setting the quota on the newly added project, I confirmed that quota works in that directory.
It appears that the project information generated inside the |
Hm, yeah I mixed my commands and they have 1/2 container paths mixed with 1/2 host paths. What if we try running commands from the container? A privileged container should have no problems manipulating the quota. None of the commandserrored, so something else must be wrong. I thought initially that maybe |
If I run it inside a container, it looks like this:
Mount is printed as
The deployment yaml is in the body and the container runtime is also privileged.
|
Hi, I tried this feature out and I had the same problem. And today I was reading the documentation again and I saw in https://github.com/kubernetes-incubator/external-storage/blob/nfs-provisioner-v2.2.0-k8s1.12/nfs/docs/deployment.md#deploying-the-provisioner:
Above example is deployed in kubernetes and I did the same. Does this mean that right now only way to have quotas working is to deploy nfs provisioner outside of kubernetes? |
Hi all, @bitnik it would make sense to me also, since setting quota requires root privlilged. It is apparently not the case. IMHO, the xfs_quota is probably failing silently |
@bitnik @akram @moonek it should work with privileged true, I just tested it locally on fedora (hack/local-up-cluster.sh). Do the nfs-provisioner logs show anything? As an example, here is what I see after I create a PVC that request 1MiB from the provisioner where the XFS file system at /tmp/xfs-mtpt is mounted to /export $ mount
...
/tmp/file.fs on /tmp/xfs-mtpt type xfs (rw,relatime,seclabel,attr2,inode64,prjquota)
...
$ cat /tmp/xfs-mtpt/projects
1:/export/pvc-483444e2-0245-11e9-b5f3-408d5ce681c7:1048576
~ $ dd if=/dev/zero of=/tmp/xfs-mtpt/pvc-483444e2-0245-11e9-b5f3-408d5ce681c7/abcd bs=1024 count=102400
dd: error writing '/tmp/xfs-mtpt/pvc-483444e2-0245-11e9-b5f3-408d5ce681c7/abcd': No space left on device
1025+0 records in
1024+0 records out
1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.00650466 s, 161 MB/s
$ sudo xfs_quota -x -c 'report /tmp/xfs-mtpt/pvc-483444e2-0245-11e9-b5f3-408d5ce681c7/'
Project quota on /tmp/xfs-mtpt (/dev/loop6)
Blocks
Project ID Used Soft Hard Warn/Grace
---------- --------------------------------------------------
#0 1244 0 0 00 [--------]
#1 1024 0 1024 00 [--------] |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@fejta-bot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Hi,
I'm testing nfs-provisioner quota feature.
Through the document below.
enable-xfs-quota
- If the provisioner will set xfs quotas for each volume it provisions. Requires that the directory it creates volumes in ('/export') is xfs mounted with option prjquota/pquota, and that it has the privilege to run xfs_quota. Default false.I've tested it to make sure that quota is guaranteed in PV units, but it seems to share the entire nfs volume quota.
This is my procedure.
nfs-server
settings (10GB LV)nfs-provisioner
storageClass
,1Gi pvc
,sample app
PV
was successfully created and mounted on the app.df -h
, I can see the total capacity of nfs lv and I have confirmed that I can write more than 1Gi.Additional information for nfs-server.
Here is provisioner log
The text was updated successfully, but these errors were encountered: