<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:05:56 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-7093] mkdir: cannot create directory: Operation not permitted</title>
                <link>https://jira.whamcloud.com/browse/LU-7093</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;In a a set of directories on ldne, /p/ldne/dinatale/count4_index*, Joe is able to create a file, but not a directory.  Joe owns the directories and the mode is set to 700.&lt;/p&gt;

&lt;p&gt;In other directories, for example /p/ldne/dinatale/count3_index*, Joe is able to create both files and directories successfully.  They have the same ownership and mode.&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;zwicky96@dinatale:pwd
/p/ldne/dinatale/count4_index0

zwicky96@dinatale:ls -al
total 54
drwx------  2 dinatale lcstaff 43008 Sep  1 14:13 .
dr-xr-xr-x 18 dinatale lcstaff 11776 Aug 31 11:32 ..

zwicky96@dinatale:date &amp;gt; something

zwicky96@dinatale:ls -l something
-rw------- 1 dinatale dinatale 29 Sep  1 15:45 something

zwicky96@dinatale:rm something

zwicky96@dinatale:ls -al                                                                          
total 54
drwx------  2 dinatale lcstaff 43008 Sep  1 15:46 .
dr-xr-xr-x 18 dinatale lcstaff 11776 Aug 31 11:32 ..

zwicky96@dinatale:mkdir something
mkdir: cannot create directory `something&apos;: Operation not permitted

zwicky96@dinatale:ls -al            
total 54
drwx------  2 dinatale lcstaff 43008 Sep  1 15:46 .
dr-xr-xr-x 18 dinatale lcstaff 11776 Aug 31 11:32 ..

zwicky96@dinatale:rpm -q lustre
lustre-2.7.57-2.6.32_504.16.2.1chaos.ch5.3.x86_64_gea38322.x86_64

zwicky96@dinatale:distro_version
toss 2.3-6.ch5.3

zwicky96@dinatale:lfs getdirstripe .
.
lmv_stripe_count: 4 lmv_stripe_offset: 0
mdtidx           FID[seq:oid:ver]
     0           [0x200000453:0x1ff:0x0]
     1           [0x280000411:0x1ff:0x0]
     2           [0x24000041c:0x1fe:0x0]
     3           [0x2c000040b:0x1fd:0x0]

zwicky96@dinatale:pwd
/p/ldne/dinatale/count4_index0

zwicky96@dinatale:ls -ld ../count4_index*
drwx------ 2 dinatale lcstaff 43008 Sep  1 15:46 ../count4_index0
drwx------ 2 dinatale lcstaff 43008 Sep  1 14:00 ../count4_index1
drwx------ 2 dinatale lcstaff 43008 Sep  1 14:00 ../count4_index2
drwx------ 2 dinatale lcstaff 43008 Sep  1 14:00 ../count4_index3

zwicky96@dinatale:ls -ld ../count3_index*
drwx------ 3 dinatale lcstaff 32256 Sep  1 14:06 ../count3_index0
drwx------ 3 dinatale lcstaff 32256 Sep  1 14:06 ../count3_index1
drwx------ 3 dinatale lcstaff 32256 Sep  1 14:06 ../count3_index2
drwx------ 3 dinatale lcstaff 32256 Sep  1 14:06 ../count3_index3

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;We are running 4 MDSs each w/ 1 MDT, 2 OSSs each w/ 1 OST, and clients are running the same lustre version as the servers. Backend is zfs.&lt;/p&gt;</description>
                <environment>lustre-2.7.57-2.6.32_504.16.2.1chaos.ch5.3.x86_64_gea38322.x86_64&lt;br/&gt;
Redhat 2.6.32-504.16.2.1chaos.ch5.3.x86_64</environment>
        <key id="31878">LU-7093</key>
            <summary>mkdir: cannot create directory: Operation not permitted</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="2" iconUrl="https://jira.whamcloud.com/images/icons/priorities/critical.svg">Critical</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="di.wang">Di Wang</assignee>
                                    <reporter username="dinatale2">Giuseppe Di Natale</reporter>
                        <labels>
                            <label>dne</label>
                            <label>llnl</label>
                            <label>zfs</label>
                    </labels>
                <created>Wed, 2 Sep 2015 20:52:45 +0000</created>
                <updated>Tue, 20 Sep 2016 02:57:57 +0000</updated>
                            <resolved>Thu, 17 Sep 2015 16:53:20 +0000</resolved>
                                    <version>Lustre 2.8.0</version>
                                    <fixVersion>Lustre 2.8.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>10</watches>
                                                                            <comments>
                            <comment id="126099" author="dinatale2" created="Wed, 2 Sep 2015 20:53:51 +0000"  >&lt;p&gt;Linked &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-7013&quot; title=&quot;replay-single test_110c: FAIL: create striped dir failed &quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-7013&quot;&gt;&lt;del&gt;LU-7013&lt;/del&gt;&lt;/a&gt;. That issue may or may not be related, but it is a test involving a mkdir.&lt;/p&gt;</comment>
                            <comment id="126118" author="ofaaland" created="Thu, 3 Sep 2015 00:49:50 +0000"  >&lt;p&gt;Attached debug log output from the MDS nodes, dumped after &quot;mkdir something&quot; which failed as Joe described.&lt;/p&gt;

&lt;p&gt;See call to mdt_md_create() on line 29 of dne-count4.debug.zwicky-ldne-mds1.after&lt;/p&gt;

&lt;p&gt;We can gather other information as required - just let us know.&lt;/p&gt;</comment>
                            <comment id="126119" author="ofaaland" created="Thu, 3 Sep 2015 00:52:42 +0000"  >&lt;p&gt;Some FIDs in case they help with interpreting logs:&lt;/p&gt;

&lt;p&gt;/p/ldne/dinatale/count4_index0&lt;br/&gt;
lmv_stripe_count: 4 lmv_stripe_offset: 0&lt;br/&gt;
mdtidx           FID&lt;span class=&quot;error&quot;&gt;&amp;#91;seq:oid:ver&amp;#93;&lt;/span&gt;&lt;br/&gt;
     0           &lt;span class=&quot;error&quot;&gt;&amp;#91;0x200000453:0x1ff:0x0&amp;#93;&lt;/span&gt;&lt;br/&gt;
     1           &lt;span class=&quot;error&quot;&gt;&amp;#91;0x280000411:0x1ff:0x0&amp;#93;&lt;/span&gt;&lt;br/&gt;
     2           &lt;span class=&quot;error&quot;&gt;&amp;#91;0x24000041c:0x1fe:0x0&amp;#93;&lt;/span&gt;&lt;br/&gt;
     3           &lt;span class=&quot;error&quot;&gt;&amp;#91;0x2c000040b:0x1fd:0x0&amp;#93;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;/p/ldne:  &lt;span class=&quot;error&quot;&gt;&amp;#91;0x200000007:0x1:0x0&amp;#93;&lt;/span&gt;                                                          &lt;br/&gt;
/p/ldne/dinatale:  &lt;span class=&quot;error&quot;&gt;&amp;#91;0x200000404:0x1:0x0&amp;#93;&lt;/span&gt;                                                 &lt;br/&gt;
/p/ldne/dinatale/count4_index0:  &lt;span class=&quot;error&quot;&gt;&amp;#91;0x200000457:0x1208:0x0&amp;#93;&lt;/span&gt;                                &lt;/p&gt;

&lt;p&gt;zwicky96@dinatale:sudo lfs getdirstripe /p/ldne/dinatale                                 &lt;br/&gt;
/p/ldne/dinatale                                                                         &lt;br/&gt;
lmv_stripe_count: 0 lmv_stripe_offset: 0&lt;/p&gt;</comment>
                            <comment id="126194" author="di.wang" created="Thu, 3 Sep 2015 16:39:41 +0000"  >&lt;p&gt;Hmm, did you set default directory stripeEA on count4_index0 ? Please check. &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 getdirstripe -D count4_index0
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt; According to the debug log, it seems it try to create a remote directory under the count4_index0&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;00000004:00000002:9.0:1441148647.363955:0:21353:0:(mdt_reint.c:308:mdt_md_create()) @@@ Create  (something-&amp;gt;[0x200000479:0x583a:0x0]) in [0x2c000040b:0x1fd:0x0]  req@ffff880ea0a31cc0 x1510173626909920/t0(0) o36-&amp;gt;548c6f4a-55be-90f6-da7e-6f3b85da262e@192.168.120.96@o2ib6:178/0 lens 616/568 e 0 to 0 dl 1441148708 ref 1 fl Interpret:/0/0 rc 0/0
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Something seems on MDT0, but its name entry being assigned to MDT3. If that is what you want, then you need do this on all of your MDS&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@testnode tests]# ../utils/lctl set_param mdt.*.enable_remote_dir_gid=-1
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This will allow all of non-sysadmin users to create cross-MDT objects (striped, remote dir etc) on all of MDTs. &lt;/p&gt;

&lt;p&gt;btw: for normal user to test striped directory, you better include the fix &lt;a href=&quot;http://review.whamcloud.com/13990&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/13990&lt;/a&gt;, which seems not in 2.7.57 yet. So either upgrade to 2.7.58, or apply the fix in your build. thanks.&lt;/p&gt;</comment>
                            <comment id="126199" author="dinatale2" created="Thu, 3 Sep 2015 17:10:43 +0000"  >&lt;p&gt;Here is the output from lfs regarding default stripe for count4_index0.&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;zwicky99@dinatale:lfs getdirstripe -D count4_index0
(Default)count4_index0
lmv_stripe_count: 4 lmv_stripe_offset: 0
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Here is the same lfs output for count3_index0 for comparison.&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;zwicky99@dinatale:lfs getdirstripe -D count3_index0 
(Default)count3_index0
lmv_stripe_count: 3 lmv_stripe_offset: 0
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Again, mkdir fails in count4_index0.&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;zwicky99@dinatale:pwd
/p/ldne/dinatale/count4_index0
zwicky99@dinatale:mkdir something
mkdir: cannot create directory `something&apos;: Operation not permitted
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;But, in count3_index0 it is successful.&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;zwicky99@dinatale:pwd
/p/ldne/dinatale/count3_index0
zwicky99@dinatale:mkdir something
zwicky99@dinatale:ll
total 12
drwx------ 2 dinatale dinatale 11776 Sep  3 10:05 something
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;enable_remote_dir_gid was never set on any of the MDTs and directory creation seems to work in other directories. User dinatale is a non-sysadmin user already. The build we are using to do our testing also appears to include the fix you linked according to our git log.&lt;/p&gt;</comment>
                            <comment id="126217" author="di.wang" created="Thu, 3 Sep 2015 17:59:01 +0000"  >&lt;p&gt;The reason it did not fail on count3_index0 is that its name and directory itself are happen to be assigned both MDT0, so it is not a remote directory, then this remote_dir_gid check will not operate on this operation. But for count4_index0, the name and directory are being assigned to different MDT0, and then this remote_dir_gid check needs to step in.&lt;/p&gt;

