<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:58:59 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-13171] per-component attribute to prevent automated component migration/mirroring</title>
                <link>https://jira.whamcloud.com/browse/LU-13171</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;It would be useful to add an attribute to a file component that prevents it from being automatically migrated to another storage pool or removed.  This is useful, for example, to keep files in a flash pool because it is known that the file is accessed frequently with a poor IO pattern, because it is a VIP user, or whatever.  This could be set on file components on an arbitrary basis, rather than having to describe a very complex policy to exclude specific files by pathname or FID.&lt;/p&gt;

&lt;p&gt;It may also be useful to similarly force a file to be kept in a disk pool because it is known to always be accessed via large streaming IOs, and even if it is frequently accessed, the aggregate bandwidth of the spinning storage is higher than that of the flash, or the file is so large that it would consume too much of the flash pool, or maybe because the admin really doesn&apos;t like some user.  &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.whamcloud.com/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;

&lt;p&gt;I think there are several possible mechanisms for this:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;per file attribute stored in &lt;tt&gt;LUSTRE&amp;#95;&amp;#42;&amp;#95;FL&lt;/tt&gt; attribute flags of the inode.  There are common &quot;&lt;tt&gt;chattr&lt;/tt&gt;&quot; and &quot;&lt;tt&gt;lsattr&lt;/tt&gt;&quot; flags for changing and showing these attributes.  However, there is not currently anything similar to this functionality in the upstream kernel, and the remaining unused attributes are very limited, and may conflict with other upstream users, so we would have an uphill battle to get something accepted into the kernel.&lt;/li&gt;
	&lt;li&gt;per file attribute stored in &lt;tt&gt;LMAC&amp;#95;&amp;#42;&lt;/tt&gt; or &lt;tt&gt;LMAI&amp;#95;&amp;#42;&lt;/tt&gt; flags in the LMA xattr of the inode.  This has the drawback that we don&apos;t currently have a user interface to set/change these flags, and they are often core to the functionality of the inode and we would (essentially) need per-bit authentication to avoid users doing bad things to their files.&lt;/li&gt;
	&lt;li&gt;per comoponent/mirror flag stored in &lt;tt&gt;LCME&amp;#95;FL&amp;#95;PIN&lt;/tt&gt; flag, similar to &lt;tt&gt;LCME&amp;#95;FL&amp;#95;PREFER&lt;/tt&gt; and &lt;tt&gt;LCME&amp;#95;FL&amp;#95;NOSYNC&lt;/tt&gt;.  This has the benefit that there is already an interface for setting/showing these attributes, even at create time, and they could be set on a per-component basis (e.g. either on the flash or disk components, or both) instead of a per-file basis.  We would need to decide on semantics for what these flags mean if set on only one component of a file mirrored on two different pools.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;I think the third option is the preferred one, since it also ties in nicely with the whole concept of mirroring/pools, etc.  Some open questions on behavior for different cases:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;do we need to limit &lt;tt&gt;LCME&amp;#95;FL&amp;#95;PIN&lt;/tt&gt; to be root-only, or controlled by a tunable like &lt;tt&gt;mdt.&amp;#42;.enable&amp;#95;pin&amp;#95;gid=&amp;lt;0,gid,-1&amp;gt;&lt;/tt&gt; to limit/allow root, admin group, or any user to set the flag?  Otherwise, malicious users could create files in a flash pool and set &lt;tt&gt;LCME&amp;#95;FL&amp;#95;PIN&lt;/tt&gt; on all their files and prevent them from being moved to a cold pool.&lt;/li&gt;
	&lt;li&gt;do we need separate &lt;tt&gt;LCME&amp;#95;FL&amp;#95;PIN&lt;/tt&gt; and &lt;tt&gt;LCME&amp;#95;FL&amp;#95;NOMIRROR&lt;/tt&gt; flags, or is one enough to cover expected uses and two just add confusion for developers and users?&lt;/li&gt;
	&lt;li&gt;would the low-level tools like &quot;&lt;tt&gt;lfs mirror split/delete&lt;/tt&gt;&quot; and &quot;&lt;tt&gt;lfs migrate&lt;/tt&gt;&quot; check and honor these flags (possibly with an &lt;tt&gt;--force-migrate&lt;/tt&gt; option) to mirror/migrate the files despite the presence of the flag(s), or would it be policy engines that use the flag as advice for how to handle the file, but the user/engine could still call the low-level tools to mirror/migrate the file if they really want?&lt;/li&gt;
	&lt;li&gt;what happens if &lt;tt&gt;LCME&amp;#95;FL&amp;#95;PIN&lt;/tt&gt; is on a disk mirror, but not on a flash mirror?  Can the flash mirror be dropped if needed?  Can a new flash mirror be created on such a file, or does it need a separate &lt;tt&gt;LCME&amp;#95;FL&amp;#95;NOMIRROR&lt;/tt&gt; flag to be prevent this?&lt;/li&gt;
	&lt;li&gt;what happens if only some of the components in a mirror have an &lt;tt&gt;LCME&amp;#95;FL&amp;#95;PIN&lt;/tt&gt; flag, but not all components?  Does that prevent the whole mirror from being migrated, or just those components (in the future when it is possible to have partial mirrors)?&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment></environment>
        <key id="57889">LU-13171</key>
            <summary>per-component attribute to prevent automated component migration/mirroring</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="flei">Feng Lei </assignee>
                                    <reporter username="adilger">Andreas Dilger</reporter>
                        <labels>
                    </labels>
                <created>Fri, 24 Jan 2020 21:19:02 +0000</created>
                <updated>Thu, 2 Nov 2023 07:03:43 +0000</updated>
                                                                                <due></due>
                            <votes>0</votes>
                                    <watches>7</watches>
                                                                            <comments>
                            <comment id="323099" author="gerrit" created="Tue, 18 Jan 2022 22:13:25 +0000"  >&lt;p&gt;&quot;Andreas Dilger &amp;lt;adilger@whamcloud.com&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/46181&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/46181&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-13171&quot; title=&quot;per-component attribute to prevent automated component migration/mirroring&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-13171&quot;&gt;LU-13171&lt;/a&gt; utils: add NOMIGRATE flag for file layouts&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 158398ba832edeb90a94c9cd2c83892a05a3d086&lt;/p&gt;</comment>
                            <comment id="323160" author="jhammond" created="Wed, 19 Jan 2022 15:37:38 +0000"  >&lt;p&gt;It seems awkward to use a LCME flag to control a file. What about a flag (LCME_FL_PIN) that prevents the mirror containing the component from being purged?&lt;/p&gt;

&lt;p&gt;Also, it&apos;s much better for readability if use positively phrased flags and identifiers. So, avoiding &quot;XXX_NO_BLAH_BLAH&quot; flags. &lt;/p&gt;</comment>
                            <comment id="391451" author="flei" created="Thu, 2 Nov 2023 07:03:12 +0000"  >&lt;p&gt;There should be 2 requirements:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Define the flag, set/clear it.&lt;/li&gt;
	&lt;li&gt;Enhance &lt;tt&gt;lpurge&lt;/tt&gt; to check and implement the flag.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;This ticket will be used to track req-1. then another ticket will be created to track req-2.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="69262">LU-15693</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <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_10092" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>EX-5711</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10390" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i00sjz:</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>