<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 03:04:46 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-13853] Describe syntax for rule based  auto PCC caching</title>
                <link>https://jira.whamcloud.com/browse/LU-13853</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;Where user can find patterns and syntax to describe rules?&lt;/p&gt;

&lt;p&gt;According to the task &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-10918&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;https://jira.whamcloud.com/browse/LU-10918&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;user has some form of language. So it is unclear what elements and what combinations can be applied, how to form rules. This can be included in Lustre manual with examples or in other document. (wiki page? )&lt;/p&gt;

&lt;p&gt;For instance fname={*.doc} is applicable and works,&#160; but what about patterns such as&lt;/p&gt;

&lt;p&gt;&quot;fname={file*} &quot;fname={*file} ?&lt;/p&gt;

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

&lt;p&gt;For two last patterns rule do not work. Consider example below:&lt;/p&gt;

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

&lt;p&gt;/usr/sbin/lctl pcc list /mnt/lustre&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
/usr/sbin/lctl pcc add /mnt/lustre /mnt/pccro -p &lt;span class=&quot;code-quote&quot;&gt;&quot;fname={file*} roid=4&quot;&lt;/span&gt;
/usr/sbin/lctl pcc list /mnt/lustre 

pcc:&#160; 
-&#160;&#160;&#160; pccpath: /mnt/pccro&#160;&#160;&#160; 
hsmtool: posix&#160;&#160;&#160; 
rwid: 4&#160;&#160;&#160; 
roid: 4&#160;&#160;&#160; 
flags: 3e&#160;&#160;&#160; 
autocache: fname={file*}

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;After file was created echo &amp;gt; /mnt/lustre/file1&lt;/p&gt;

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

&lt;p&gt;pdsh -w trevis-59vm&lt;span class=&quot;error&quot;&gt;&amp;#91;10-12&amp;#93;&lt;/span&gt; lfs pcc state /mnt/lustre/file1&lt;/p&gt;

&lt;p&gt;trevis-59vm11: file: /mnt/lustre/file1, type: none&lt;/p&gt;

&lt;p&gt;trevis-59vm12: file: /mnt/lustre/file1, type: none&lt;/p&gt;

&lt;p&gt;trevis-59vm10: file: /mnt/lustre/file1, type: none&lt;/p&gt;

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

&lt;p&gt;From my point of view&lt;/p&gt;

&lt;p&gt;Expected: /mnt/lustre/file1 in cached state&lt;/p&gt;

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

&lt;p&gt;So it is good to have answerst to questions below:&lt;/p&gt;

&lt;p&gt;What elements are available in fname? Is it globbing *, ?, [] syntax supported? or it is some form of custom syntax?&lt;/p&gt;

&lt;p&gt;Is it possible to use directory names and slash &quot;/&quot; symbol in pattern?&#160; &lt;br/&gt;
 What other syntax elements are available? logical operators? (not, or, and ?) closing elements {} - are they necessary?)&lt;/p&gt;

&lt;p&gt;What is other keywords uid, projid etc?&lt;br/&gt;
 Does user need&#160; to specify this rule at all? Why it rule can&apos;t be empty?&lt;/p&gt;</description>
                <environment></environment>
        <key id="60255">LU-13853</key>
            <summary>Describe syntax for rule based  auto PCC caching</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="4" iconUrl="https://jira.whamcloud.com/images/icons/priorities/minor.svg">Minor</priority>
                        <status id="6" iconUrl="https://jira.whamcloud.com/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="6">Not a Bug</resolution>
                                        <assignee username="qian_wc">Qian Yingjin</assignee>
                                    <reporter username="vilapa">Vikentsi Lapa</reporter>
                        <labels>
                    </labels>
                <created>Tue, 4 Aug 2020 15:10:40 +0000</created>
                <updated>Wed, 5 Aug 2020 08:10:32 +0000</updated>
                            <resolved>Wed, 5 Aug 2020 08:10:32 +0000</resolved>
                                    <version>Lustre 2.14.0</version>
                                                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                            <comments>
                            <comment id="276663" author="qian_wc" created="Tue, 4 Aug 2020 15:25:45 +0000"  >&lt;p&gt;I tested and got the results as expected:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
[root@qian tests]# ../utils/lctl pcc add /mnt/lustre /mnt/pcc -p &lt;span class=&quot;code-quote&quot;&gt;&quot;fname={file*} roid=4&quot;&lt;/span&gt;
[root@qian tests]# echo &lt;span class=&quot;code-quote&quot;&gt;&quot;djfldj&quot;&lt;/span&gt; &amp;gt; /mnt/lustre/file1
[root@qian tests]# ../utils/lctl pcc list /mnt/lustre
pcc:
  -
    pccpath: /mnt/pcc
    hsmtool: posix
    rwid: 4
    roid: 4
    flags: 3e
    autocache: fname={file*}
