<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 03:00:33 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>Whamcloud Community JIRA</title>
    <link>https://jira.whamcloud.com</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.4.14</version>
        <build-number>940014</build-number>
        <build-date>05-12-2023</build-date>
    </build-info>


<item>
            <title>[LU-13353] quickly determine if a quota is exceeded</title>
                <link>https://jira.whamcloud.com/browse/LU-13353</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;So far I&apos;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&apos;t cause communication between the QMT and QSDs, but I don&apos;t get some of the important information (dqb_curspace and dqb_curinodes) that&apos;s used to determine if a user is exceeding a quota (also as expected, per the man page).&lt;/p&gt;

&lt;p&gt;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&apos;s ok because it&apos;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&apos;m just putting all the flags in the struct lquota_entry into the unused flags portion of the struct if_quotactl.&lt;/p&gt;

&lt;p&gt;Is there an easier way to get this information (relatively) quickly?&lt;/p&gt;</description>
                <environment></environment>
        <key id="58339">LU-13353</key>
            <summary>quickly determine if a quota is exceeded</summary>
                <type id="4" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11310&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="4" iconUrl="https://jira.whamcloud.com/images/icons/priorities/minor.svg">Minor</priority>
                        <status id="1" iconUrl="https://jira.whamcloud.com/images/icons/statuses/open.png" description="The issue is open and ready for the assignee to start work on it.">Open</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="hongchao.zhang">Hongchao Zhang</assignee>
                                    <reporter username="defazio">Gian-Carlo Defazio</reporter>
                        <labels>
                            <label>llnl</label>
                    </labels>
                <created>Tue, 10 Mar 2020 23:06:32 +0000</created>
                <updated>Sat, 13 Jun 2020 14:58:46 +0000</updated>
                                                                                <due></due>
                            <votes>0</votes>
                                    <watches>9</watches>
                                                                            <comments>
                            <comment id="265065" author="adilger" created="Wed, 11 Mar 2020 02:41:21 +0000"  >&lt;p&gt;Hongchao, could you please comment.&lt;/p&gt;</comment>
                            <comment id="265095" author="hongchao.zhang" created="Wed, 11 Mar 2020 13:38:17 +0000"  >&lt;p&gt;Hi,&lt;br/&gt;
The relative quick way to check whether the users/groups is over quota limit is get it directly QMT(at MDT0000)&lt;br/&gt;
for instance, check the status of users&lt;/p&gt;

&lt;p&gt;At MDT0000&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;# cat /proc/fs/lustre/qmt/lustre-QMT0000/dt-0x0/glb-usr
global_pool0_dt_usr
- id:      0
  limits:  { hard:                    0, soft:                    0, granted:                    0, time:               604800 }
- id:      60000
  limits:  { hard:               102400, soft:               102400, granted:                32768, time:                    0 }
- id:      60001
  limits:  { hard:               102400, soft:               102400, granted:                 8192, time:                    0 }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Print the users&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;#cat /proc/fs/lustre/qmt/lustre-QMT0000/dt-0x0/glb-usr | grep -B 1 &quot;limits&quot; | sed &apos;$!N;s/\n/,/&apos; |  awk -F &quot;[:,]&quot; &apos; { if ($9 &amp;gt; $5) print $2 &quot; is over quota hard limit&quot; ; else if ($9 &amp;gt; $7) print $2 &quot; is over quota soft limit&quot; }&apos;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="265132" author="ofaaland" created="Wed, 11 Mar 2020 17:32:07 +0000"  >&lt;p&gt;Hongchao, thanks for your response.&lt;/p&gt;

&lt;p&gt;Gian-Carlo is actually asking about an approach for an enhancement he is working on.&#160; He&apos;s asking about sending the&#160;lquota_entry.lqe_edquot flag back from the QMT to the MDC and through to userspace.&lt;/p&gt;</comment>
                            <comment id="265154" author="wshilong" created="Thu, 12 Mar 2020 00:46:11 +0000"  >&lt;p&gt;One of another interesting feature is to add &apos;lfs quota --list-all&apos; an interface which try to get all existed quota type record from MDS, and even possible passing some flags to MDS(only filter overquota) and then return them back to clients, i heard several times that some people want this, this could save RPCs call for your case(mostly it might be just several RPCs to return back all quota informations).&lt;/p&gt;


</comment>
                            <comment id="265155" author="ofaaland" created="Thu, 12 Mar 2020 01:02:55 +0000"  >&lt;p&gt;Great!&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;an interface which try to get all existed quota type record from MDS&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;and&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;only filter overquota&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Those are the kind of options we have considered and would like your input on.&lt;/p&gt;

