<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 03:16:08 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-15180] OST object missing parent fid</title>
                <link>https://jira.whamcloud.com/browse/LU-15180</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;We have files who&apos;s object are missing parent fid. For example this file:&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;
# lfs getstripe img.0291328.ppm# lfs getstripe 
img.0291328.ppmimg.0291328.ppmlmm_stripe_count: &#160;4lmm_stripe_size: &#160; 1048576lmm_pattern: &#160; &#160; &#160; raid0lmm_layout_gen: &#160; &#160;0lmm_stripe_offset: 68 obdidx  objid  objid  group  &#160; &#160;68  &#160; &#160; &#160; 3671546  &#160; &#160; 0x3805fa  &#160; &#160; &#160; &#160; &#160; &#160; 0  &#160; &#160;80  &#160; &#160; &#160; 5285906  &#160; &#160; 0x50a812  &#160; &#160; &#160; &#160; &#160; &#160; 0  &#160; &#160;97  &#160; &#160; &#160; 5277923  &#160; &#160; 0x5088e3  &#160; &#160; &#160; &#160; &#160; &#160; 0  &#160; 122  &#160; &#160; &#160; 6631005  &#160; &#160; 0x652e5d  &#160; &#160; &#160; &#160; &#160; &#160; 0
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;When we look at the first object on ost68 we see the parrent fid is missing.&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;
# debugfs -c -R &lt;span class=&quot;code-quote&quot;&gt;&quot;stat /O/0/d26/3671546&quot;&lt;/span&gt; /dev/mapper/nbp1_6-OST68
debugfs 1.45.2.wc1 (27-May-2019)
/dev/mapper/nbp1_6-OST68: catastrophic mode - not reading inode or group bitmaps
Inode: 378232   Type: regular    Mode:  01666   Flags: 0x80000
Generation: 1064600594    Version: 0x0000001b:00041e9e
User:  4806   Group:  1128   Project:     0   Size: 2097152
File ACL: 0
Links: 1   Blockcount: 4096
Fragment:  Address: 0    &lt;span class=&quot;code-object&quot;&gt;Number&lt;/span&gt;: 0    Size: 0
 ctime: 0x5d4f4613:00000000 -- Sat Aug 10 15:32:51 2019
 atime: 0x00000000:00000000 -- Wed Dec 31 16:00:00 1969
 mtime: 0x5d4f4613:00000000 -- Sat Aug 10 15:32:51 2019
crtime: 0x5d4f4187:7a7cf08c -- Sat Aug 10 15:13:27 2019
Size of extra inode fields: 32
Extended attributes:
  trusted.lma (64)
  lma: fid=[0x100440000:0x3805fa:0x0] compat=8 incompat=0
  fid: parent=[0:0x0:0x0] stripe=0 stripe_size=0 stripe_count=0
EXTENTS:
(0-511):419245056-419245567
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;How can we fix the object missing parent fid. &lt;/p&gt;</description>
                <environment></environment>
        <key id="66914">LU-15180</key>
            <summary>OST object missing parent fid</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="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="mhanafi">Mahmoud Hanafi</reporter>
                        <labels>
                    </labels>
                <created>Fri, 29 Oct 2021 22:30:40 +0000</created>
                <updated>Tue, 2 Nov 2021 09:04:01 +0000</updated>
                                            <version>Lustre 2.12.4</version>
                                                        <due></due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                                            <comments>
                            <comment id="317098" author="adilger" created="Sun, 31 Oct 2021 17:38:44 +0000"  >&lt;p&gt;Objects that have never been modified do not have their parent FID updated, as they depend on receiving this information from the client on the first write. &lt;/p&gt;

&lt;p&gt;n unused OST object would normally have a size of zero, the timestamps at 1970, and the mode has the SUID and SGID bits set (06000).  However, in this case, none of these conditions are true, so it isn&apos;t clear why the parent FID is missing. There are non-zero UID and GID set, and the file has data, so the only thing I can think of is that the client somehow sent an RPC that did not contain the parent FID in it when the object was first modified.&lt;/p&gt;

