<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:31:00 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-9982] Clients striping from mapped FID in nodemap</title>
                <link>https://jira.whamcloud.com/browse/LU-9982</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;The main idea is to bind a FID given by path or FID (formatted with or without brackets) &lt;br/&gt;
 The associated set of clients (range) when creating files or directories, will inherit striping information from template FID when it&apos;s possible. Striping priorities:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Explicit striping&lt;/li&gt;
	&lt;li&gt;Parent striping&lt;/li&gt;
	&lt;li&gt;Template striping&lt;/li&gt;
	&lt;li&gt;Filesystem default&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;As it&apos;s possible to query the nodemap on a given export, it&apos;s possible to get the information on the MDT stack which will transmit the template object to lower layer. Then, when a template exists, a new field into dt_allocation_hint points to the template object and will be read in lod_ah_init function and lod_layout_component is filled accordingly.&lt;/p&gt;

&lt;p&gt;Example of usage:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Start lustre&lt;/li&gt;
	&lt;li&gt;On a client (normal striping)
&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 ~]# mount -t lustre 192.168.10.134@tcp:/testfs /lustre/testfs2
[root@client ~]# cd /lustre/testfs2/
[root@client testfs2]# echo &quot;test&quot; &amp;gt; testfile
[root@client testfs2]# lfs getstripe -c testfile
1
[root@client testfs2]# lfs getstripe -c my_template
2
[root@client testfs2]# lfs path2fid my_template
[0x200000402:0x1:0x0]
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;On the MGS node (creating the nodemap + adding client or range)
&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 nodemap_add  SG1
[root@mds1]# lctl nodemap_add_range --name SG1 --range 192.168.10.[130-140]@tcp
[root@mds1]# lctl set_param -P nodemap.SG1.template=0x200000401:0x1:0x0
or
[root@mds1]# lctl nodemap_set_template --name SG1 --template /lustre/testfs2/my_template
or
[root@mds1]# lctl nodemap_set_template --name SG1 --template 0x200000401:0x1:0x0
or
[root@mds1]# lctl nodemap_set_template --name SG1 --template &quot;[0x200000401:0x1:0x0]&quot;
[root@mds1]# lctl nodemap_modify --name SG1 --property admin --value 1 # working as root
[root@mds1]# lctl nodemap_activate 1
[root@mds1]# cat /proc/fs/lustre/nodemap/SG1/template
0x200000402:0x1:0x0
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;On the client:
&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 testfs2]# echo &quot;test&quot; &amp;gt; testfile2
[root@client testfs2]# lfs getstripe -c testfile2
2
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Todo in next days:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;add a valid fid format check when bound&lt;/li&gt;
	&lt;li&gt;I intend to change the type of record from char&lt;span class=&quot;error&quot;&gt;&amp;#91;FID_LEN&amp;#93;&lt;/span&gt; to lu_fid directly (add a nodemap record). It will prevent the call to sscanf in mdt_reint_open&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment></environment>
        <key id="48297">LU-9982</key>
            <summary>Clients striping from mapped FID in nodemap</summary>
                <type id="2" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11311&amp;avatarType=issuetype">New Feature</type>
                                            <priority id="4" iconUrl="https://jira.whamcloud.com/images/icons/priorities/minor.svg">Minor</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="riauxjb">Jean-Baptiste Riaux</reporter>
                        <labels>
                            <label>cea</label>
                    </labels>
                <created>Wed, 13 Sep 2017 14:17:44 +0000</created>
                <updated>Fri, 17 Sep 2021 23:13:28 +0000</updated>
                                                                                <due></due>
                            <votes>0</votes>
                                    <watches>14</watches>
                                                                            <comments>
                            <comment id="208248" author="gerrit" created="Wed, 13 Sep 2017 14:47:28 +0000"  >&lt;p&gt;Jean-Baptiste Riaux (riaux.jb@intel.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/28972&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/28972&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-9982&quot; title=&quot;Clients striping from mapped FID in nodemap&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-9982&quot;&gt;LU-9982&lt;/a&gt; lustre: Clients striping from mapped FID in nodemap&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 827a92af1f3cba7b1a4105c77e35973e85702a87&lt;/p&gt;</comment>
                            <comment id="208249" author="riauxjb" created="Wed, 13 Sep 2017 14:56:29 +0000"  >&lt;p&gt;I&apos;ll fix the checkpath issues before end of week.&lt;/p&gt;</comment>
                            <comment id="208592" author="riauxjb" created="Sat, 16 Sep 2017 17:29:03 +0000"  >&lt;p&gt;Code cleaned.&lt;br/&gt;
Added internal lock on template object in mdt_reint_open&lt;br/&gt;
Changed nodemap template code to match existing features (like fileset for example, see &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-7846&quot; title=&quot;Impose subdirectory mount via nodemap&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-7846&quot;&gt;&lt;del&gt;LU-7846&lt;/del&gt;&lt;/a&gt;, &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-9289&quot; title=&quot;Fix fileset string length issue&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-9289&quot;&gt;&lt;del&gt;LU-9289&lt;/del&gt;&lt;/a&gt;, &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-8258&quot; title=&quot;Unsafe userspace address access from proc handler in nodemap code&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-8258&quot;&gt;&lt;del&gt;LU-8258&lt;/del&gt;&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;I think I will recreate a set of 3 patches instead instead of 1 big patch:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;nodemap : add template info to nodemap&lt;/li&gt;
	&lt;li&gt;mdt: templated create for dir and files&lt;/li&gt;
	&lt;li&gt;test: test for nodemap template in sanity-sec&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="214306" author="riauxjb" created="Tue, 21 Nov 2017 11:59:54 +0000"  >&lt;p&gt;Added templated directory.&lt;br/&gt;
Templated directory must be created as a directory with default striping information, &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 setdirstripe -D -c stripe_count template_directory
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Then as for a template file, bound to nodemap like this:&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 -P nodemap.SG1.template=fidoftemplatedir
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="220003" author="riauxjb" created="Mon, 5 Feb 2018 18:28:22 +0000"  >&lt;p&gt;New version of the patch available (still &lt;a href=&quot;https://review.whamcloud.com/#/c/28972&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/#/c/28972&lt;/a&gt;) using dt_allocation_hint.&lt;/p&gt;</comment>
                            <comment id="220005" author="gerrit" created="Mon, 5 Feb 2018 18:37:31 +0000"  >&lt;p&gt;Jean-Baptiste Riaux (riaux.jb@intel.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/31171&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/31171&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-9982&quot; title=&quot;Clients striping from mapped FID in nodemap&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-9982&quot;&gt;LU-9982&lt;/a&gt; lustre: Clients striping from mapped FID in nodemap&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: fba1cf5a2e8bf664d2caa430073f34b2805703c3&lt;/p&gt;</comment>
                            <comment id="220006" author="riauxjb" created="Mon, 5 Feb 2018 18:39:55 +0000"  >&lt;p&gt;Added tests in file sanity-nodemap.sh (dependency on &lt;a href=&quot;https://review.whamcloud.com/#/c/28972&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/#/c/28972&lt;/a&gt;)&lt;/p&gt;</comment>
                            <comment id="223756" author="riauxjb" created="Thu, 15 Mar 2018 15:49:05 +0000"  >&lt;p&gt;Document design updated.&#160;&lt;/p&gt;

&lt;p&gt;Code updated (memory leaks fixed due to &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-8998&quot; title=&quot;Progressive File Layout (PFL)&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-8998&quot;&gt;&lt;del&gt;LU-8998&lt;/del&gt;&lt;/a&gt; landing, PFL) + other fixes (leak when nodemap was destroyed and nodemap_putref calls added when missing) + added stripe offset and ost-list support for the template (see lod_ah_init in patch 28972).&lt;/p&gt;

&lt;p&gt;I am really interested by feedback on lod_ah_init in file lod_object.c because I am pretty sure there is a smarter or more delicate way to transfer template lod_layout_component into created object.&lt;/p&gt;</comment>
                            <comment id="223941" author="riauxjb" created="Mon, 19 Mar 2018 15:05:14 +0000"  >&lt;p&gt;Performance impact measures (worst case is 1.9% degradation with feature enabled and used, multiple runs done).&lt;/p&gt;

&lt;p&gt;I will add the performance impact in my next commit message.&lt;/p&gt;

&lt;p&gt;Creating 500K files in a directory on a single node setup.&lt;/p&gt;
&lt;div class=&apos;table-wrap&apos;&gt;
&lt;table class=&apos;confluenceTable&apos;&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;th class=&apos;confluenceTh&apos;&gt;&#160;&lt;/th&gt;
&lt;th class=&apos;confluenceTh&apos;&gt;Master&lt;/th&gt;
&lt;th class=&apos;confluenceTh&apos;&gt;&lt;a href=&quot;https://jira.whamcloud.com/browse/LU-9982&quot; title=&quot;Clients striping from mapped FID in nodemap&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-9982&quot;&gt;LU-9982&lt;/a&gt;&lt;/th&gt;
&lt;th class=&apos;confluenceTh&apos;&gt;%diff&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;stripe count 1&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;33.245s&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;33.770s&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;+1.579%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;stripe count 2&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;33.865s&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;34.520s&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;+1.934%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;


&lt;p&gt;Also found a bug when bursting files creation with SELinux enforcing (no problem when SELinux is set to permissive). Currently investigating (lod_ah_init).&lt;/p&gt;

&lt;p&gt;+ 1 minor bug to fix (memory leak when changing template, nodemap-&amp;gt;fidtpl not freed).&#160;&lt;/p&gt;</comment>
                            <comment id="263890" author="adilger" created="Mon, 24 Feb 2020 07:51:54 +0000"  >&lt;p&gt;What would be a useful enhancement to this is defaulting to use the root directory of the fileset as the template.  That would work the same way as the current root directory of the whole filesystem, making the virtualization of Lustre more transparent.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="53999">LU-11656</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="53584">LU-11510</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="53853">LU-11586</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="49629">LU-10345</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="52946">LU-11234</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="54212">LU-11739</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="29837" name="Lustre Striping by Client-0.7.docx" size="20767" author="riauxjb" created="Thu, 15 Mar 2018 15:41:58 +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|hzzk3z:</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>