[LU-7816] Add default quota setting support for Lustre Created: 25/Feb/16  Updated: 30/Aug/18  Resolved: 03/Jul/18

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: Lustre 2.12.0

Type: New Feature Priority: Minor
Reporter: Wang Shilong (Inactive) Assignee: Wang Shilong (Inactive)
Resolution: Fixed Votes: 2
Labels: patch

Issue Links:
Blocker
is blocked by LUDOC-405 Add the usage instructions for defaul... Resolved
Related
is related to LU-11141 sanity-quota test_61: write succeed, ... Resolved
is related to LU-11023 OST Pool Quotas Resolved
Rank (Obsolete): 9223372036854775807

 Description   

GPFS support default quota setting, but Lustre still dosen't.
Sometimes, for example administrators are not aware of when new
users will be created, and it is common that administrators want to
set a default quota for users/groups when they are created.



 Comments   
Comment by Gerrit Updater [ 25/Feb/16 ]

Wang Shilong (wshilong@ddn.com) uploaded a new patch: http://review.whamcloud.com/18664
Subject: LU-7816 quota: add default quota setting support
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 869bf09b85c092dcb79436293824941cc9760f61

Comment by Joseph Gmitter (Inactive) [ 25/Feb/16 ]

Hi Niu,
Can you have a look at this feature patch?

Thanks.
Joe

Comment by Niu Yawei (Inactive) [ 26/Feb/16 ]

I don't quite see how this feature is used, after looking at the patch, my current understanding is: Administrator set default quota for certain user by "lfs setquota --default -u $UID ...", and this setting can be overwritten by real quota setting "lfs setquota -u $UID ...". If there is no real quota setting for certain user, system will turn to use the default one.

My question is : If administrator want quota limit on certain user, why don't he just set quota for the user directly? I mean why not just use the "lfs setquota -u $UID ..." to set a 'default' value to the user?

Ah, my mistake. The default value is per system not per user.

Comment by Niu Yawei (Inactive) [ 26/Feb/16 ]

I have few questions:

1. When default quota is set on system, how can we specify a user/group with no quota limit? No users/groups can have 0 quota limit if there is a non-zero default setting?

2. How to set default quota? Set quota to a special UID/GID or introduce a new quota command? (like Q_SET/GET_DEF_USR/GRP) The latter way needs client to support the new qc_cmd, but doesn't need to reserve special UID/GIDs for the default setting. Consequently, the default quota can be stored in the global index (former way) or a separate plain file (latter way).

3. How a user/group inherit the default quota setting? For instance, If a user/group has only soft limit, should he inherit the hard limit from default setting? Should the default limit be copied to the entry of other user/group in global index? What if the default value is changed?

4. How to notify quota slave when default quota is set/changed/cleared?

Probably we'd compose a brief design to address these concerns? Thank you.

Comment by Niu Yawei (Inactive) [ 17/Jul/17 ]

Silong, are you still working on this? Can we close it? Thanks.

Comment by Peter Jones [ 21/Jul/17 ]

Ihara

Is this work expected to be a candidate for inclusion in 2.11?

Thanks

Peter

Comment by Shuichi Ihara (Inactive) [ 30/Apr/18 ]

Shilong revised patch and rebased against latest master. We are waiting for review of patches.

Comment by Gerrit Updater [ 07/May/18 ]

Hongchao Zhang (hongchao.zhang@intel.com) uploaded a new patch: https://review.whamcloud.com/32306
Subject: LU-7816 quota: add default quota setting support
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 69ae397cd1b5c88070a3ec05b7d7957e98fa646e

Comment by Hongchao Zhang [ 07/May/18 ]

Thanks for the patch created by Shilong, and I have some more ideas to implement the default quota based on Shilong's patch.

1. the default quota setting is more like a normal setting (it's not related to specific user/group/project account, and it is more like a global setting),
then it's better to be implemented by some global setting, for example, by some special account or some specific quota configuration file.

2. To support the default quota based on the existing quota mechanism, we can create a special quota record for the non-enforced quota account,
the special record will have zero hard/soft limit and a flag at the high bits of the grace time (so it can be downgraded to previous Lustre version),
and enforce it with the global default quota setting dynamically.

Thanks!

Comment by Gerrit Updater [ 03/Jul/18 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/32306/
Subject: LU-7816 quota: add default quota setting support
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 530881fe4ee20b56b0426a5c4d3a2b5226768d06

Comment by Peter Jones [ 03/Jul/18 ]

Landed for 2.12

Generated at Sat Feb 10 02:12:10 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.