<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 03:27:33 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-16500] &quot;lfs migrate &lt;file&gt;&quot; preserves specific layout too much</title>
                <link>https://jira.whamcloud.com/browse/LU-16500</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;Running &quot;&lt;tt&gt;lfs migrate &amp;lt;file&amp;gt;&lt;/tt&gt;&quot; without any SETSTRIPE arguments to balance space usage keeps the PFL file layout, but preserves the OST selection &quot;too well&quot;.  The &quot;&lt;tt&gt;lfs migrate&lt;/tt&gt;&quot; command is intended to be used for space balancing OSTs, so it would be expected to change the starting OST and other OSTs in use to better balance, but the OSTs are preserved exactly and this makes the migration virtually useless in this case:&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;# lfs df
UUID                   1K-blocks        Used   Available Use% Mounted on
testfs-MDT0000_UUID       125056        2268      111552   2% /mnt/testfs[MDT:0]
testfs-OST0000_UUID       313104        1664      284280   1% /mnt/testfs[OST:0]
testfs-OST0001_UUID       313104      206464       79480  73% /mnt/testfs[OST:1]
testfs-OST0002_UUID       313104        1668      284276   1% /mnt/testfs[OST:2]
testfs-OST0003_UUID       313104        1668      284276   1% /mnt/testfs[OST:3]

filesystem_summary:      1252416      211464      932312  19% /mnt/testfs

# lfs setstripe -E 1M -c 1 -E 16M -c 1 -E eof -c 1 /mnt/testfs/junk3
# fallocate -l 17M /mnt/testfs/junk3
# lfs getstripe /mnt/testfs/junk3 | grep l_ost_idx
      - 0: { l_ost_idx: 0, l_fid: [0x100000000:0x5d:0x0] }
      - 0: { l_ost_idx: 1, l_fid: [0x100010000:0xc1:0x0] }
      - 0: { l_ost_idx: 2, l_fid: [0x100020000:0x22:0x0] }
# lfs migrate /mnt/testfs/junk3
# lfs getstripe /mnt/testfs/junk3 | grep l_ost_idx
      - 0: { l_ost_idx: 0, l_fid: [0x100000000:0x5e:0x0] }
      - 0: { l_ost_idx: 1, l_fid: [0x100010000:0xc2:0x0] }
      - 0: { l_ost_idx: 2, l_fid: [0x100020000:0x23:0x0] }
# lfs migrate /mnt/testfs/junk3
# lfs getstripe /mnt/testfs/junk3 | grep l_ost_idx
      - 0: { l_ost_idx: 0, l_fid: [0x100000000:0x5f:0x0] }
      - 0: { l_ost_idx: 1, l_fid: [0x100010000:0xc3:0x0] }
      - 0: { l_ost_idx: 2, l_fid: [0x100020000:0x24:0x0] }
# lfs migrate /mnt/testfs/junk3
# lfs getstripe /mnt/testfs/junk3 | grep l_ost_idx
      - 0: { l_ost_idx: 0, l_fid: [0x100000000:0x60:0x0] }
      - 0: { l_ost_idx: 1, l_fid: [0x100010000:0xc4:0x0] }
      - 0: { l_ost_idx: 2, l_fid: [0x100020000:0x25:0x0] }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;One would expect with the OST0001 imbalance that it would be skipped for allocation, but the &quot;&lt;tt&gt;lfs migrate&lt;/tt&gt;&quot; command must be using a specific layout.  Instead, it should be clearing the specific OST indices from the layout and only using it as a template.&lt;/p&gt;

&lt;p&gt;Creating a new file correctly avoids the full OST, so this isn&apos;t a problem with the QOS space balancing:&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;# lfs setstripe -E 1M -c 1 -E 16M -c 1 -E eof -c 1 /mnt/testfs/junk3.2
# fallocate -l 17M /mnt/testfs/junk3.2
# lfs getstripe /mnt/testfs/junk3.2 | grep l_ost_idx
      - 0: { l_ost_idx: 0, l_fid: [0x100000000:0x62:0x0] }
      - 0: { l_ost_idx: 3, l_fid: [0x100030000:0x5f:0x0] }
      - 0: { l_ost_idx: 2, l_fid: [0x100020000:0x27:0x0] }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
        <key id="74138">LU-16500</key>
            <summary>&quot;lfs migrate &lt;file&gt;&quot; preserves specific layout too much</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="yujian">Jian Yu</assignee>
                                    <reporter username="adilger">Andreas Dilger</reporter>
                        <labels>
                    </labels>
                <created>Sat, 21 Jan 2023 00:56:37 +0000</created>
                <updated>Wed, 8 Feb 2023 17:31:06 +0000</updated>
                            <resolved>Wed, 8 Feb 2023 17:31:06 +0000</resolved>
                                    <version>Lustre 2.16.0</version>
                                    <fixVersion>Lustre 2.16.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                                            <comments>
                            <comment id="360619" author="yujian" created="Fri, 27 Jan 2023 08:57:36 +0000"  >&lt;blockquote&gt;&lt;p&gt;In my testing, specifying an actual layout like &quot;lfs migrate -c2 &amp;lt;file&amp;gt;&quot; will avoid the &quot;specific OST&quot; problem.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;This is because &lt;tt&gt;from_copy&lt;/tt&gt; in &lt;tt&gt;lfs_setstripe_internal()&lt;/tt&gt; will keep false if any of the SETSTRIPE arguments is specified:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeHeader panelHeader&quot; style=&quot;border-bottom-width: 1px;&quot;&gt;&lt;b&gt;lfs_setstripe_internal()&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
        &lt;span class=&quot;code-comment&quot;&gt;// ......
&lt;/span&gt;        bool from_copy = &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;;
        &lt;span class=&quot;code-comment&quot;&gt;// ......
&lt;/span&gt;
        &lt;span class=&quot;code-comment&quot;&gt;/* lfs migrate $filename should keep the file&apos;s layout by &lt;span class=&quot;code-keyword&quot;&gt;default&lt;/span&gt; */&lt;/span&gt;
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (migrate_mode &amp;amp;&amp;amp; !layout &amp;amp;&amp;amp; !from_yaml &amp;amp;&amp;amp;
            !setstripe_args_specified(&amp;amp;lsa) &amp;amp;&amp;amp; !lsa.lsa_pool_name)
                from_copy = &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;;
        &lt;span class=&quot;code-comment&quot;&gt;// ......
&lt;/span&gt;
        &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; (fname = argv[optind]; fname != NULL; fname = argv[++optind]) {
                &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (from_copy) {
                        layout = llapi_layout_get_by_path(template ?: fname, 0);
                        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (!layout) {
                                fprintf(stderr,
                                        &lt;span class=&quot;code-quote&quot;&gt;&quot;%s: can&apos;t create composite layout from file %s: %s\n&quot;&lt;/span&gt;,
                                        progname, template ?: fname,
                                        strerror(errno));
                                result = -errno;
                                &lt;span class=&quot;code-keyword&quot;&gt;goto&lt;/span&gt; error;
                        }
                }

                &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (migrate_mdt_mode) {
                        result = llapi_migrate_mdt(fname, &amp;amp;migrate_mdt_param);
                } &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (migrate_mode) {
                        result = lfs_migrate(fname, migration_flags, param,
                                             layout);
        &lt;span class=&quot;code-comment&quot;&gt;// ......&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;I&apos;m adding &lt;tt&gt;llapi_layout_ost_index_set(layout, 0, LLAPI_LAYOUT_DEFAULT)&lt;/tt&gt; before calling &lt;tt&gt;lfs_migrate()&lt;/tt&gt; to strip the source layout of specific OST object/index values before using it to create the volatile file in &lt;tt&gt;lfs_migrate()&amp;#45;&amp;gt;migrate_open_files()&amp;#45;&amp;gt;llapi_layout_file_open()&lt;/tt&gt;.&lt;/p&gt;</comment>
                            <comment id="360823" author="gerrit" created="Mon, 30 Jan 2023 09:34:55 +0000"  >&lt;p&gt;&quot;Jian Yu &amp;lt;yujian@whamcloud.com&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/49819&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/49819&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-16500&quot; title=&quot;&amp;quot;lfs migrate &amp;lt;file&amp;gt;&amp;quot; preserves specific layout too much&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-16500&quot;&gt;&lt;del&gt;LU-16500&lt;/del&gt;&lt;/a&gt; utils: set default ost index for lfs migrate&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 419038e0015e9eb51c294910a167967f5a77acea&lt;/p&gt;</comment>
                            <comment id="362053" author="gerrit" created="Wed, 8 Feb 2023 06:28:13 +0000"  >&lt;p&gt;&quot;Oleg Drokin &amp;lt;green@whamcloud.com&amp;gt;&quot; merged in patch &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/49819/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/49819/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-16500&quot; title=&quot;&amp;quot;lfs migrate &amp;lt;file&amp;gt;&amp;quot; preserves specific layout too much&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-16500&quot;&gt;&lt;del&gt;LU-16500&lt;/del&gt;&lt;/a&gt; utils: set default ost index for lfs migrate&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 0568f4ca253049d324956e3d89ece0cbd2ff2155&lt;/p&gt;</comment>
                            <comment id="362151" author="pjones" created="Wed, 8 Feb 2023 17:31:06 +0000"  >&lt;p&gt;Landed for 2.16&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                                        </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="74297">LU-16522</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_10390" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i03asv:</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>