[root@qian tests]# ../utils/lfs pcc state /mnt/lustre/file1 
file: /mnt/lustre/file1, type: readwrite, PCC file: /mnt/pcc/0001/0000/0401/0000/0002/0000/0x200000401:0x1:0x0, user number: 0, flags: 0

[root@qian tests]# ../utils/lctl pcc add /mnt/lustre /mnt/pcc -p &lt;span class=&quot;code-quote&quot;&gt;&quot;fname={file*} roid=4 ropcc=1&quot;&lt;/span&gt;
[root@qian tests]# ../utils/lctl pcc list /mnt/lustre
pcc:
  -
    pccpath: /mnt/pcc
    hsmtool: posix
    rwid: 0
    roid: 4
    flags: 2e
    autocache: fname={file*}
[root@qian tests]# echo &lt;span class=&quot;code-quote&quot;&gt;&quot;QQQQQQ&quot;&lt;/span&gt; &amp;gt; /mnt/lustre/file2
[root@qian tests]# ../utils/lfs pcc state /mnt/lustre/file2
file: /mnt/lustre/file2, type: readonly, PCC file: /mnt/pcc/0002/0000/0401/0000/0002/0000/0x200000401:0x2:0x0, user number: 0, flags: 0
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;


</comment>
                            <comment id="276677" author="qian_wc" created="Wed, 5 Aug 2020 01:34:17 +0000"  >&lt;p&gt;The fname currently only supports wildcard &quot;*&quot; matching. ? is not supported.&lt;/p&gt;

&lt;p&gt;The Manual has described that:&lt;br/&gt;
&quot;&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
The following command adds a PCC backend on a client:

client# lctl pcc add /mnt/lustre /mnt/pcc  --param &lt;span class=&quot;code-quote&quot;&gt;&quot;projid={500,1000}&amp;amp;fname={*.h5},uid=1001 rwid=2&quot;&lt;/span&gt;
The first substring of the config parameter is the auto-cache rule, where &lt;span class=&quot;code-quote&quot;&gt;&quot;&amp;amp;&quot;&lt;/span&gt; represents the logical AND &lt;span class=&quot;code-keyword&quot;&gt;operator&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;code-quote&quot;&gt;&quot;,&quot;&lt;/span&gt; represents the logical OR &lt;span class=&quot;code-keyword&quot;&gt;operator&lt;/span&gt;. The example rule means that &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; files are only auto cached &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; either of the following conditions are satisfied:

The project ID is either 500 or 1000 and the suffix of the file name is &lt;span class=&quot;code-quote&quot;&gt;&quot;h5&quot;&lt;/span&gt;;

The user ID is 1001;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&quot;&lt;/p&gt;


&lt;p&gt;In the current implementation, the rule can not be empty.&lt;/p&gt;</comment>
                            <comment id="276694" author="vilapa" created="Wed, 5 Aug 2020 08:01:12 +0000"  >&lt;p&gt;Thank you for answers and explanation.&#160; I found what was missed in my command. This time it was user error (my error), I have not specified ropcc=1 option.&#160; Do we have something like FAQ or wiki page with user interface description for PCC? I think user errors like this one is good to describe and include in docs.&lt;/p&gt;</comment>
                            <comment id="276695" author="qian_wc" created="Wed, 5 Aug 2020 08:07:38 +0000"  >&lt;p&gt;Sorry, we don&apos;t have FAQ or wiki page excepted Lustre manual.&lt;/p&gt;

&lt;p&gt;I will update the Lustre manual about PCC accordingly later.&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
Qian&lt;/p&gt;</comment>
                            <comment id="276696" author="vilapa" created="Wed, 5 Aug 2020 08:10:32 +0000"  >&lt;p&gt;I have missed ropcc= option. So I tried with option&#160; and command works as expected. &lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;root@trevis-59vm9 ~&amp;#93;&lt;/span&gt;# echo testtest &amp;gt; /mnt/lustre/file1&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;root@trevis-59vm9 ~&amp;#93;&lt;/span&gt;# lfs pcc state /mnt/lustre/file1&lt;br/&gt;
file: /mnt/lustre/file1, type: readonly, PCC file: /mnt/pccro/0010/0000/0401/0000/0002/0000/0x200000401:0x10:0x0, user number: 0, flags: 0&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                    </comments>
                    <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|i016xj:</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>