<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:42:44 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-11306] Moving files from one MDT to another does not free inodes on source MDT</title>
                <link>https://jira.whamcloud.com/browse/LU-11306</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;When moving files that are on MDT0 to a directory residing on MDT1, the corresponding inodes on MDT are not deallocated.&lt;/p&gt;

&lt;p&gt;Here is what I see:&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@lustre211cli test]# for file in {1..999}; do echo $file &amp;gt; $file; done
[root@lustre211cli test]# lfs df -i
UUID                      Inodes       IUsed       IFree IUse% Mounted on
test-MDT0000_UUID         419432        1262      418170   1% /test[MDT:0]
test-MDT0001_UUID         419432         248      419184   1% /test[MDT:1]
test-OST0000_UUID         737280        1389      735891   0% /test[OST:0]

filesystem_summary:       737401        1510      735891   0% /test

[root@lustre211cli test]# lfs mkdir -i 1 dir2
[root@lustre211cli test]# mv {1..999} dir2/
[root@lustre211cli test]# lfs df -i
UUID                      Inodes       IUsed       IFree IUse% Mounted on
test-MDT0000_UUID         419432        1265      418167   1% /test[MDT:0]
test-MDT0001_UUID         419432        1249      418183   1% /test[MDT:1]
test-OST0000_UUID         737280        1389      735891   0% /test[OST:0]

filesystem_summary:       738405        2514      735891   0% /test

[root@lustre211cli test]# ls
dir1  dir2
[root@lustre211cli test]# ls dir1
[root@lustre211cli test]# sync
[root@lustre211cli test]# echo 3 &amp;gt; /proc/sys/vm/drop_caches
[root@lustre211cli test]# lfs df -i
UUID                      Inodes       IUsed       IFree IUse% Mounted on
test-MDT0000_UUID         419432        1265      418167   1% /test[MDT:0]
test-MDT0001_UUID         419432        1249      418183   1% /test[MDT:1]
test-OST0000_UUID         737280        1389      735891   0% /test[OST:0]

filesystem_summary:       738405        2514      735891   0% /test
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The inodes used on MDT0 never decrease, even after umount/mount or by umounting the MDT from the MDS.&lt;/p&gt;

&lt;p&gt;When performing an e2fsck (1.42.13.wc5) on MDT0, the behaviour changes between 2.10.4 and 2.11.54:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;With 2.10.4, e2fsck will find as many unattached inodes as there were files moved&lt;/li&gt;
	&lt;li&gt;With 2.11.54, e2fsck will not find anything&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;I attach the complete debug logs from the client and server taken during this manipulation.&lt;/p&gt;</description>
                <environment>RHEL 7.5, kernel 3.10.0-862.11.6.el7.x86_64&lt;br/&gt;
Seen with 2.10.4 and master (325e23899aa38de32ec00b19ed675bcc64c6e5c8)&lt;br/&gt;
ldiskfs MDTs.</environment>
        <key id="53163">LU-11306</key>
            <summary>Moving files from one MDT to another does not free inodes on source MDT</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="6">Not a Bug</resolution>
                                        <assignee username="wc-triage">WC Triage</assignee>
                                    <reporter username="spiechurski">Sebastien Piechurski</reporter>
                        <labels>
                    </labels>
                <created>Thu, 30 Aug 2018 15:17:18 +0000</created>
                <updated>Fri, 31 Aug 2018 16:48:16 +0000</updated>
                            <resolved>Fri, 31 Aug 2018 16:48:16 +0000</resolved>
                                    <version>Lustre 2.10.4</version>
                                                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                            <comments>
                            <comment id="232828" author="adilger" created="Thu, 30 Aug 2018 19:42:39 +0000"  >&lt;p&gt;Note that just renaming the file does not cause the inode to be moved, only the name is moved to the new MDT.  In order to keep ext4 consistent (as you see with the avoidance of e2fsck errors), an &quot;agent&quot; inode needs to be added on the new MDT so that the directory entry has something to point at.  If the inode were also moved to the target MDT with a rename, this would cause a number of other problems, such as changing the userspace-visible inode number (due to the new FID being assigned to map to the new MDT), breaking the DLM locking (which is also tied to the FID), break open file handles (also tied to the FID), and hard links to the file.&lt;/p&gt;

&lt;p&gt;There is an open ticket (&lt;a href=&quot;https://jira.whamcloud.com/browse/LU-7607&quot; title=&quot;Preserve inode number after MDT migration &quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-7607&quot;&gt;LU-7607&lt;/a&gt;) for implementing a mechanism to preserve at least the inode number across MDTs, which would allow the common case of closed, nlink = 1 inodes to be transparently moved to another MDT, but this has not been implemented yet.&lt;/p&gt;

&lt;p&gt;So, for the time being the behaviour you observe is working as intended.&lt;/p&gt;</comment>
                            <comment id="232859" author="spiechurski" created="Fri, 31 Aug 2018 16:42:35 +0000"  >&lt;p&gt;Hi Andreas,&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;Ok, looks like I did not do my homework ...&lt;/p&gt;

&lt;p&gt;Next time, I&apos;ll read the HLD or the source code before submitting this kind of thing ...&#160;&lt;img class=&quot;emoticon&quot; src=&quot;https://jira.whamcloud.com/images/icons/emoticons/biggrin.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;Thanks for the explanation. You can close this ticket.&lt;/p&gt;</comment>
                            <comment id="232860" author="adilger" created="Fri, 31 Aug 2018 16:48:16 +0000"  >&lt;p&gt;Sebastien, I think your question was perfectly reasonable, and I wish we had already implemented the automatic inode migration functionality. Until that happens, we need the extra overhead to ensure that the on-disk format remains consistent. &lt;/p&gt;

&lt;p&gt;I don&apos;t think cross-MDT rename is a common case for Lustre, so this shouldn&apos;t cause too much overhead. &lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="49082">LU-10192</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="33845">LU-7607</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="30970" name="move_metadata_debug.tar.xz" size="16547068" author="spiechurski" created="Thu, 30 Aug 2018 15:14:17 +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_10390" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i001if:</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>
                                                                                                                                                                                                                                                                                                                                                        </customfields>
    </item>
</channel>
</rss>