<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:42:58 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-4465] Quota doesn&apos;t work right after MDT online addition</title>
                <link>https://jira.whamcloud.com/browse/LU-4465</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;During the testing of MDT online addition, I found quota doesn&apos;t work as expect. Here is the test steps:&lt;/p&gt;

&lt;p&gt;1. format a system(ldiskfs) with only one MDT&lt;br/&gt;
2. set inode quota to 2048&lt;br/&gt;
3. touch some files&lt;br/&gt;
4. keep the system on, format and add the second MDT, quota on new MDT is enabled&lt;br/&gt;
5. create a dir on the sec MDT and it shows quota exceeded when trying to touch a file under it &lt;/p&gt;

&lt;p&gt;I also verified if the system is setup with 2 MDT from the beginning, quota works as expect.&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;[root@client-18 tests]# lfs quota -v -u quota_usr /mnt/lustre
ustre
Disk quotas for user quota_usr (uid 60000):
     Filesystem  kbytes   quota   limit   grace   files   quota   limit   grace
    /mnt/lustre      56       0   10240       -    1025       0    2048       -
lustre-MDT0000_UUID
                     56       -       0       -    1025       -    2048       -
lustre-MDT0001_UUID
                      0       -       0       -       0       -       0       -
lustre-OST0000_UUID
                      0       -       0       -       -       -       -       -
Total allocated inode limit: 2048, total allocated block limit: 0
[root@client-18 tests]# lfs quota -v -g quota_usr /mnt/lustre
Disk quotas for group quota_usr (gid 60000):
     Filesystem  kbytes   quota   limit   grace   files   quota   limit   grace
    /mnt/lustre      56       0   10240       -    1025       0    2048       -
lustre-MDT0000_UUID
                     56       -       0       -    1025       -    2048       -
lustre-MDT0001_UUID
                      0       -       0       -       0       -       0       -
lustre-OST0000_UUID
                      0       -       0       -       -       -       -       -
Total allocated inode limit: 2048, total allocated block limit: 0

[root@client-18 tests]# lfs mkdir -i 1 /mnt/lustre/test2
/mnt/lustre/test2
[root@client-18 tests]# chown quota_usr.quota_usr /mnt/lustre/test2
[root@client-18 tests]# lfs quota -v -g quota_usr /mnt/lustre
Disk quotas for group quota_usr (gid 60000):
     Filesystem  kbytes   quota   limit   grace   files   quota   limit   grace
    /mnt/lustre      60       0   10240       -    1026       0    2048       -
lustre-MDT0000_UUID
                     56       -       0       -    1025       -    2048       -
lustre-MDT0001_UUID
                      4       -       0       -       1*      -       1       -
lustre-OST0000_UUID
                      0       -       0       -       -       -       -       -
Total allocated inode limit: 2049, total allocated block limit: 0
[root@client-18 tests]# touch /mnt/lustre/test2/b
[root@client-18 tests]# lfs quota -v -g quota_usr /mnt/lustre
Disk quotas for group quota_usr (gid 60000):
     Filesystem  kbytes   quota   limit   grace   files   quota   limit   grace
    /mnt/lustre      60       0   10240       -    1026       0    2048       -
lustre-MDT0000_UUID
                     56       -       0       -    1025       -    2048       -
lustre-MDT0001_UUID
                      4       -       0       -       1*      -       1       -
lustre-OST0000_UUID
                      0       -       0       -       -       -       -       -
Total allocated inode limit: 2049, total allocated block limit: 0
[root@client-18 tests]# ./runas -u 60000 -g 60000 touch /mnt/lustre/test2/b
running as uid/gid/euid/egid 60000/60000/60000/60000, groups:
 [touch] [/mnt/lustre/test2/b]
touch: cannot touch `/mnt/lustre/test2/b&apos;: Disk quota exceeded
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
        <key id="22692">LU-4465</key>
            <summary>Quota doesn&apos;t work right after MDT online addition</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="6" iconUrl="https://jira.whamcloud.com/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="6">Not a Bug</resolution>
                                        <assignee username="wc-triage">WC Triage</assignee>
                                    <reporter username="sarah">Sarah Liu</reporter>
                        <labels>
                    </labels>
                <created>Fri, 10 Jan 2014 02:57:25 +0000</created>
                <updated>Tue, 14 Jan 2014 17:35:08 +0000</updated>
                            <resolved>Tue, 14 Jan 2014 17:35:08 +0000</resolved>
                                    <version>Lustre 2.6.0</version>
                                                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                            <comments>
                            <comment id="74724" author="niu" created="Fri, 10 Jan 2014 08:47:38 +0000"  >&lt;p&gt;The total limits is 2k inodes, and the least qunit is 1k, and 1025 files were created on MDT1, so MDT1 has used up the limit (2 qunits) already.&lt;/p&gt;

&lt;p&gt;I&apos;m wondering why the test can pass when the 2 MDTs both start from the beginning, could you post the output of &quot;lfs quota -v&quot; for that test as well? Thanks.&lt;/p&gt;</comment>
                            <comment id="74744" author="sarah" created="Fri, 10 Jan 2014 18:30:36 +0000"  >&lt;p&gt;Hello Niu,&lt;/p&gt;

&lt;p&gt;So you mean the case with MDT online addition is right?&lt;/p&gt;

&lt;p&gt;And here is the &quot;lfs quota -v&quot; with 2 MDTs both start from the beginning:&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;[root@client-18 tests]# lfs quota -v -g quota_usr /mnt/lustre
Disk quotas for group quota_usr (gid 60000):
     Filesystem  kbytes   quota   limit   grace   files   quota   limit   grace
    /mnt/lustre      60       0   10240       -    1027       0    2048       -
lustre-MDT0000_UUID
                     56       -       0       -    1025       -    1537       -
lustre-MDT0001_UUID
                      4       -       0       -       2       -     511       -
lustre-OST0000_UUID
                      0       -       0       -       -       -       -       -
Total allocated inode limit: 2048, total allocated block limit: 0
[root@client-18 tests]# lfs quota -v -u quota_usr /mnt/lustre
Disk quotas for user quota_usr (uid 60000):
     Filesystem  kbytes   quota   limit   grace   files   quota   limit   grace
    /mnt/lustre      60       0   10240       -    1027       0    2048       -
lustre-MDT0000_UUID
                     56       -       0       -    1025       -    1537       -
lustre-MDT0001_UUID
                      4       -       0       -       2       -     511       -
lustre-OST0000_UUID
                      0       -       0       -       -       -       -       -
Total allocated inode limit: 2048, total allocated block limit: 0
[root@client-18 tests]# 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="74803" author="niu" created="Mon, 13 Jan 2014 03:59:53 +0000"  >&lt;blockquote&gt;
&lt;p&gt;So you mean the case with MDT online addition is right?&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;I think so, there are only 2 least qunit limits, and they all used by MDT0, so MDT1 won&apos;t able to create files.&lt;/p&gt;

&lt;p&gt;I see why the test can pass on 2 MDTs (from beginning): the quota master would try to expand each quota acquire/pre-acquire request, and the expanded count vary with quota slave count. In your test case: 2k limit, two MDTs, MDT0 creating 1025 files will happen to alloc 1537 limit on MDT0, so that limit will not be used up fortunately, but if you try to creating 1026 files on MDT0, then all limit will be used up, and the test will fail.&lt;/p&gt;

&lt;p&gt;I think the test could be changed a little bit:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;creating less files (&amp;lt; 1k) files on MDT0; or&lt;/li&gt;
	&lt;li&gt;setting higher limit(&amp;gt;= 3k);&lt;/li&gt;
&lt;/ul&gt;

</comment>
                            <comment id="74834" author="sarah" created="Mon, 13 Jan 2014 17:39:41 +0000"  >&lt;p&gt;thank for the explanation, I will try again.&lt;/p&gt;</comment>
                    </comments>
                    <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_10390" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hzwcjr:</customfieldvalue>

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