<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:23:02 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-9074] Read-only Bind Mount of Lustre Allows File Creation</title>
                <link>https://jira.whamcloud.com/browse/LU-9074</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;On attempting to set up some read-only bind mounts on nodes in order to provide pseudo isolation within the single namespace of a Lustre FS, the following issue is seen.&lt;/p&gt;

&lt;p&gt;After the read-only bind mount is created on Lustre mount /work, files can still be created. Although the created file cannot be written to:&lt;/p&gt;

&lt;p&gt;Set up the bind mount using /work:&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; # mount --bind /work /tmp/bind_ro/

 # mount -o remount,ro /tmp/bind_ro/

 # mount | grep bind_ro
 /work on /tmp/bind_ro type none (ro,bind)

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Touch a file that does not exist, which yields an error.&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 /tmp/bind_ro/gbrown
 touch: cannot touch `/tmp/bind_ro/gbrown&apos;: Read-only file system

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;It would be expected that the preceding &apos;touch&apos; did not create a file.&lt;/p&gt;

&lt;p&gt;However, a file was created:&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; ls -l /tmp/bind_ro/gbrown
 -rw-r--r-- 1 root root 0 Sep  9 13:59 /tmp/bind_ro/gbrown

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Though the file was created, it cannot be written to:&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;We can&apos;t write data to the file, the cat below returns no output.

 # echo foo &amp;gt; /tmp/bind_ro/gbrown
 -bash: /tmp/bind_ro/gbrown: Read-only file system
 
 # cat /tmp/bind_ro/gbrown

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Comparatively, no file is created when the read-only bind mount is executed on NFS::&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; # mount --bind /cm/shared/ /tmp/bind_ro/

 # mount -o remount,ro /tmp/bind_ro/
 
 # touch /tmp/bind_ro/gbrown
 touch: cannot touch `/tmp/bind_ro/gbrown&apos;: Read-only file system
 
 # ls -l /tmp/bind_ro/gbrown
 ls: cannot access /tmp/bind_ro/gbrown: No such file or directory 

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;The following are strace excerpts comparing the &apos;touch&apos; process between Lustre and NFS:&lt;/p&gt;

