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

quickly determine if a quota is exceeded

Details

    • Improvement
    • Resolution: Won't Do
    • Minor
    • None
    • None
    • 9223372036854775807

    Description

      We run a script that checks the quota status of users and informs them if they are over quota. Currently we run lfs for each user and it can take a long time for a large system with a lot of users.

      So far I've found that I can use llapi_quotactl() (which lfs also uses) to get the necessary information. However, to make llapi_quotactl() run faster, I set dqb_valid to non-zero per the man page for llapi_quotactl(). This seems to work correctly in that I don't cause communication between the QMT and QSDs, but I don't get some of the important information (dqb_curspace and dqb_curinodes) that's used to determine if a user is exceeding a quota (also as expected, per the man page).

      However, I believe the struct lquota_entry.lqe_edquot flag has the information I want. It may not be completely up to date at all times, but that's ok because it's not being used in real time for this script. I can get a hold of it by passing it back to the llapi_quotactl() call in unused space in the struct obd_quotactl which comes out in user space as a struct if_quotactl. I'm just putting all the flags in the struct lquota_entry into the unused flags portion of the struct if_quotactl.

      Is there an easier way to get this information (relatively) quickly?

      Attachments

        Activity

          [LU-13353] quickly determine if a quota is exceeded
          defazio Gian-Carlo Defazio added a comment -

          I won't be implementing this feature.

          defazio Gian-Carlo Defazio added a comment - I won't be implementing this feature.

          Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/38183/
          Subject: LU-13353 quota: add man page for lfs quota
          Project: fs/lustre-release
          Branch: master
          Current Patch Set:
          Commit: fba945ca0daa6a442a01f5174a0ba8b6d94294b9

          gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/38183/ Subject: LU-13353 quota: add man page for lfs quota Project: fs/lustre-release Branch: master Current Patch Set: Commit: fba945ca0daa6a442a01f5174a0ba8b6d94294b9

          Gian-Carlo DeFazio (defazio1@llnl.gov) uploaded a new patch: https://review.whamcloud.com/38183
          Subject: LU-13353 quota: add man page for lfs quota
          Project: fs/lustre-release
          Branch: master
          Current Patch Set: 1
          Commit: 7119836871013eb61b4f276a16a098786994283b

          gerrit Gerrit Updater added a comment - Gian-Carlo DeFazio (defazio1@llnl.gov) uploaded a new patch: https://review.whamcloud.com/38183 Subject: LU-13353 quota: add man page for lfs quota Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 7119836871013eb61b4f276a16a098786994283b
          pjones Peter Jones added a comment -

          Thanks jgmitter. Ah good - I expected it to increment the id in the LU project when I moved it but it retained the original one so it's now fixed without any side-effects. Really, not intuitive but it works...

          pjones Peter Jones added a comment - Thanks jgmitter . Ah good - I expected it to increment the id in the LU project when I moved it but it retained the original one so it's now fixed without any side-effects. Really, not intuitive but it works...

          Yes, that is correct Peter. That’s the only way to be able to reset the type from a question/request to either bug, improvement, or feature.

          jgmitter Joseph Gmitter (Inactive) added a comment - Yes, that is correct Peter. That’s the only way to be able to reset the type from a question/request to either bug, improvement, or feature.

          I can't change the type either, but that's probably not a surprise at this point.

          defazio Gian-Carlo Defazio added a comment - I can't change the type either, but that's probably not a surprise at this point.
          pjones Peter Jones added a comment -

          Well, I can't edit that either. jgmitter I know that we have seen this kind of thing in the past - is the workaround to move to the ticket to this same project? I did not want to do that without confirmation as it will mess up the commit message for the the patch in flight.

          pjones Peter Jones added a comment - Well, I can't edit that either. jgmitter I know that we have seen this kind of thing in the past - is the workaround to move to the ticket to this same project? I did not want to do that without confirmation as it will mess up the commit message for the the patch in flight.
          ofaaland Olaf Faaland added a comment -

          Thanks Andreas

          ofaaland Olaf Faaland added a comment - Thanks Andreas

          Olaf, I'm unable to do that either. It might be something with Jira. I think Peter has the most admin privilege here, so hopefully he can change it.

          adilger Andreas Dilger added a comment - Olaf, I'm unable to do that either. It might be something with Jira. I think Peter has the most admin privilege here, so hopefully he can change it.
          ofaaland Olaf Faaland added a comment -

          Hi Gian-Carlo, can you change the "type" on this ticket to "Improvement"? For whatever reason I'm unable to do it. Thanks.

          ofaaland Olaf Faaland added a comment - Hi Gian-Carlo, can you change the "type" on this ticket to "Improvement"? For whatever reason I'm unable to do it. Thanks.

          People

            hongchao.zhang Hongchao Zhang
            defazio Gian-Carlo Defazio
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: