<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 03:00: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-13375] lfs mirror extend does not take file layout into account</title>
                <link>https://jira.whamcloud.com/browse/LU-13375</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;Running &quot;&lt;tt&gt;lfs mirror extend&lt;/tt&gt;&quot; on an existing file doesn&apos;t use the existing layout for the new file, nor the default filesystem layout on the root directory.  Instead it seems to always create a plain layout using the filesystem default &lt;tt&gt;stripe_count&lt;/tt&gt; and &lt;tt&gt;stripe_size&lt;/tt&gt;.  For example, the &lt;tt&gt;lcme_mirror_id: 1&lt;/tt&gt; components were initially created from the filesystem default layout, and the &lt;tt&gt;lcme_mirror_id: 2&lt;/tt&gt; component was created with &quot;&lt;tt&gt;lfs mirror extend -N1&lt;/tt&gt;&quot; (default &lt;tt&gt;stripe_count=4&lt;/tt&gt;): &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;/mnt/testfs/pfl0.2
  lcm_mirror_count:  2
  lcm_entry_count:   4
    lcme_mirror_id:      1
    lcme_flags:          init
    lcme_extent.e_start: 0
    lcme_extent.e_end:   134217728
      lmm_stripe_count:  1
      lmm_stripe_size:   1048576
      lmm_pool:          ddn_ssd
      lmm_objects:
      - 0: { l_ost_idx: 1, l_fid: [0x100010000:0x12a:0x0] }
                       
    lcme_mirror_id:      1
    lcme_flags:          init
    lcme_extent.e_start: 134217728
    lcme_extent.e_end:   4294967296
      lmm_stripe_count:  2
      lmm_stripe_size:   1048576
      lmm_pool:          ddn_ssd
      lmm_objects:
      - 0: { l_ost_idx: 0, l_fid: [0x100000000:0x109:0x0] }
      - 1: { l_ost_idx: 1, l_fid: [0x100010000:0x12b:0x0] }
        
    lcme_mirror_id:      1
    lcme_flags:          0
    lcme_extent.e_start: 4294967296
    lcme_extent.e_end:   EOF
      lmm_stripe_count:  -1
      lmm_stripe_size:   1048576
      lmm_pool:          ddn_hdd

    lcme_mirror_id:      2
    lcme_flags:          init
    lcme_extent.e_start: 0
    lcme_extent.e_end:   EOF
      lmm_stripe_count:  4
      lmm_stripe_size:   1048576
      lmm_pool:          ddn_hdd
      lmm_objects:
      - 0: { l_ost_idx: 1, l_fid: [0x100010000:0x12c:0x0] }
      - 1: { l_ost_idx: 3, l_fid: [0x100030000:0xc8:0x0] }
      - 2: { l_ost_idx: 2, l_fid: [0x100020000:0x88:0x0] }
      - 3: { l_ost_idx: 0, l_fid: [0x100000000:0x10a:0x0] }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;At a minimum, &quot;&lt;tt&gt;lfs mirror extend -N file&lt;/tt&gt;&quot; should use the &lt;tt&gt;stripe_count&lt;/tt&gt; from the last initialized component, since it is 99% likely that the file will never be modified after it is first written and closed.  It would be even better to copy the &lt;tt&gt;stripe_size&lt;/tt&gt; as well, but not the pool.&lt;/p&gt;</description>
                <environment></environment>
        <key id="58443">LU-13375</key>
            <summary>lfs mirror extend does not take file layout into account</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="1">Fixed</resolution>
                                        <assignee username="emoly.liu">Emoly Liu</assignee>
                                    <reporter username="adilger">Andreas Dilger</reporter>
                        <labels>
                    </labels>
                <created>Thu, 19 Mar 2020 21:35:27 +0000</created>
                <updated>Sun, 19 Apr 2020 14:14:31 +0000</updated>
                            <resolved>Sun, 19 Apr 2020 14:14:31 +0000</resolved>
                                    <version>Lustre 2.14.0</version>
                    <version>Lustre 2.12.5</version>
                                    <fixVersion>Lustre 2.14.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                                            <comments>
                            <comment id="266066" author="emoly.liu" created="Wed, 25 Mar 2020 08:47:56 +0000"  >&lt;p&gt;This issue happens because the mirror layout doesn&apos;t inherit any stripe option from the file&apos;s component before running mirror_extend() in lfs_setstripe_internal(). I have made some changes and now the patch can work as follows:&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@centos7-3 tests]# lfs setstripe -E 6M -S 1M -c 3 -E -1 -S 2m -c 2 /mnt/lustre/pfl
