Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-7816

Add default quota setting support for Lustre

Details

    • New Feature
    • Resolution: Fixed
    • Minor
    • Lustre 2.12.0
    • None
    • 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.

      Attachments

        Issue Links

          Activity

            [LU-7816] Add default quota setting support for Lustre
            pjones Peter Jones added a comment -

            Landed for 2.12

            pjones Peter Jones added a comment - Landed for 2.12

            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

            gerrit Gerrit Updater added a comment - 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

            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!

            hongchao.zhang Hongchao Zhang added a comment - 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!

            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

            gerrit Gerrit Updater added a comment - 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

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

            ihara Shuichi Ihara (Inactive) added a comment - Shilong revised patch and rebased against latest master. We are waiting for review of patches.
            pjones Peter Jones added a comment -

            Ihara

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

            Thanks

            Peter

            pjones Peter Jones added a comment - Ihara Is this work expected to be a candidate for inclusion in 2.11? Thanks Peter

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

            niu Niu Yawei (Inactive) added a comment - Silong, are you still working on this? Can we close it? Thanks.

            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.

            niu Niu Yawei (Inactive) added a comment - 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.
            niu Niu Yawei (Inactive) added a comment - - edited

            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.

            niu Niu Yawei (Inactive) added a comment - - edited 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.

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

            Thanks.
            Joe

            jgmitter Joseph Gmitter (Inactive) added a comment - Hi Niu, Can you have a look at this feature patch? Thanks. Joe

            People

              wangshilong Wang Shilong (Inactive)
              wangshilong Wang Shilong (Inactive)
              Votes:
              2 Vote for this issue
              Watchers:
              14 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: