[LU-17396] 'lfs quota -p ID' will create quota entry Created: 04/Jan/24  Updated: 04/Jan/24

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

Type: Bug Priority: Minor
Reporter: Andreas Dilger Assignee: WC Triage
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Related
is related to LU-14535 add option for LFS to get all quota i... Open
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

Running a check with "lfs quota -p SOME_ID MOUNT" will create a new SOME_ID entry in the quota table if it doesn't already exist. It requires "lfs setquota --delete -p SOME_ID MOUNT" to delete this record again. The same happens for "lfs quota -u" and "lfs quota -g". Just querying the quota ID should not create an entry in the quota database, as this adds overhead and confusion about which IDs are actually in use, and could add a lot of overhead if some admin decides to run "for ID in {1..1000000}; do lfs quota -[ugp] $ID; done" to extract all of the quota information (until LU-14535 quota: get all quota info in LFS is available).

[root@centos7 tests]# lctl get_param qmt.testfs-QMT0000.md-0x0.glb-prj
qmt.testfs-QMT0000.md-0x0.glb-prj=
global_pool0_md_prj
- id:      0
  limits:  { hard:              0, soft:              0, granted:              0, time:               604800 }
[root@centos7 tests]# lfs quota -p 1023 /mnt/testfs
Disk quotas for prj 1023 (pid 1023):
     Filesystem  kbytes   quota   limit   grace   files   quota   limit   grace
    /mnt/testfs       0       0       0       -       0       0       0       -
[root@centos7 tests]# lctl get_param qmt.testfs-QMT0000.md-0x0.glb-prj
qmt.testfs-QMT0000.md-0x0.glb-prj=
global_pool0_md_prj
- id:      0
  limits:  { hard:              0, soft:              0, granted:              0, time:               604800 }
- id:      1023
  limits:  { hard:              0, soft:              0, granted:              0, time:      281474976710656 }

The "id: 1023" entry is also persistent after remount, so it is definitely created in the quota table and not just in memory.


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