<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:58: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-13076] DNE3: lfs migrate -m should allow -1 as the target index</title>
                <link>https://jira.whamcloud.com/browse/LU-13076</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;When migrating directory trees to new MDTs for space balancing, it would be very convenient to allow specifying &quot;&lt;tt&gt;lfs migrate -m -1&lt;/tt&gt;&quot; to have &quot;&lt;tt&gt;lfs&lt;/tt&gt;&quot; pick the MDT with the most free inodes as the target.  This is similar to &quot;&lt;tt&gt;lfs setdirstripe -i -1&lt;/tt&gt;&quot; functionality, but for migration.  If multiple directories are specified on the command line, it probably makes sense to refresh the statfs information after each directory tree is migrated, in case there is a new MDT that has more free space.  This will greatly simplify directory migration on an existing filesystem without the user having to specify the details.&lt;/p&gt;

&lt;p&gt;If this is already implemented (it didn&apos;t look like &lt;tt&gt;parse_targets()&lt;/tt&gt; would handle &lt;tt&gt;&lt;del&gt;1&lt;/tt&gt; as an argument), then the &lt;tt&gt;lfs-migrate.1&lt;/tt&gt; man page needs to be updated with this information under the description of &lt;tt&gt;&lt;/del&gt;-mdt-index&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;I suspect this would be relatively easily implemented in Lustre 2.12, because the mechanism to select the best MDT is already present in &lt;tt&gt;lfs&lt;/tt&gt;.&lt;/p&gt;</description>
                <environment></environment>
        <key id="57635">LU-13076</key>
            <summary>DNE3: lfs migrate -m should allow -1 as the target index</summary>
                <type id="4" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11310&amp;avatarType=issuetype">Improvement</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="laisiyao">Lai Siyao</assignee>
                                    <reporter username="adilger">Andreas Dilger</reporter>
                        <labels>
                            <label>dne3</label>
                    </labels>
                <created>Fri, 13 Dec 2019 13:11:10 +0000</created>
                <updated>Sat, 4 Dec 2021 06:46:53 +0000</updated>
                            <resolved>Wed, 27 Oct 2021 03:57:00 +0000</resolved>
                                                    <fixVersion>Lustre 2.15.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>5</watches>
                                                                            <comments>
                            <comment id="259804" author="laisiyao" created="Fri, 13 Dec 2019 14:31:42 +0000"  >&lt;p&gt;&apos;lfs migrate -m -1&apos; is not allowed in 2.12, and in the implementation of &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-11025&quot; title=&quot;DNE3: directory restripe&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-11025&quot;&gt;&lt;del&gt;LU-11025&lt;/del&gt;&lt;/a&gt;, &apos;lfs migrate -m -1&apos; will do directory split/merge instead of migration, though for directory split it will choose the MDTs that have more free space.&lt;/p&gt;</comment>
                            <comment id="259905" author="adilger" created="Sun, 15 Dec 2019 11:27:20 +0000"  >&lt;p&gt;Doesn&apos;t it make more sense to have &quot;&lt;tt&gt;lfs migrate -m N -c -1&lt;/tt&gt;&quot; do directly split, or similar?  The &quot;&lt;tt&gt;-m&lt;/tt&gt; is used as the DNE stripe index, not the stripe count. &lt;/p&gt;</comment>
                            <comment id="259945" author="laisiyao" created="Mon, 16 Dec 2019 07:19:04 +0000"  >&lt;p&gt;&quot;lfs migrate -m N -c -1&quot; doesn&apos;t look meaningful to me: migrate directory to MDT N and with stripe count -1? Maybe we can add a new command &quot;lfs restripe -c -H &amp;lt;dir&amp;gt;&quot; for directory split/merge.&lt;/p&gt;

&lt;p&gt;BTW let system choose target MDTs may not be optimal in some cases:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;case 1: dir1 is fairly big, and it&apos;s a plain directory on MDT0, now system decides to migrate it to MDT1 and MDT2, though currently they have more free space than MDT0, after migration, they may become more full, or then don&apos;t have enough space to finish migration.&lt;/li&gt;
	&lt;li&gt;case 2: dir1 is located on MDT0, and system decides to migrate to MDT1 and MDT2, this will cause all sub files/dirs moved, in contrast, if user manually migrate it to MDT0 and MDT2, only half sub files/dirs needs to be moved.&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="260016" author="adilger" created="Tue, 17 Dec 2019 00:44:16 +0000"  >&lt;p&gt;Ah, I think I understand where my confusion is.  Am I correct that you are separating the use of &quot;&lt;tt&gt;lfs migrate -m N&lt;/tt&gt;&quot; to mean &quot;migrate parent directory with all inodes to new MDT &apos;N&apos;&quot; and &quot;&lt;tt&gt;lfs migrate -m N -c -1&lt;/tt&gt;&quot; to mean the new &quot;split parent directory but leave inodes in place&quot; code that you are working on?  I think that &quot;migrate&quot; should generally mean &quot;move inodes to new MDT&quot;, while &quot;MDT auto split&quot; should not move existing inodes since that will change inode numbers/locks and could cause problems.  I think it is useful to have the meaning of &quot;&lt;tt&gt;lfs migrate -m N -c C&lt;/tt&gt;&quot; for directories be similar to &quot;&lt;tt&gt;lfs migrate -i N -c C&lt;/tt&gt;&quot; for regular files, where &quot;&lt;tt&gt;N = -1&lt;/tt&gt;&quot; means &quot;pick the target index for me&quot; and &quot;&lt;tt&gt;C = -1&lt;/tt&gt;&quot; means &quot;stripe over all targets&quot;.&lt;/p&gt;

