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 made changes -
          Resolution New: Won't Do [ 10200 ]
          Status Original: Open [ 1 ] New: Closed [ 6 ]
          adilger Andreas Dilger made changes -
          Labels Original: llnl New: llnl patch performance
          pjones Peter Jones made changes -
          Link Original: This issue is related to JFC-21 [ JFC-21 ]
          pjones Peter Jones made changes -
          Link New: This issue is related to JFC-21 [ JFC-21 ]
          pjones Peter Jones made changes -
          Workflow Original: classic default workflow [ 75238 ] New: Sub-task Blocking [ 75498 ]
          Issue Type Original: Question/Request [ 9 ] New: Improvement [ 4 ]
          pjones Peter Jones made changes -
          Link New: This issue is related to JFC-10 [ JFC-10 ]
          defazio Gian-Carlo Defazio made changes -
          Summary Original: quickly determine is a quota is exceed New: quickly determine if a quota is exceeded
          adilger Andreas Dilger made changes -
          Assignee Original: WC Triage [ wc-triage ] New: Hongchao Zhang [ hongchao.zhang ]
          defazio Gian-Carlo Defazio created issue -

          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: