<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:10:22 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-7607] Preserve inode number after MDT migration </title>
                <link>https://jira.whamcloud.com/browse/LU-7607</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;During migration, the MDT FID of the migrated file is changed to reflect the new MDT the inode is stored on. However, it would be possible to keep the user-visible inode constant after migration by storing the original FID into the LMA as a new field. If present, this saved FID could be used to generate the inode number for userspace instead of the current FID so that it doesn&apos;t affect user tools such as backups. &lt;/p&gt;</description>
                <environment></environment>
        <key id="33845">LU-7607</key>
            <summary>Preserve inode number after MDT migration </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="laisiyao">Lai Siyao</assignee>
                                    <reporter username="adilger">Andreas Dilger</reporter>
                        <labels>
                            <label>dne3</label>
                    </labels>
                <created>Thu, 24 Dec 2015 10:37:57 +0000</created>
                <updated>Wed, 4 Oct 2023 18:28:26 +0000</updated>
                                            <version>Lustre 2.8.0</version>
                                                        <due></due>
                            <votes>0</votes>
                                    <watches>12</watches>
                                                                            <comments>
                            <comment id="137837" author="adilger" created="Mon, 4 Jan 2016 19:05:55 +0000"  >&lt;p&gt;Di, what do you think about this idea? It should be possible to add this as a &quot;compat&quot; feature to the LMA only if the inode is migrated.  Since the internal references are all using the FID, the inode number displayed by &quot;ls&quot; and &quot;stat&quot; don&apos;t really matter.&lt;/p&gt;</comment>
                            <comment id="137861" author="di.wang" created="Mon, 4 Jan 2016 22:00:31 +0000"  >&lt;p&gt;Hmm, as long as we do not use this original FID for internal references, it should be ok. As for backup, are you trying to temporarily resolve &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-6866&quot; title=&quot;MDT file migration is incompatible with HSM&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-6866&quot;&gt;&lt;del&gt;LU-6866&lt;/del&gt;&lt;/a&gt;? i.e. copy tool will always use this original FID as the identifier to locate the file in the archive? then we probably need record this original FID into changelog, or the copy tool needs to be changed to retrieve FID from LMA?&lt;/p&gt;</comment>
                            <comment id="137899" author="adilger" created="Tue, 5 Jan 2016 03:48:05 +0000"  >&lt;p&gt;I hadn&apos;t thought about keeping the whole FID, just the original inode number for exposure to userspace for tools like tar or other backup tools that depend on the inode number. Since we won&apos;t be using this number internally, only for exposure via stat() and readdir() it doesn&apos;t matter if it is different than the real FID.&lt;/p&gt;

&lt;p&gt;Do you think there is value to keep the original FID?&lt;/p&gt;</comment>
                            <comment id="137900" author="adilger" created="Tue, 5 Jan 2016 03:51:40 +0000"  >&lt;p&gt;For the HSM FID problem I think a different solution is needed. Instead of storing the FID in the archive, it is better to store the archive identifier (UUID or whatever) in the Lustre inode as a part of the composite layout. That allows storing multiple versions of the file in the archive, as well as allowing partial HSM file restore with composite files.  &lt;/p&gt;</comment>
                            <comment id="137906" author="di.wang" created="Tue, 5 Jan 2016 06:34:34 +0000"  >&lt;p&gt;Actually I am a bit confused now. Since migration will keep namespace consistency, so either stat() or readdir() should return the real (correct) ino. I do not know why should we keep the original ino (or FID) after migration? I probably miss sth. Could you please explain the purpose of keeping consistent ino here? why these external tool needs consistency ino? Thanks.&lt;/p&gt;</comment>
                            <comment id="137923" author="adilger" created="Tue, 5 Jan 2016 10:56:05 +0000"  >&lt;p&gt;The point of keeping a consistent inode number is that some tools, such as backups, depend on the inode number to remain the same so they can do incremental backups. Otherwise, they can&apos;t tell the difference between migrate changing the inode number, or the file being deleted and a new file created with the same name.  NFS servers in userspace would also use the inode number. &lt;/p&gt;

&lt;p&gt;NFS file handles generated in the kernel by Lustre are the same, but since we encode the FID into the Lustre file handle this wouldn&apos;t help - we&apos;d need to allow the original FID to be looked up on the original MDT with a redirection to the new FID. &lt;/p&gt;</comment>
                            <comment id="137977" author="di.wang" created="Tue, 5 Jan 2016 18:33:21 +0000"  >&lt;p&gt;I see. Thanks. Hmm for stat() we only need fill the original FID into mdt_body of getattr request, and cache it in ll_inode_info, and fill it to stat-&amp;gt;ino, But for readdir(),  it will read from the directory entries directly, if we inject LMA original ino checking in this process, it might slow down the readdir a lot. &lt;/p&gt;
</comment>
                            <comment id="259161" author="adilger" created="Wed, 4 Dec 2019 15:37:43 +0000"  >&lt;p&gt;Lai, I recall not too long ago we discussed the ability to save the old FID after migration.  Is there anything that needs to be updated in this ticket to describe your proposal?&lt;/p&gt;</comment>
                            <comment id="259183" author="laisiyao" created="Thu, 5 Dec 2019 08:58:47 +0000"  >&lt;p&gt;IMO the overhead of reserving inode number is quite high, and rather than saving the original FID, I&apos;d prefer to add an option to keep file inode untouched in migration, that is to say, for existing sub files, inode won&apos;t be migrated, but namespace updated.&lt;/p&gt;

&lt;p&gt;If we still prefer migrating inode, I&apos;d suggest drop the support of preserving inode number, but add FID mapping to support NFS export: a special OI file will be added, which contains mappings from original FID to new FID, and in lu_object_find() it will lookup this&lt;br/&gt;
OI file, if new FID is found, it&apos;s replied client with -EREMOTE, and client will resend the request with new FID to the correct MDT, for some request like rename, client may need to retry several times if more than involved file are migrated. There will be a garbage collect thread on server to remove aged mapping from this OI file.&lt;/p&gt;</comment>
                            <comment id="259219" author="bevans" created="Thu, 5 Dec 2019 16:37:09 +0000"  >&lt;p&gt;Could we emit the changes out the changelog?&#160; If someone wants to keep track of changes of fid/inode through time, they could have a listener set up to catch/archive them.&lt;/p&gt;

&lt;p&gt;The various calls to find a FID, etc. could simply call up to the userspace service to get historical info.&lt;/p&gt;</comment>
                            <comment id="259222" author="adilger" created="Thu, 5 Dec 2019 16:53:09 +0000"  >&lt;p&gt;Ben, there is a already a &lt;tt&gt;MIGRT&lt;/tt&gt; ChangeLog record for inode migration. &lt;/p&gt;</comment>
                            <comment id="259226" author="adilger" created="Thu, 5 Dec 2019 17:05:13 +0000"  >&lt;p&gt;Lai, it definitely makes sense to have an option to migrate the parent directory and filenames without migrating the file inodes. In that case there is no need for this feature to preserve the inode numbers, since they won&apos;t change.  &lt;/p&gt;

&lt;p&gt;This is only needed in the case where the inode is moved to a new MDT, which can be needed in case of removing an MDT, or if an MDT is very full, not in the normal space balancing case. &lt;/p&gt;

&lt;p&gt;I think storing the original FID in the inode is not too hard, and it will always be unique. Adding the old and new FID in the OI table is also useful. We can&apos;t return -EREMOTE to NFS clients, but it can be handled by the Lustre client so that it doesn&apos;t return -ESTALE to NFS. &lt;/p&gt;</comment>
                            <comment id="259317" author="laisiyao" created="Fri, 6 Dec 2019 01:15:49 +0000"  >&lt;p&gt;Andreas, okay.&lt;/p&gt;</comment>
                            <comment id="267104" author="adilger" created="Wed, 8 Apr 2020 00:24:08 +0000"  >&lt;p&gt;I was looking at whether we could use the FID stored in the LOV EA to preserve the &quot;original&quot; inode number of the file. It seems that the FID is stored in the LOV EA in each component and is also preserved over OST and MDT migration:&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;tests# lfs setstripe -E 1M -L mdt -E 1G -c 3 -E eof /mnt/testfs/dir1/tt
