<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:53:16 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-12515] Provide an interface to set OST/client into readonly mode</title>
                <link>https://jira.whamcloud.com/browse/LU-12515</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;There was an outage on our site where a script was deleting tons of valuable data from Lustre file systems. It takes some times to figure out the problematic script and kill it.&lt;/p&gt;

&lt;p&gt;It seems like Lustre lacks of a functionality to set the whole file system into readonly mode, which is useful in this case because it can help stop bleeding immediately.&lt;/p&gt;</description>
                <environment></environment>
        <key id="56283">LU-12515</key>
            <summary>Provide an interface to set OST/client into readonly mode</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="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>
                            <label>easy</label>
                    </labels>
                <created>Fri, 5 Jul 2019 20:56:00 +0000</created>
                <updated>Wed, 13 Oct 2021 23:03:32 +0000</updated>
                                            <version>Lustre 2.13.0</version>
                                                        <due></due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                                            <comments>
                            <comment id="250780" author="adilger" created="Fri, 5 Jul 2019 21:00:29 +0000"  >&lt;p&gt;As an enhancement to the &lt;tt&gt;mdt.&amp;#42;.readonly&lt;/tt&gt; parameter added in patch &lt;a href=&quot;https://review.whamcloud.com/33892&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/33892&lt;/a&gt; &quot;&lt;tt&gt;&lt;a href=&quot;https://jira.whamcloud.com/browse/LU-11811&quot; title=&quot;Provide an interface to set Lustre MDT into readonly mode&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-11811&quot;&gt;&lt;del&gt;LU-11811&lt;/del&gt;&lt;/a&gt; mdt: Add a proc entry to set MDT to readonly&lt;/tt&gt;&quot;, it would be useful to be able to set all OSTs readonly in a similar manner, or set individual clients or nodemaps as readonly.  This would allow a server-side enforcement to avoid modifying the filesystem, either globally or on a per client/group basis.&lt;/p&gt;

&lt;p&gt;I think adding the per-OST &lt;tt&gt;obdfilter.&amp;#42;.readonly&lt;/tt&gt; parameter should be relatively easy to implement, possibly moving this up into generic target request handling code for both the mdt and and obdfilter in &lt;tt&gt;tgt_request_preprocess()&lt;/tt&gt;.  Adding a per-export {&lt;tt&gt;obdfilter,mdt}.&amp;#42;.exports.&amp;#42;.readonly&lt;/tt&gt; parameter that sets a flag in &lt;tt&gt;struct obd_export&lt;/tt&gt; and checks for it in &lt;tt&gt;tgt_request_preprocess()&lt;/tt&gt; should also be fairly straight forward since there is already checking for the per-export &lt;tt&gt;OBD_CONNECT_RDONLY&lt;/tt&gt; connect flag.&lt;/p&gt;

&lt;p&gt;Adding a per-nodemap readonly flag also seems mostly straight forward, since the nodemap is determined in &lt;tt&gt;tgt_ost_body_unpack()&lt;/tt&gt; inside &lt;tt&gt;tgt_request_preprocess()&lt;/tt&gt; and could be used to make a per-nodemap decision at that point.  However, I don&apos;t see the nodemap being accessed in the corresponding &lt;tt&gt;tgt_mdt_body_unpack()&lt;/tt&gt;, which is a bit inconsistent and should be cleaned up but needs some investigation first.  It would be &lt;em&gt;possible&lt;/em&gt; to just grab the nodemap in &lt;tt&gt;tgt_mdt_body_unpack()&lt;/tt&gt; for checking the per-nodemap readonly flag, but this seems like it would be duplicating the effort done in various places in the MDT code, and it would be better to do it in only one place.  Alternately, when clients connect using a specific nodemap, the per-client export readonly flag could be set, but this may complicate things if the nodemap readonly flag is removed at runtime, or if a client is removed from that nodemap (though these may be corner cases that are not important enough for the first revision).&lt;/p&gt;

&lt;p&gt;It would make sense to set this by default on MDTs/OSTs when snapshots are being mounted.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10324">
                    <name>Cloners</name>
                                            <outwardlinks description="Clones">
                                        <issuelink>
            <issuekey id="54348">LU-11811</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|i00ja7:</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>