&lt;p&gt;Based on the object creation time, it looks like this happened with an older version of Lustre, so it is possible that the root cause is fixed (some RPC sent without the parent FID), but since the SUID/SGID bits are cleared the FID will not be updated. &lt;/p&gt;

&lt;p&gt;As for fixing this issue, I think a few things can be done:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;mount the filesystem s type ldiskfs and &quot;&lt;tt&gt;chmod ug+s /mnt/ost/O/0/d26/3671546&lt;/tt&gt;&quot; for this and other objects, and then modify them in some way from a Lustre client (eg. &lt;tt&gt;chown&lt;/tt&gt; to another GID and back, &lt;tt&gt;touch&lt;/tt&gt; with the file itself as the reference timestamp (timestamps will be updated in both cases)&lt;/li&gt;
	&lt;li&gt;&quot;&lt;tt&gt;lfs_migrate&lt;/tt&gt;&quot; the file to assign new objects (that should be initialized properly (moves potentially a lot of data if many files are affected and also updates timestamps, but does not need an unmount)&lt;/li&gt;
	&lt;li&gt;we can look at writing a patch to detect cases where the parent FID is unset on disk, but an RPC accessing the object includes the FID (most RPCs should), and update it in place. Unlike the UID and GID, a FID of all zeroes is not valid, so it would be possible to automatically detect and fix this case. This would obviously need to wait until the patch is developed and then an update to the modules, so a system downtime before it can be fixed.&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="317146" author="pjones" created="Mon, 1 Nov 2021 17:08:48 +0000"  >&lt;p&gt;Hongchao&lt;/p&gt;

&lt;p&gt;Do you have some suggestions how we could deal with this kind of scenario automatically in the future?&lt;/p&gt;

&lt;p&gt;Peter&lt;/p&gt;</comment>
                            <comment id="317189" author="hongchao.zhang" created="Tue, 2 Nov 2021 09:04:01 +0000"  >&lt;p&gt;Hi,&lt;br/&gt;
the following is the output is my local VMs&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;debugfs 1.45.6.xa7 (20-Apr-2021)
/tmp/lustre-ost1: catastrophic mode - not reading inode or group bitmaps
Inode: 168   Type: regular    Mode:  0666   Flags: 0x80000
Generation: 1033363972    Version: 0x00000001:00000003
User:     0   Group:     0   Project:     0   Size: 10485760
File ACL: 0
Links: 1   Blockcount: 20480
Fragment:  Address: 0    Number: 0    Size: 0
 ctime: 0x6180f40c:00000000 -- Tue Nov  2 16:17:16 2021
 atime: 0x00000000:00000000 -- Thu Jan  1 08:00:00 1970
 mtime: 0x6180f40c:00000000 -- Tue Nov  2 16:17:16 2021
crtime: 0x6180ef1e:0838fe80 -- Tue Nov  2 15:56:14 2021
Size of extra inode fields: 32
Extended attributes:
  trusted.lma (24) = 08 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 02 00 00 00
 00 00 00 00 
  lma: fid=[0x100000000:0x2:0x0] compat=8 incompat=0
  trusted.fid (52)
  fid: parent=[0x200000404:0x1:0x0] stripe=1 stripe_size=1048576 stripe_count=2
EXTENTS:
(0-2559):67584-70143
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;It seems size of &quot;trusted.lma&quot; is different.&lt;/p&gt;

&lt;p&gt;Could you please try to use the latest e2fsprogs (&lt;a href=&quot;https://downloads.whamcloud.com/public/e2fsprogs/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://downloads.whamcloud.com/public/e2fsprogs/&lt;/a&gt;) to try again?&lt;br/&gt;
Thanks&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|i028vb:</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>