<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:09:05 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-7459] Incorrect file count with lfs quota</title>
                <link>https://jira.whamcloud.com/browse/LU-7459</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;We have a process that periodically does a lfs quota throughout the day to monitor the usage on our file system. Recently we have started observing that while the usage numbers are being reported, the number of files that are reported for a given user went from a given number (e.g., 100,000 files) to 0 or 1.&lt;/p&gt;

&lt;p&gt;This has persisted through system reboots and a OS/Lustre update. Once the given user&apos;s file count is reported as 0 or 1 it never changes. However checking the quota for the user&apos;s GID will generate a file count. &lt;/p&gt;

&lt;p&gt;Anecdotally, it appears that only users that are affected are those that have files that have mixed user and group IDs.&lt;/p&gt;

&lt;p&gt;All the normal checks have been performed (i.e., consistency of UID/GID in the password files between the file servers and clients, checking the MDT for ownership, checking file count with ls -l, etc.).  It almost appears that an error condition is being flagged that needs to be cleared.&lt;/p&gt;</description>
                <environment>Toss 2.3-4/2.4-2</environment>
        <key id="33279">LU-7459</key>
            <summary>Incorrect file count with lfs quota</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="4" iconUrl="https://jira.whamcloud.com/images/icons/priorities/minor.svg">Minor</priority>
                        <status id="5" iconUrl="https://jira.whamcloud.com/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="4">Incomplete</resolution>
                                        <assignee username="niu">Niu Yawei</assignee>
                                    <reporter username="jamervi">Joe Mervini</reporter>
                        <labels>
                    </labels>
                <created>Sat, 21 Nov 2015 15:23:53 +0000</created>
                <updated>Fri, 21 Jul 2017 12:45:35 +0000</updated>
                            <resolved>Fri, 21 Jul 2017 12:45:35 +0000</resolved>
                                    <version>Lustre 2.5.4</version>
                                                        <due></due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                                            <comments>
                            <comment id="134158" author="pjones" created="Sat, 21 Nov 2015 16:28:56 +0000"  >&lt;p&gt;Niu&lt;/p&gt;

&lt;p&gt;Could you please advise&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;

&lt;p&gt;Peter&lt;/p&gt;

&lt;p&gt;PS/ It was great to see you in person this week Joe!&lt;/p&gt;</comment>
                            <comment id="134177" author="niu" created="Mon, 23 Nov 2015 03:13:27 +0000"  >&lt;blockquote&gt;
&lt;p&gt; it appears that only users that are affected are those that have files that have mixed user and group IDs.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Could you give an example to illustrate such situation? I don&apos;t quite understand &quot;mixed user and group IDs&quot;&lt;/p&gt;

&lt;p&gt;Could you pick a problematic user and post the output of &quot;lfs quota -u $UID -v $mount&quot; here? And please check the numbers for this user in the &quot;/proc/fs/lustre/osd-ldiskfs/$fsname-MDT0000/quota_slave/acct_user&quot;. Thanks.&lt;/p&gt;</comment>
                            <comment id="134284" author="jamervi" created="Mon, 23 Nov 2015 19:42:05 +0000"  >&lt;p&gt;Here&apos;s a sample of the user&apos;s top level directory (I&apos;ve X&apos;ed out most of the file/dir names):&lt;/p&gt;