&lt;p&gt;Being able to specify &quot;split directory now&quot; is important for testing, but maybe a different command like &quot;&lt;tt&gt;lfs setstripe -c &amp;lt;dir&amp;gt;&lt;/tt&gt;&quot; on the existing directory is the right command for splitting the directory to have a different number of stripes?  For &lt;tt&gt;stripe_count=1&lt;/tt&gt; directories it is possible to add any kind of hash function to the existing directory, so &quot;&lt;tt&gt;crush&lt;/tt&gt;&quot; would be preferred, and then setting the number of stripes would just migrate the names without affecting the inodes?&lt;/p&gt;


&lt;p&gt;I also agree that a simple implementation of &quot;&lt;tt&gt;lfs migrate -m -1&lt;/tt&gt;&quot; might not pick the best MDTs, but users (other than you and me) are even &lt;em&gt;less&lt;/em&gt; likely to pick the best MDTs.  That means that the implementation of &quot;&lt;tt&gt;-m -1&lt;/tt&gt;&quot; needs to be smart enough that it picks good MDTs when possible.&lt;/p&gt;

&lt;p&gt;It should be possible to disable MDTs for new directory creation (similar to &quot;&lt;tt&gt;lfs set_param osp.$fsname-OST0000.max_create_count=0&lt;/tt&gt;&quot; for OSTs) so that the MDS does not put new directories on that MDT.  That will allow an MDT to be emptied out with a command like &quot;&lt;tt&gt;lfs find -type d -m N | lfs migrate -m -1&lt;/tt&gt;&quot; without the user having to specify the target for every directory.    &lt;/p&gt;

&lt;p&gt;Also, when the user is doing MDT balancing, the use of &quot;&lt;tt&gt;lfs migrate -m -1&lt;/tt&gt;&quot; needs to move &lt;b&gt;some&lt;/b&gt; directories and inodes to the empty MDTs instead of just splitting existing directories onto new MDTs and not moving any inodes, otherwise the full MDT will not be any less full.  Maybe this can be done by weighting the current MDT higher than other MDTs but not keep all directories/inodes on the original MDT (e.g. using &lt;tt&gt;qos_mdt_prio_free&lt;/tt&gt;)?&lt;/p&gt;</comment>
                            <comment id="260019" author="laisiyao" created="Tue, 17 Dec 2019 02:32:55 +0000"  >&lt;p&gt;The problem of using &quot;lfs setstripe -c &amp;lt;dir&amp;gt;&quot; (or should be &quot;lfs setdirstripe -c &amp;lt;dir&amp;gt;&quot;?) is this command is currently used to create new striped directories, if it needs to support dir split, it needs to verify whether target directory exists, which will downgrade striped directory creation performance. Do you think it&apos;s acceptable?&lt;/p&gt;</comment>
                            <comment id="260020" author="laisiyao" created="Tue, 17 Dec 2019 02:40:31 +0000"  >&lt;p&gt;Besides, to achieve best performance after migration, IMO it should be done in user space by policy engine, which is more flexible and easier to customize.&lt;/p&gt;</comment>
                            <comment id="260024" author="adilger" created="Tue, 17 Dec 2019 04:41:30 +0000"  >&lt;p&gt;You are correct that I meant &quot;&lt;tt&gt;setdirstripe -c&lt;/tt&gt;&quot;. It is fine if it &quot;checks&quot; whether the directory exists by trying to create it, then if this fails with &lt;tt&gt;-EEXIST&lt;/tt&gt; or &lt;tt&gt;-EISDIR&lt;/tt&gt; it can try to change the stripe count with a second RPC.  I don&apos;t think this would impact the performance of &quot;&lt;tt&gt;setdirstripe -c&lt;/tt&gt;&quot;, or at least not in any critical way because there will likely be many more RPCs to migrate the entries. &lt;/p&gt;

&lt;p&gt;I also agree that a user space policy engine might be able to do a more optimal job than the MDS, but it should at least be possible to a basic job of directory migration without a policy engine. &lt;/p&gt;</comment>
                            <comment id="294125" author="cwhite_ddn" created="Fri, 5 Mar 2021 20:43:23 +0000"  >&lt;p&gt;We currently have a customer with 24 MDTs, they used -c 24 for all their directories and now wish to re-stripe with -c 1. Given the customer lacks experience, I don&apos;t want them to have to manually choose a new target with lfs migrate -m - it would be very good to have -m -1, we need to have a hands-free restriping here. &lt;/p&gt;</comment>
                            <comment id="312421" author="gerrit" created="Fri, 10 Sep 2021 01:05:22 +0000"  >&lt;p&gt;&quot;Lai Siyao &amp;lt;lai.siyao@whamcloud.com&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/44886&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/44886&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-13076&quot; title=&quot;DNE3: lfs migrate -m should allow -1 as the target index&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-13076&quot;&gt;&lt;del&gt;LU-13076&lt;/del&gt;&lt;/a&gt; dne: dir migrate in QOS mode&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: f4ee9c0f45d5031942f1238e7af212a4cee9f912&lt;/p&gt;</comment>
                            <comment id="316633" author="gerrit" created="Wed, 27 Oct 2021 00:37:33 +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/44886/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/44886/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-13076&quot; title=&quot;DNE3: lfs migrate -m should allow -1 as the target index&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-13076&quot;&gt;&lt;del&gt;LU-13076&lt;/del&gt;&lt;/a&gt; dne: dir migrate in QOS mode&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 378c7567876b430d06031f7d380112b9bdb15166&lt;/p&gt;</comment>
                            <comment id="316659" author="pjones" created="Wed, 27 Oct 2021 03:57:00 +0000"  >&lt;p&gt;Landed for 2.15&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="61979">LU-14210</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="65865">LU-14975</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|i00r07:</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>
                                                                                                                                                                                                                                                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>