<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 03:20:10 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-15651] LFSCK can assign incompatible PFL stripes to a PLAIN layout</title>
                <link>https://jira.whamcloud.com/browse/LU-15651</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;This corruption appeared in production after applying manually some layout corrections for CEA-5/&lt;a href=&quot;https://jira.whamcloud.com/browse/LU-13535&quot; title=&quot;Files truncated/corruption due to lfsck&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-13535&quot;&gt;&lt;del&gt;LU-13535&lt;/del&gt;&lt;/a&gt;/&lt;a href=&quot;https://jira.whamcloud.com/browse/LU-14837&quot; title=&quot;Layout corruption (lmm_oi) inside mdd_swap_layouts&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-14837&quot;&gt;LU-14837&lt;/a&gt;. This resulted to have different stripes versions (PFL and plain) for a file.&lt;/p&gt;

&lt;p&gt;Here a reproducer:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;create a file with plain layout:&lt;/li&gt;
	&lt;li&gt;take a LVM snapshot of the MDT&lt;/li&gt;
	&lt;li&gt;migrate the file to PFL layout&lt;/li&gt;
	&lt;li&gt;mount the snapshot&lt;/li&gt;
	&lt;li&gt;run LFSCK to regenerate old plain stripes&lt;/li&gt;
	&lt;li&gt;mount the real target&lt;/li&gt;
	&lt;li&gt;run lfsck to regenerate the PFL stripes&lt;/li&gt;
	&lt;li&gt;run lfsck in orphan mode -&amp;gt; file layout is corrupted (layout is modified to plain), OST stripe are not removed&lt;/li&gt;
	&lt;li&gt;re-run lfsck in orphan mode -&amp;gt; file layout is corrupted, some PFL stripes are associated to the file plain layout.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;Here the details:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;create a file with plain layout:
&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;lmm_stripe_count:  2
lmm_stripe_size:   1048576
lmm_pattern:       raid0
lmm_layout_gen:    0
lmm_stripe_offset: 0
        obdidx           objid           objid           group
             0               2            0x2                0
             1               2            0x2                0
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
	&lt;li&gt;take a LVM snapshot of the MDT:
&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@mds1 ~]# lvcreate -L 500M -s -n mdt1_snap /dev/VGLustre/mdt1
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
	&lt;li&gt;migrate the file to PFL layout
&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 client]# lfs migrate -E1M -c1 -E-1 -c2 -S4M test
[root@client client]# lfs getstripe test
test
  lcm_layout_gen:    4
  lcm_mirror_count:  1
  lcm_entry_count:   2
    lcme_id:             1
    lcme_mirror_id:      0
    lcme_flags:          init
    lcme_extent.e_start: 0
    lcme_extent.e_end:   1048576
      lmm_stripe_count:  1
      lmm_stripe_size:   1048576
      lmm_pattern:       raid0
      lmm_layout_gen:    0
      lmm_stripe_offset: 0
      lmm_objects:
      - 0: { l_ost_idx: 0, l_fid: [0x100000000:0x3:0x0] }

    lcme_id:             2
    lcme_mirror_id:      0
    lcme_flags:          init
    lcme_extent.e_start: 1048576
    lcme_extent.e_end:   EOF
      lmm_stripe_count:  2
      lmm_stripe_size:   4194304
      lmm_pattern:       raid0
      lmm_layout_gen:    0
      lmm_stripe_offset: 1
      lmm_objects:
      - 0: { l_ost_idx: 1, l_fid: [0x100010000:0x3:0x0] }
      - 1: { l_ost_idx: 0, l_fid: [0x100000000:0x4:0x0] }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
	&lt;li&gt;mount the snapshot
&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@mds1 ~]# umount /media/lustrefs/client-mds1
[root@mds1 ~]#  mount -tlustre /dev/mapper/VGLustre-mdt1_snap /media/lustrefs/client-mds1/

[root@client client]# ll
ls: cannot access test: No such file or directory
total 0
-????????? ? ? ? ?            ? test
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
	&lt;li&gt;run LFSCK to regenerate old plain stripes
&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@mds1 ~]# lctl clear; lctl lfsck_start -A -tall -C -c -r
[root@client client]# lfs getstripe test
test
lmm_stripe_count:  2
lmm_stripe_size:   1048576
lmm_pattern:       raid0
lmm_layout_gen:    0
lmm_stripe_offset: 0
        obdidx           objid           objid           group
             0               2            0x2                0
             1               2            0x2                0
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
	&lt;li&gt;mount the real target