&lt;p&gt;total 266&lt;br/&gt;
drwxr-xr-x   7 21371 33073 16384 Sep 14 09:36 3XXXXXXXXX&lt;br/&gt;
drwxr-xr-x   3 21371 33073  4096 May 12  2015 AFXXXXXXXX&lt;br/&gt;
drwxr-xr-x+  5 21371 33073  4096 Jan  7  2013 ArXXXXXXXXX&lt;br/&gt;
drwxr-xr-x   5 21371 33073 36864 Sep 14 09:30 BXXXXXXXXXX&lt;br/&gt;
drwxr-xr-x  14 21371 33073  4096 Jan  6  2015 CXXXXXXXXXXX&lt;br/&gt;
drwxr-xr-x   8 21371 33073  4096 Sep 14 11:17 From_gscratch2&lt;br/&gt;
drwxr-xr-x   3 21371 33073  4096 Aug 19  2014 H2013&lt;br/&gt;
drwxr-xr-x+  2 21371 33073  4096 Mar 12  2013 HXXXXX&lt;br/&gt;
drwxr-xr-x  11 21371 33073  4096 Aug 24  2012 hXXXXXX&lt;br/&gt;
drwxr-xr-x   9 21371 33073  4096 Oct  8  2014 MXXXXXX&lt;br/&gt;
&lt;del&gt;rw&lt;/del&gt;------   1 21371 21371 63681 Sep 14 14:30 MyDiskUsage_09142014&lt;br/&gt;
drwxr-xr-x   3 21371 33073 16384 Sep 14 10:33 NXXXXXXX&lt;br/&gt;
drwxr-xr-x   2 21371 33073  4096 Jun 17 10:53 P_XXXXXXX&lt;br/&gt;
drwxr-xr-x  10 21371 33073  4096 Sep 14 11:45 RXXXXXXX&lt;br/&gt;
drwxr-xr-x   4 21371 33073  4096 Jan 30  2012 Test_codes&lt;br/&gt;
drwxr-xr-x   3 21371 33073  4096 Mar 10  2015 ValTests&lt;br/&gt;
drwxr-xr-x   5 21371 33073 20480 Sep 14 14:27 ZXXXXXX&lt;/p&gt;

&lt;p&gt;Here is the output from the MDS:&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;root@fmds1 quota_slave&amp;#93;&lt;/span&gt;# grep -A1 21371 acct_user&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;id:      21371&lt;br/&gt;
  usage:   
{ inodes:                    1, kbytes:                    0 }
&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;root@fmds1 quota_slave&amp;#93;&lt;/span&gt;# grep -A1 21371 acct_group&lt;/p&gt;&lt;/li&gt;
	&lt;li&gt;id:      21371&lt;br/&gt;
  usage:   
{ inodes:                 2238, kbytes:                  180 }
&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;root@fmds1 quota_slave&amp;#93;&lt;/span&gt;# grep -A1 33073 acct_group&lt;/p&gt;&lt;/li&gt;
	&lt;li&gt;id:      33073&lt;br/&gt;
  usage:   
{ inodes:               192927, kbytes:                20400 }&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;I was going to get a word count on files in the directory using find on the UID but there were a sufficient number of files that after more than 1.5 hours it was still working and I terminated the process.&lt;/p&gt;

&lt;p&gt;I am also attaching the output from the lfs quota command as you requested. &lt;/p&gt;</comment>
                            <comment id="134342" author="niu" created="Tue, 24 Nov 2015 02:59:32 +0000"  >&lt;p&gt;Looks the inode accounting on backend fs is broken somehow, I have no idea why it&apos;s broken so far, but I think a quotacheck may fix it. (disable then re-enable quota feature on MDT device by tune2fs, it requires MDT offline)&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;However checking the quota for the user&apos;s GID will generate a file count.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Could you elaborate on this? What do you mean &quot;checking the quota for the user&apos;s GID&quot;?&lt;/p&gt;</comment>
                            <comment id="134345" author="jamervi" created="Tue, 24 Nov 2015 04:08:45 +0000"  >&lt;p&gt;That is correct. When I run &lt;/p&gt;

&lt;p&gt;lfs quota - g &amp;lt;GID&amp;gt; -v &amp;lt;file system&amp;gt; &lt;/p&gt;

&lt;p&gt;I do get results for whatever GID exists in the directory that is having problems with the UID. So in the example of the top level directory above I get the following outputs: (Note that in our environment by default we assign the same value to both UID and GID for our users.)&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;lfs quota -g 21371 /fscratch&lt;br/&gt;
Disk quotas for group 21371 (gid 21371):&lt;br/&gt;
     Filesystem  kbytes   quota   limit   grace   files   quota   limit   grace&lt;br/&gt;
      /fscratch 275840572       0       0       -    2238       0       0       -&lt;/li&gt;
	&lt;li&gt;lfs quota -g 33073 /fscratch&lt;br/&gt;