&lt;p&gt;Attempting to touch a file within a read-only bind mount of a Lustre FS.&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; # strace -v -s 1024 touch foobar 2&amp;gt;&amp;amp;1 | tee /tmp/strace_lustre.out
 
 ...
 
 futex(0x7fffffff925c, FUTEX_WAKE_PRIVATE, 1) = 0
 futex(0x7fffffff925c, 0x189 /* FUTEX_??? */, 1, NULL, 2aaaab470700) = -1 EAGAIN (Resource temporarily unavailable)
 rt_sigaction(SIGRTMIN, {0x2aaaab2588f0, [], SA_RESTORER|SA_SIGINFO, 0x2aaaab262850}, NULL, 8) = 0
 rt_sigaction(SIGRT_1, {0x2aaaab258980, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x2aaaab262850}, NULL, 8) = 0
 rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
 getrlimit(RLIMIT_STACK, {rlim_cur=RLIM_INFINITY, rlim_max=RLIM_INFINITY}) = 0
 brk(0)                                  = 0x60e000
 brk(0x62f000)                           = 0x62f000
 open(&quot;foobar&quot;, O_WRONLY|O_CREAT|O_NOCTTY|O_NONBLOCK, 0666) = -1 EROFS (Read-only file system)
 utimensat(AT_FDCWD, &quot;foobar&quot;, NULL, 0)  = -1 EROFS (Read-only file system)
 write(2, &quot;touch: &quot;, 7touch: )                  = 7
 write(2, &quot;cannot touch `foobar&apos;&quot;, 21cannot touch `foobar&apos;)   = 21
 write(2, &quot;: Read-only file system&quot;, 23: Read-only file system) = 23
 write(2, &quot;\n&quot;, 1
 )                       = 1
 close(1)                                = 0
 close(2)                                = 0
 exit_group(1)                           = ?

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;File is created.&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; # stat foobar
 
   File: `foobar&apos;
   Size: 0               Blocks: 0          IO Block: 4194304 regular empty file
 Device: 886a9b20h/2288687904d   Inode: 144116072587526409  Links: 1
 Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
 Access: 2016-09-21 07:51:29.000000000 +0000
 Modify: 2016-09-21 07:51:29.000000000 +0000
 Change: 2016-09-21 07:51:29.000000000 +0000
  Birth: -

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Attempting to touch a file within a read-only bind mount of a NFS FS.&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; # strace -v -s 1024 touch foobar 2&amp;gt;&amp;amp;1 | tee /tmp/strace_nfs.out
 
 ...
 
 futex(0x7fffffff925c, FUTEX_WAKE_PRIVATE, 1) = 0
 futex(0x7fffffff925c, 0x189 /* FUTEX_??? */, 1, NULL, 2aaaab470700) = -1 EAGAIN (Resource temporarily unavailable)
 rt_sigaction(SIGRTMIN, {0x2aaaab2588f0, [], SA_RESTORER|SA_SIGINFO, 0x2aaaab262850}, NULL, 8) = 0
 rt_sigaction(SIGRT_1, {0x2aaaab258980, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x2aaaab262850}, NULL, 8) = 0
 rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
 getrlimit(RLIMIT_STACK, {rlim_cur=RLIM_INFINITY, rlim_max=RLIM_INFINITY}) = 0
 brk(0)                                  = 0x60e000
 brk(0x62f000)                           = 0x62f000
 open(&quot;foobar&quot;, O_WRONLY|O_CREAT|O_NOCTTY|O_NONBLOCK, 0666) = -1 EROFS (Read-only file system)
 utimensat(AT_FDCWD, &quot;foobar&quot;, NULL, 0)  = -1 ENOENT (No such file or directory)
 write(2, &quot;touch: &quot;, 7touch: )                  = 7
 write(2, &quot;cannot touch `foobar&apos;&quot;, 21cannot touch `foobar&apos;)   = 21
 write(2, &quot;: Read-only file system&quot;, 23: Read-only file system) = 23
 write(2, &quot;\n&quot;, 1
 )                       = 1
 close(1)                                = 0
 close(2)                                = 0
 exit_group(1)                           = ?

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;File is not created.&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; # stat foobar
 
 stat: cannot stat `foobar&apos;: No such file or directory

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</description>
                <environment></environment>
        <key id="43486">LU-9074</key>
            <summary>Read-only Bind Mount of Lustre Allows File Creation</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="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="wc-triage">WC Triage</assignee>
                                    <reporter username="noopur.maheshwari">Noopur Maheshwari</reporter>
                        <labels>
                    </labels>
                <created>Thu, 2 Feb 2017 10:22:03 +0000</created>
                <updated>Tue, 27 Jun 2017 09:03:53 +0000</updated>
                            <resolved>Mon, 19 Jun 2017 16:33:06 +0000</resolved>
                                                    <fixVersion>Lustre 2.10.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>6</watches>
                                                                            <comments>
                            <comment id="183028" author="gerrit" created="Thu, 2 Feb 2017 11:02:23 +0000"  >&lt;p&gt;Noopur Maheshwari (noopur.maheshwari@seagate.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/25204&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/25204&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-9074&quot; title=&quot;Read-only Bind Mount of Lustre Allows File Creation&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-9074&quot;&gt;&lt;del&gt;LU-9074&lt;/del&gt;&lt;/a&gt; tests: test file creation for ro bind mnt&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: e4f0facb3497bddb2e2129005990f169d722fa60&lt;/p&gt;</comment>
                            <comment id="183029" author="gerrit" created="Thu, 2 Feb 2017 11:02:32 +0000"  >&lt;p&gt;Noopur Maheshwari (noopur.maheshwari@seagate.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/25205&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/25205&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-9074&quot; title=&quot;Read-only Bind Mount of Lustre Allows File Creation&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-9074&quot;&gt;&lt;del&gt;LU-9074&lt;/del&gt;&lt;/a&gt; llite: Stop file creation for ro bind mnt&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 67314ddc726a9aa528f3f827aed52f929331fbdf&lt;/p&gt;</comment>
                            <comment id="199608" author="gerrit" created="Mon, 19 Jun 2017 16:27:53 +0000"  >&lt;p&gt;Oleg Drokin (oleg.drokin@intel.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/25204/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/25204/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-9074&quot; title=&quot;Read-only Bind Mount of Lustre Allows File Creation&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-9074&quot;&gt;&lt;del&gt;LU-9074&lt;/del&gt;&lt;/a&gt; llite: Stop file creation for ro bind mnt&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 6da95b1d20ebd32eace18f28070b446155588eff&lt;/p&gt;</comment>
                            <comment id="199615" author="pjones" created="Mon, 19 Jun 2017 16:33:06 +0000"  >&lt;p&gt;Landed for 2.10&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                                        </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|hzz2c7:</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>