&lt;p&gt;Note for striped directory, when creating dir or files under it,  &lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;their name entries will be assigned according its name hash value (FNV-1a hash algorithm by default),   stripe_index = hash_value % stripe_count;&lt;/li&gt;
	&lt;li&gt;If there are not default stripeEA, then the directory itself will be assigned to the same MDT as its name entry, otherwise it will be assigned to the MDT where default stripeEA indicate, which means creating the directory (mkdir something) under a striped directory, which also have default stripeEA (like your case), might create a remote directory.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;So without enable_remote_dir_gid , you will also meet this problem under count3_index0, try to create some directories with other name, like mkdir something1. &lt;/p&gt;

</comment>
                            <comment id="126275" author="dinatale2" created="Thu, 3 Sep 2015 19:50:34 +0000"  >&lt;p&gt;Di, thank you for the explanation. It makes sense now.&lt;/p&gt;

&lt;p&gt;I still find it odd that a user may be allowed to make a striped directory even though they are not allowed to actually create remote directories. Wouldn&apos;t it be better behavior to not permit users to make striped directories if remote directories is disabled? Likewise, if remote directories are enabled and a striped directory exists in the filesystem, then remote directories cannot be disabled?&lt;/p&gt;</comment>
                            <comment id="126303" author="di.wang" created="Thu, 3 Sep 2015 21:54:56 +0000"  >&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;I still find it odd that a user may be allowed to make a striped directory even though they are not allowed to actually create remote directories. 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;hmm, this maybe a problem. I will work on a fix, thanks for finding this. &lt;/p&gt;</comment>
                            <comment id="126411" author="adilger" created="Fri, 4 Sep 2015 17:25:39 +0000"  >&lt;p&gt;I think the check needs to be that if a striped directory exists, the users can create subdirectories under the striped directory regardless of the extra /proc setting. Also, setting the default directory striping itself needs to check the extra /proc setting, but once it is set then the regular user can create subdirectories according to this policy. &lt;/p&gt;</comment>
                            <comment id="126513" author="gerrit" created="Sun, 6 Sep 2015 06:47:29 +0000"  >&lt;p&gt;wangdi (di.wang@intel.com) uploaded a new patch: &lt;a href=&quot;http://review.whamcloud.com/16286&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/16286&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-7093&quot; title=&quot;mkdir: cannot create directory: Operation not permitted&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-7093&quot;&gt;&lt;del&gt;LU-7093&lt;/del&gt;&lt;/a&gt; mdt: Remote operation permission check&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 482a09045f2d8be0681146c01c7c7a248ed0f559&lt;/p&gt;</comment>
                            <comment id="127648" author="gerrit" created="Thu, 17 Sep 2015 16:40:32 +0000"  >&lt;p&gt;Oleg Drokin (oleg.drokin@intel.com) merged in patch &lt;a href=&quot;http://review.whamcloud.com/16286/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/16286/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-7093&quot; title=&quot;mkdir: cannot create directory: Operation not permitted&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-7093&quot;&gt;&lt;del&gt;LU-7093&lt;/del&gt;&lt;/a&gt; mdt: Remote operation permission check&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 703195acc2157969e66cb07946522b918dfd7dea&lt;/p&gt;</comment>
                            <comment id="127651" author="jgmitter" created="Thu, 17 Sep 2015 16:53:20 +0000"  >&lt;p&gt;Landed for 2.8.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="31501">LU-7013</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="28997">LU-6341</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="18846" name="dne-count4.debug.zwicky-ldne-mds1.after" size="16850" author="ofaaland" created="Thu, 3 Sep 2015 00:49:50 +0000"/>
                            <attachment id="18847" name="dne-count4.debug.zwicky-ldne-mds2.after" size="2904" author="ofaaland" created="Thu, 3 Sep 2015 00:49:50 +0000"/>
                            <attachment id="18848" name="dne-count4.debug.zwicky-ldne-mds3.after" size="2901" author="ofaaland" created="Thu, 3 Sep 2015 00:49:50 +0000"/>
                            <attachment id="18849" name="dne-count4.debug.zwicky-ldne-mds4.after" size="2905" author="ofaaland" created="Thu, 3 Sep 2015 00:49:50 +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|hzxm87:</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>