[root@centos7-3 tests]# lfs mirror extend -N1 /mnt/lustre/pfl 
[root@centos7-3 tests]# lfs getstripe /mnt/lustre/pfl 
/mnt/lustre/pfl
  lcm_layout_gen:    3
  lcm_mirror_count:  2
  lcm_entry_count:   3
    lcme_id:             65537
    lcme_mirror_id:      1
    lcme_flags:          init
    lcme_extent.e_start: 0
    lcme_extent.e_end:   6291456
      lmm_stripe_count:  3
      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] }
      - 1: { l_ost_idx: 1, l_fid: [0x100010000:0x2:0x0] }
      - 2: { l_ost_idx: 2, l_fid: [0x100020000:0x4:0x0] }

    lcme_id:             65538
    lcme_mirror_id:      1
    lcme_flags:          0
    lcme_extent.e_start: 6291456
    lcme_extent.e_end:   EOF
      lmm_stripe_count:  2
      lmm_stripe_size:   2097152
      lmm_pattern:       raid0
      lmm_layout_gen:    0
      lmm_stripe_offset: -1

    lcme_id:             131073
    lcme_mirror_id:      2
    lcme_flags:          init
    lcme_extent.e_start: 0
    lcme_extent.e_end:   EOF
      lmm_stripe_count:  2
      lmm_stripe_size:   2097152
      lmm_pattern:       raid0
      lmm_layout_gen:    0
      lmm_stripe_offset: 0
      lmm_objects:
      - 0: { l_ost_idx: 0, l_fid: [0x100000000:0x4:0x0] }
      - 1: { l_ost_idx: 1, l_fid: [0x100010000:0x3:0x0] }

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;One thing I want to make sure is that the man page of &quot;lfs mirror extend&quot; says &quot;If setstripe_options are not specified, then the stripe options inherited from the previous component will be used.&quot; So, we should inherit the stripe options from &quot;the last initialized component&quot; but not the last component, right? (The example above used the last component.)&lt;/p&gt;</comment>
                            <comment id="266079" author="adilger" created="Wed, 25 Mar 2020 11:29:16 +0000"  >&lt;p&gt;I think there are two reasonable behaviors for &quot;&lt;tt&gt;lfs mirror extend -N1&lt;/tt&gt;&quot; on an existing file:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;copy the whole PFL layout of the existing file so that each mirror is the same.  This is probably mostly what users &quot;expect&quot; when mirroring a file.&lt;/li&gt;
	&lt;li&gt;copy the layout of the last &lt;b&gt;initialized&lt;/b&gt; (used) component of the existing file.  This is more efficient, from the point of view that it doesn&apos;t create extra objects for early components that are not very helpful, and it avoids e.g. DoM/flash components at the start of the file that would not work (DoM) or waste valuable resources (flash).&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;The chance of a file being modified after it is written and then mirrored is very low, so if the simpler/better solution is to use only the last initialized component then I&apos;m happy with that for now.&lt;/p&gt;</comment>
                            <comment id="266184" author="gerrit" created="Thu, 26 Mar 2020 17:38:56 +0000"  >&lt;p&gt;Emoly Liu (emoly@whamcloud.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/38079&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/38079&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-13375&quot; title=&quot;lfs mirror extend does not take file layout into account&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-13375&quot;&gt;&lt;del&gt;LU-13375&lt;/del&gt;&lt;/a&gt; flr: inherit the correct layout by &quot;mirror extend -N&quot;&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 15c47ef03a0a1ff978efa96c9238a87c0b984580&lt;/p&gt;</comment>
                            <comment id="267969" author="gerrit" created="Sun, 19 Apr 2020 08:45:26 +0000"  >&lt;p&gt;Oleg Drokin (green@whamcloud.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/38079/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/38079/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-13375&quot; title=&quot;lfs mirror extend does not take file layout into account&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-13375&quot;&gt;&lt;del&gt;LU-13375&lt;/del&gt;&lt;/a&gt; flr: inherit the correct layout by &quot;mirror extend -N&quot;&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: f2a1c6e06f4dc5250cb72b1a6f4720f20486d502&lt;/p&gt;</comment>
                            <comment id="267988" author="pjones" created="Sun, 19 Apr 2020 14:14:31 +0000"  >&lt;p&gt;Landed for 2.14&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                                        </outwardlinks>
                                                        </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_10390" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i00vxj:</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>