tests# dd if=/dev/zero of=/mnt/testfs/dir1/tt bs=1M count=2
tests# lfs path2fid /mnt/testfs/dir1/tt
[0x200001b72:0x10c07:0x0]
tests# lfs getstripe -v /mnt/testfs/dir1/tt
components:
  - lcme_id:             1
    lcme_extent.e_start: 0
    lcme_extent.e_end:   1048576
    sub_layout:
      lmm_seq:           0x200001b72
      lmm_object_id:     0x10c07
      lmm_fid:           [0x200001b72:0x10c07:0x0]
      lmm_stripe_count:  1
  - lcme_id:             2
    lcme_extent.e_start: 1048576
    lcme_extent.e_end:   1073741824
    sub_layout:
      lmm_seq:           0x200001b72
      lmm_object_id:     0x10c07
      lmm_fid:           [0x200001b72:0x10c07:0x0]
  - lcme_id:             3
    lcme_extent.e_start: 1073741824
    lcme_extent.e_end:   EOF
    sub_layout:
      lmm_seq:           0x200001b72
      lmm_object_id:     0x10c07
      lmm_fid:           [0x200001b72:0x10c07:0x0]
tests# lfs migrate -c 3 /mnt/testfs/dir1/tt
tests# lfs getstripe -v /mnt/testfs/dir1/tt
lmm_seq:           0x200001b72
lmm_object_id:     0x10c07
lmm_fid:           [0x200001b72:0x10c07:0x0]
lmm_stripe_count:  3
tests# lfs migrate -m1 /mnt/testfs/dir1
tests# lfs path2fid /mnt/testfs/dir1/tt
[0x240001b70:0x2743:0x0]
tests# lfs getstripe -v /mnt/testfs/dir1/tt
lmm_seq:           0x200001b72
lmm_object_id:     0x10c07
lmm_fid:           [0x200001b72:0x10c07:0x0]
lmm_stripe_count:  3
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;There is a bug (&lt;a href=&quot;https://jira.whamcloud.com/browse/LU-13426&quot; title=&quot;&amp;quot;lfs migrate&amp;quot; on DoM component clobbers LOV EA FID&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-13426&quot;&gt;&lt;del&gt;LU-13426&lt;/del&gt;&lt;/a&gt;) if there is a DOM component in the layout that clobbers the FID, but DOM migration is relatively new and can be fixed to preserve the FID properly.&lt;/p&gt;</comment>
                            <comment id="322123" author="adilger" created="Sun, 9 Jan 2022 17:50:50 +0000"  >&lt;p&gt;&quot;Lai Siyao &amp;lt;lai.siyao@whamcloud.com&amp;gt;&quot; uploaded a new patch &lt;a href=&quot;https://review.whamcloud.com/38135&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/38135&lt;/a&gt;&lt;br/&gt;
Subject: &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; dne: add FID map interfaces&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 9&lt;br/&gt;
Commit: 2119206d30f6d84ac1974d9c7d3b24bc25eee1e4&lt;/p&gt;</comment>
                            <comment id="322124" author="adilger" created="Sun, 9 Jan 2022 17:51:50 +0000"  >&lt;p&gt;&quot;Lai Siyao &amp;lt;lai.siyao@whamcloud.com&amp;gt;&quot; uploaded a new patch &lt;a href=&quot;https://review.whamcloud.com/38233&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/38233&lt;/a&gt;&lt;br/&gt;
Subject: &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; dne: support FID map&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 7&lt;br/&gt;
Commit: 0f7af1befc6de458acd84b817c535938f839c808&lt;/p&gt;</comment>
                            <comment id="322125" author="adilger" created="Sun, 9 Jan 2022 17:58:24 +0000"  >&lt;p&gt;&quot;Lai Siyao &amp;lt;lai.siyao@whamcloud.com&amp;gt;&quot; uploaded a new patch &lt;a href=&quot;https://review.whamcloud.com/38285&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/38285&lt;/a&gt;&lt;br/&gt;
Subject: &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; mdd: add fidmap reclaim thread&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 4&lt;br/&gt;
Commit: 3068abb9c2e5f85eb76f9e94c7469a761af5f86a&lt;/p&gt;</comment>
                            <comment id="322126" author="adilger" created="Sun, 9 Jan 2022 18:01:00 +0000"  >&lt;p&gt;Add in links to existing patches under this ticket, not sure why they weren&apos;t previously created. &lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="31126">LU-6866</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="16851">LU-2430</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="58682">LU-13426</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="65865">LU-14975</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="34519">LU-7749</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="62994">LU-14465</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="54246">LU-11753</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="53163">LU-11306</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="52253">LU-11025</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </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_10092" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>EX-4481</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10390" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hzxwrb:</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>