[LU-17395] df -h is limited by project quota even if quota enforcement is disabled Created: 04/Jan/24  Updated: 11/Jan/24

Status: Open
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.16.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Alexander Boyko Assignee: WC Triage
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Related
is related to LU-16660 don't show grace time if this quota t... Open
is related to LU-16771 statfs_max_age not used with statfs()... Reopened
is related to LU-15721 projid quota limit statfs() on direct... Resolved
is related to LU-9555 "df /path/to/project" should return p... Resolved
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

$ git log --oneline -n3
d43e8b471f (HEAD -> df_noenf, tag: v2_15_60, tag: 2.15.60, origin/master, origin/HEAD) New tag 2.15.60
54d8859bef LU-17215 tests: sanity/398q to use $tfile
7a56a689d4 LU-17374 gss: get rid of rsi cache entries after req handle
$ MDSCOUNT=2 FSTYPE=ldiskfs bash lustre/tests/llmount.sh
$ lfs project -sp 1212 /mnt/lustre
$ lfs setquota -p 1212 -b 10M -B 10M -i 10K -I 10K /mnt/lustre
$ df -h /mnt/lustre
Filesystem Size Used Avail Use% Mounted on
10.0.2.15@tcp:/lustre 10M 4.0K 10M 1% /mnt/lustre
$ lfs project -d /mnt/lustre
1212 P /mnt/lustre
$ lfs project -sp 0 /mnt/lustre
$ df -h /mnt/lustre
Filesystem Size Used Avail Use% Mounted on
10.0.2.15@tcp:/lustre 612M 3.0M 556M 1% /mnt/lustre
$ lctl get_param osd-ldiskfs.*.quota_slave.info | grep enabled
quota enabled: none
quota enabled: none
quota enabled: none
quota enabled: none



 Comments   
Comment by Andreas Dilger [ 06/Jan/24 ]

It seems like a bug that statfs() is affected if project quota is not enforced. Is there some way that ll_statfs_project()->quotactl_ioctl() can determine that quota is not enforced?

Comment by Sergey Cheremencev [ 09/Jan/24 ]

The solution of this problem could be common with LU-16660. In my case I also wanted to know whether quotas enforced or not. The problem is that to be 100% sure that quotas are disabled we need to ask all "quota slaves", i.e. all OSTs and MDTs. It is too expensive to ask all targets, so probably it is worth to have some common flag on MDS0 that is set to "TRUE" only when quota on all targets is disabled(quota_slave=none). 

Comment by Andreas Dilger [ 11/Jan/24 ]

In LU-16771 there was also a performance issue related to an application getting the project quota repeatedly due to many statfs() syscalls, and no cache for the project quota on the clients. I think it is reasonable to cache the "quota enabled/disabled" state on the client and MDS, along with the quota usage for an ID+type for a short time (same as statfs), as long as these are not used to make actual decisions about IO. For these cases, the values are mostly cosmetic, so caching them for a few seconds is fine.

There would need to be a tunable like "enable_quota_cache=0" to disable the cache for sanity-quota to work properly when fetching the quota, or in case of problems in the field.

Generated at Sat Feb 10 03:35:06 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.