<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 03:27: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-16522] &quot;lfs setstripe -i N&quot; with deactivated OST(s) always picks next active OST</title>
                <link>https://jira.whamcloud.com/browse/LU-16522</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;When OSTs are disabled with &lt;tt&gt;osp.&amp;#42;.max_create_count=0&lt;/tt&gt; and files are created using a &lt;b&gt;specific&lt;/b&gt; file layout (i.e. one that explicitly selects the starting OST index) for an OST that is inactive, this will cause the MDS object allocator to always select the first available OST after the disabled ones.&lt;/p&gt;

&lt;p&gt;For example, on an 8-OST filesystem where OST0000-OST0003 are all disabled, trying to create files &lt;b&gt;explicitly&lt;/b&gt; on any of those OSTs will always result in the objects being allocated from OST0004. &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;# lctl set_param osp.testfs-OST000[0-3]*.max_create_count=0
osp.testfs-OST0000-osc-MDT0000.max_create_count=0
osp.testfs-OST0001-osc-MDT0000.max_create_count=0
osp.testfs-OST0002-osc-MDT0000.max_create_count=0
osp.testfs-OST0003-osc-MDT0000.max_create_count=0
# for O in {0..3}; do lfs setstripe -i $O /mnt/testfs/ost$O; done
# lfs getstripe -i /mnt/testfs/ost* | sort | uniq -c
      4 
      4 4
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This issue &lt;b&gt;does not&lt;/b&gt; affect &quot;normal&quot; file creations that do not specify the starting OST index of files:&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;# touch /mnt/testfs/file{0..99}
# lfs getstripe -i /mnt/testfs/file{0..99} | sort | uniq -c 
    100
     25 4
     25 5
     25 6
     25 7
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;It &lt;b&gt;does&lt;/b&gt; affect &quot;&lt;tt&gt;lfs migrate&lt;/tt&gt;&quot; without any given layout due to it copying the layout from the files that includes the starting index (&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;).&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 getstripe -i /mnt/testfs/old* | sort | uniq -c
    100 
     13 0
     13 1
     13 2
     12 3
     12 4
     12 5
     12 6
     13 7
# lfs migrate /mnt/testfs/old*
# lfs getstripe -i /mnt/testfs/old* | sort | uniq -c
    100 
     55 4
     15 5
     15 6
     15 7
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If a large number of OSTs were disabled while &quot;&lt;tt&gt;lfs migrate&lt;/tt&gt;&quot; is used without any arguments (copying the specific layout from the source file prior to patch &lt;a href=&quot;https://review.whamcloud.com/49865&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/49865&lt;/a&gt; &quot;&lt;tt&gt;&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;/tt&gt;&quot; being applied, as in the example above), this would cause all migrated files to use the same (first) OST after the disabled OSTs.  Running the &quot;&lt;tt&gt;lfs migrate&lt;/tt&gt;&quot; command with a new layout does not hit this problem:&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 getstripe -i /mnt/testfs/old* | sort | uniq -c
    100 
     13 0
     13 1
     12 2
     12 3
     12 4
     12 5
     13 6
     13 7
# lfs migrate -c 1 /mnt/testfs/old*
# lfs getstripe -i /mnt/testfs/old* | sort | uniq -c
    100 
     25 4
     25 5
     25 6
     25 7
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Fixing &quot;&lt;tt&gt;lfs migrate&lt;/tt&gt;&quot; to reset the OST index in the source layout avoids the problem in this case, but it would also be worthwhile to also fix the problem in the MDS LOD OST selection code, so that other tools which provide specific layouts via saved/copied xattrs (e.g. &quot;&lt;tt&gt;tar&lt;/tt&gt;&quot;, and maybe &quot;&lt;tt&gt;rsync&lt;/tt&gt;&quot; or &quot;&lt;tt&gt;cp&lt;/tt&gt;&quot; in the future) will not encounter the same problem.  If the client explicitly requests an OST index that is inactive or disabled, the MDS should pick a random or weighted OST index (possibly within the same OST pool) rather than just picking the next available OST index.&lt;/p&gt;</description>
                <environment></environment>
        <key id="74297">LU-16522</key>
            <summary>&quot;lfs setstripe -i N&quot; with deactivated OST(s) always picks next active OST</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.whamcloud.com/images/icons/priorities/major.svg">Major</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="wc-triage">WC Triage</assignee>
                                    <reporter username="adilger">Andreas Dilger</reporter>
                        <labels>
                    </labels>
                <created>Thu, 2 Feb 2023 00:45:33 +0000</created>
                <updated>Wed, 8 Feb 2023 06:14:40 +0000</updated>
                                            <version>Lustre 2.14.0</version>
                    <version>Lustre 2.16.0</version>
                    <version>Lustre 2.15.0</version>
                                                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="74139">LU-16501</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="74138">LU-16500</issuekey>
        </issuelink>
                            </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|i03brb:</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>