&lt;p&gt;Gian-Carlo is extracting the key bits out of a patch he&apos;s used for testing, and he&apos;ll push that so we can use it to talk about the options.&lt;/p&gt;</comment>
                            <comment id="265158" author="simmonsja" created="Thu, 12 Mar 2020 01:11:22 +0000"  >&lt;p&gt;Has anyone looked at quota_nld? The linux kernel sends netlink packets about the quota state.&#160;&lt;/p&gt;</comment>
                            <comment id="265192" author="hongchao.zhang" created="Thu, 12 Mar 2020 13:37:55 +0000"  >&lt;p&gt;Hi Olaf,&lt;/p&gt;

&lt;p&gt;The &quot;lquota_entry.lqe_edquot&quot; can be packed into &quot;dqi_flags&quot; (struct obd_dqinfo) in QMT and return to client side,&lt;br/&gt;
the more efficient way to get the quota information of all users/groups could be defining a new quota calling type to&lt;br/&gt;
getting all quota information (the processing is similar as &quot;cat /proc/fs/lustre/qmt/lustre-QMT0000/dt-0x0/glb-usr&quot;)&lt;br/&gt;
from QMT and send it to client.&lt;/p&gt;</comment>
                            <comment id="265214" author="gerrit" created="Thu, 12 Mar 2020 20:09:02 +0000"  >&lt;p&gt;Gian-Carlo DeFazio (defazio1@llnl.gov) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/37908&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/37908&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-13353&quot; title=&quot;quickly determine if a quota is exceeded&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-13353&quot;&gt;LU-13353&lt;/a&gt; quota: quickly determine if quota exceeded&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 8bd14f3e1e7cfab53ad045465483c7c6373fcf13&lt;/p&gt;</comment>
                            <comment id="266612" author="ofaaland" created="Wed, 1 Apr 2020 18:13:29 +0000"  >&lt;p&gt;Hi Gian-Carlo, can you change the &quot;type&quot; on this ticket to &quot;Improvement&quot;?  For whatever reason I&apos;m unable to do it.  Thanks.&lt;/p&gt;</comment>
                            <comment id="266627" author="adilger" created="Wed, 1 Apr 2020 20:01:53 +0000"  >&lt;p&gt;Olaf, I&apos;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.&lt;/p&gt;</comment>
                            <comment id="266628" author="ofaaland" created="Wed, 1 Apr 2020 20:04:19 +0000"  >&lt;p&gt;Thanks Andreas&lt;/p&gt;</comment>
                            <comment id="266629" author="pjones" created="Wed, 1 Apr 2020 20:39:12 +0000"  >&lt;p&gt;Well, I can&apos;t edit that either. &lt;a href=&quot;https://jira.whamcloud.com/secure/ViewProfile.jspa?name=jgmitter&quot; class=&quot;user-hover&quot; rel=&quot;jgmitter&quot;&gt;jgmitter&lt;/a&gt; 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.&lt;/p&gt;</comment>
                            <comment id="266640" author="defazio" created="Wed, 1 Apr 2020 23:24:12 +0000"  >&lt;p&gt;I can&apos;t change the type either, but that&apos;s probably not a surprise at this point.&lt;/p&gt;</comment>
                            <comment id="266650" author="jgmitter" created="Thu, 2 Apr 2020 04:14:20 +0000"  >&lt;p&gt;Yes, that is correct Peter.  That&#8217;s the only way to be able to reset the type from a question/request to either bug, improvement, or feature.&lt;/p&gt;</comment>
                            <comment id="266684" author="pjones" created="Thu, 2 Apr 2020 12:56:34 +0000"  >&lt;p&gt;Thanks &lt;a href=&quot;https://jira.whamcloud.com/secure/ViewProfile.jspa?name=jgmitter&quot; class=&quot;user-hover&quot; rel=&quot;jgmitter&quot;&gt;jgmitter&lt;/a&gt;. 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&apos;s now fixed without any side-effects. Really, not intuitive but it works...&lt;/p&gt;</comment>
                            <comment id="267191" author="gerrit" created="Wed, 8 Apr 2020 19:12:54 +0000"  >&lt;p&gt;Gian-Carlo DeFazio (defazio1@llnl.gov) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/38183&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/38183&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-13353&quot; title=&quot;quickly determine if a quota is exceeded&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-13353&quot;&gt;LU-13353&lt;/a&gt; quota: add man page for lfs quota&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 7119836871013eb61b4f276a16a098786994283b&lt;/p&gt;</comment>
                            <comment id="267971" author="gerrit" created="Sun, 19 Apr 2020 08:45:34 +0000"  >&lt;p&gt;Oleg Drokin (green@whamcloud.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/38183/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/38183/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-13353&quot; title=&quot;quickly determine if a quota is exceeded&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-13353&quot;&gt;LU-13353&lt;/a&gt; quota: add man page for lfs quota&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: fba945ca0daa6a442a01f5174a0ba8b6d94294b9&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                                        </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                            <customfield id="customfield_10890" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10030" key="com.atlassian.jira.plugin.system.customfieldtypes:labels">
                        <customfieldname>Epic/Theme</customfieldname>
                        <customfieldvalues>
                                        <label>Performance</label>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10390" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i00vaf:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>