Disk quotas for group 33073 (gid 33073):&lt;br/&gt;
     Filesystem  kbytes   quota   limit   grace   files   quota   limit   grace&lt;br/&gt;
      /fscratch 20500875399       0       0       -  192927       0       0       -&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;And once again for illustration:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;lfs quota -u 21371 /fscratch&lt;br/&gt;
Disk quotas for user 21371 (uid 21371):&lt;br/&gt;
     Filesystem  kbytes   quota   limit   grace   files   quota   limit   grace&lt;br/&gt;
      /fscratch 20773618792       0       0       -       1       0       0       -&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;We have an scheduled outage that might permit us to do a quota check coming up the 2nd week of December. &lt;/p&gt;</comment>
                            <comment id="134767" author="jamervi" created="Mon, 30 Nov 2015 18:40:58 +0000"  >&lt;p&gt;Just so I&apos;m clear, what is the process for disabling and re-enabling quotas on the newer (&amp;gt;2.4.0) lustre releases. The only references that I find in the manual for using tunefs.lustre is for enabling quotas after upgrading for a version of lustre older than 2.4.  I&apos;m guessing there&apos;s a --noquota parameter or something similar but there is no procedure defined. I don&apos;t know whether it&apos;s just a matter of running the tunefs.lustre back to back or if a mount is required so if you can provide that detail I&apos;d appreciate it.&lt;/p&gt;</comment>
                            <comment id="134821" author="niu" created="Tue, 1 Dec 2015 02:39:29 +0000"  >&lt;p&gt;The instructions of enable/disable quota is described in manual &quot;21.2.1. Enabling Disk Quotas (Lustre Software Release 2.4 and later)&quot;:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;lctl conf_param fsname.quota.ost|mdt=u|g|ug|none
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Using tunefs.lustre (or tune2fs) is to disable/enable quota feature on the device, which is used to enable quota accounting on backend fs.&lt;/p&gt;</comment>
                            <comment id="134904" author="jamervi" created="Tue, 1 Dec 2015 18:52:53 +0000"  >&lt;p&gt;Oh - sorry, I misread your comment above regarding tune2fs. I get that now.&lt;/p&gt;

&lt;p&gt;My question is: Is a mount required between the time you set mdt=none  and when you set it back to mdt=ug? And when it is switched back on can I simply bring lustre back up and whatever process takes place is done in the background?&lt;/p&gt;</comment>
                            <comment id="134967" author="niu" created="Wed, 2 Dec 2015 07:29:10 +0000"  >&lt;p&gt;No, enabling/disabling quota by &quot;lctl conf_param&quot; doesn&apos;t require umount/mount, but it do need some small amount of time to let the MGS spread the new configuration onto all servers. (It&apos;s same as other parameter settings done by &quot;lctl conf_param&quot;), you can verify if the new configuration is taking effect by checking the proc files on each server targets. (see the quota_slave.info)&lt;/p&gt;</comment>
                            <comment id="202339" author="niu" created="Mon, 17 Jul 2017 13:55:59 +0000"  >&lt;p&gt;Joe, is it fixed by enabling/disabling quota feature?&lt;/p&gt;</comment>
                            <comment id="203060" author="pjones" created="Fri, 21 Jul 2017 12:45:35 +0000"  >&lt;p&gt;It does not seem as if this remains a concern&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="33303">LU-7467</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="19691" name="lfs_quota.txt" size="6609" author="jamervi" created="Mon, 23 Nov 2015 19:43:46 +0000"/>
                    </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_10490" key="com.atlassian.jira.plugin.system.customfieldtypes:datepicker">
                        <customfieldname>End date</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 2 Dec 2015 15:23:53 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10030" key="com.atlassian.jira.plugin.system.customfieldtypes:labels">
                        <customfieldname>Epic/Theme</customfieldname>
                        <customfieldvalues>
                                        <label>Quota</label>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10390" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hzxtxr:</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>
                                                                                            <customfield id="customfield_10060" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Severity</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10022"><![CDATA[3]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10493" key="com.atlassian.jira.plugin.system.customfieldtypes:datepicker">
                        <customfieldname>Start date</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 23 Nov 2015 15:23:53 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    </customfields>
    </item>
</channel>
</rss>