&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@mds1 ~]# umount /media/lustrefs/client-mds1
[root@mds1 ~]#  mount -tlustre /dev/mapper/mds1_flakey /media/lustrefs/client-mds1/
[root@client client]# ll
ls: cannot access test: No such file or directory
total 0
-????????? ? ? ? ?            ? test
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
	&lt;li&gt;run lfsck to regenerate the PFL stripes
&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@mds1 ~]# lctl clear; lctl lfsck_start -A -tall -c -C -r

[root@client client]# ll
total 0
-rw-r--r--. 1 root root 0 Mar 14 16:57 test
[root@client client]# lfs getstripe test
test
  lcm_layout_gen:    4
  lcm_mirror_count:  1
  lcm_entry_count:   2
    lcme_id:             1
    lcme_mirror_id:      0
    lcme_flags:          init
    lcme_extent.e_start: 0
    lcme_extent.e_end:   1048576
      lmm_stripe_count:  1
      lmm_stripe_size:   1048576
      lmm_pattern:       raid0
      lmm_layout_gen:    0
      lmm_stripe_offset: 0
      lmm_objects:
      - 0: { l_ost_idx: 0, l_fid: [0x100000000:0x3:0x0] }

    lcme_id:             2
    lcme_mirror_id:      0
    lcme_flags:          init
    lcme_extent.e_start: 1048576
    lcme_extent.e_end:   EOF
      lmm_stripe_count:  2
      lmm_stripe_size:   4194304
      lmm_pattern:       raid0
      lmm_layout_gen:    0
      lmm_stripe_offset: 1
      lmm_objects:
      - 0: { l_ost_idx: 1, l_fid: [0x100010000:0x3:0x0] }
      - 1: { l_ost_idx: 0, l_fid: [0x100000000:0x4:0x0] }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
	&lt;li&gt;run lfsck in orphan mode -&amp;gt; file layout is corrupted (layout is modified to plain),
&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@mds1 ~]# lctl clear; lctl lfsck_start -A -tall -o -r

[root@client client]# lfs getstripe test
test
lmm_stripe_count:  2
lmm_stripe_size:   1048576
lmm_pattern:       40000001
lmm_layout_gen:    1
lmm_stripe_offset: 0
        obdidx           objid           objid           group
             0               2            0x2                0
             0               0              0                0

[root@oss ~]# debugfs -c -R &quot;ea_list O/0/d$((2%32))/2&quot; /dev/mapper/ost1_flakey
  lma: fid=[0x100000000:0x2:0x0] compat=8 incompat=0
  fid: parent=[0x200000402:0x1:0x0] stripe=0 stripe_size=1048576 stripe_count=2 layout_version=0 range=0
[root@oss ~]# debugfs -c -R &quot;ea_list O/0/d$((2%32))/2&quot; /dev/mapper/ost2_flakey
  lma: fid=[0x100010000:0x2:0x0] compat=8 incompat=0
  fid: parent=[0x200000402:0x1:0x0] stripe=1 stripe_size=1048576 stripe_count=2 layout_version=0 range=0

[root@oss ~]# debugfs -c -R &quot;ea_list O/0/d$((3%32))/3&quot; /dev/mapper/ost1_flakey
  lma: fid=[0x100000000:0x3:0x0] compat=8 incompat=0
  fid: parent=[0x200000402:0x1:0x0] stripe=0 stripe_size=1048576 stripe_count=1 component_id=1 component_start=0 component_end=1048576 layout_version=0 range=0

[root@oss ~]# debugfs -c -R &quot;ea_list O/0/d$((3%32))/3&quot; /dev/mapper/ost2_flakey
  lma: fid=[0x100010000:0x3:0x0] compat=8 incompat=0
  fid: parent=[0x200000402:0x1:0x0] stripe=0 stripe_size=4194304 stripe_count=2 component_id=2 component_start=1048576 component_end=18446744073709551615 layout_version=0 range=0
[root@oss ~]# debugfs -c -R &quot;ea_list O/0/d$((4%32))/4&quot; /dev/mapper/ost1_flakey
  lma: fid=[0x100000000:0x4:0x0] compat=8 incompat=0
  fid: parent=[0x200000402:0x1:0x0] stripe=1 stripe_size=4194304 stripe_count=2 component_id=2 component_start=1048576 component_end=18446744073709551615 layout_version=0 range=0
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
	&lt;li&gt;re-run lfsck in orphan mode -&amp;gt; file layout is corrupted, some PFL stripes are associated to the file plain layout.
&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@mds1 ~]# lctl clear; lctl lfsck_start -A -tall -o -r

[root@client client]# lfs getstripe test
test
lmm_stripe_count:  2
lmm_stripe_size:   1048576
lmm_pattern:       raid0
lmm_layout_gen:    5
lmm_stripe_offset: 0
        obdidx           objid           objid           group
             0               3            0x3                0
             0               4            0x4                0

[root@oss ~]# debugfs -c -R &quot;ea_list O/0/d$((3%32))/3&quot; /dev/mapper/ost1_flakey
  lma: fid=[0x100000000:0x3:0x0] compat=8 incompat=0
  fid: parent=[0x200000402:0x1:0x0] stripe=0 stripe_size=1048576 stripe_count=1 component_id=1 component_start=0 component_end=1048576 layout_version=0 range=0
[root@oss ~]# debugfs -c -R &quot;ea_list O/0/d$((4%32))/4&quot; /dev/mapper/ost1_flakey
  lma: fid=[0x100000000:0x4:0x0] compat=8 incompat=0
  fid: parent=[0x200000402:0x1:0x0] stripe=1 stripe_size=4194304 stripe_count=2 component_id=2 component_start=1048576 component_end=18446744073709551615 layout_version=0 range=0

[root@oss ~]# debugfs -c -R &quot;ea_list O/0/d$((3%32))/3&quot; /dev/mapper/ost2_flakey
O/0/d3/3: File not found by ext2_lookup

[root@oss ~]# debugfs -c -R &quot;ea_list O/0/d$((2%32))/2&quot; /dev/mapper/ost1_flakey
O/0/d2/2: File not found by ext2_lookup
[root@oss ~]# debugfs -c -R &quot;ea_list O/0/d$((2%32))/2&quot; /dev/mapper/ost2_flakey
O/0/d2/2: File not found by ext2_lookup
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;
</description>
                <environment>VMs + lustre 2.15 ldiskfs </environment>
        <key id="69105">LU-15651</key>
            <summary>LFSCK can assign incompatible PFL stripes to a PLAIN layout</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="2" iconUrl="https://jira.whamcloud.com/images/icons/priorities/critical.svg">Critical</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="eaujames">Etienne Aujames</assignee>
                                    <reporter username="eaujames">Etienne Aujames</reporter>
                        <labels>
                    </labels>
                <created>Mon, 14 Mar 2022 17:07:40 +0000</created>
                <updated>Mon, 14 Mar 2022 18:26:54 +0000</updated>
                                                                                <due></due>
                            <votes>0</votes>
                                    <watches>5</watches>
                                                                            <comments>
                            <comment id="329182" author="eaujames" created="Mon, 14 Mar 2022 18:26:54 +0000"  >&lt;p&gt;@pjones, I don&apos;t think to be competent enough to propose fix for this: I hardly know the design of LFSCK.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                                        </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="42693" name="layouts" size="7993" author="eaujames" created="Mon, 14 Mar 2022 17:58:30 +0000"/>
                            <attachment id="42690" name="lfsck_orphan1.log" size="3103997" author="eaujames" created="Mon, 14 Mar 2022 17:58:32 +0000"/>
                            <attachment id="42687" name="lfsck_orphan1_report" size="879" author="eaujames" created="Mon, 14 Mar 2022 17:58:29 +0000"/>
                            <attachment id="42689" name="lfsck_orphan2.log" size="2829318" author="eaujames" created="Mon, 14 Mar 2022 17:58:31 +0000"/>
                            <attachment id="42688" name="lfsck_orphan2_report" size="877" author="eaujames" created="Mon, 14 Mar 2022 17:58:29 +0000"/>
                            <attachment id="42694" name="lfsck_remount.log" size="4125076" author="eaujames" created="Mon, 14 Mar 2022 17:58:33 +0000"/>
                            <attachment id="42686" name="lfsck_remount_report" size="898" author="eaujames" created="Mon, 14 Mar 2022 17:57:39 +0000"/>
                            <attachment id="42696" name="lfsck_snap.log" size="3412313" author="eaujames" created="Mon, 14 Mar 2022 17:58:33 +0000"/>
                            <attachment id="42697" name="lfsck_snap_report" size="896" author="eaujames" created="Mon, 14 Mar 2022 17:58:30 +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|i02ku7:</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>