<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:28:23 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-9689] lfs getstripe does not print globbed file names when using options such as --stripe-count and --stripe-size</title>
                <link>https://jira.whamcloud.com/browse/LU-9689</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;Apologies if duplicate (didn&apos;t see anything on quick search).&lt;/p&gt;

&lt;p&gt;Normally, when using &quot;lfs getstripe&quot; on globbed files (e.g. &quot;lfs getstripe dir/*&quot;) without any options, the stripe information will be prefaced with a file name:&lt;/p&gt;

&lt;p&gt;$ lfs getstripe 64g.64/1g.&lt;span class=&quot;error&quot;&gt;&amp;#91;12&amp;#93;&lt;/span&gt;&lt;br/&gt;
64g.64/1g.1&lt;br/&gt;
lmm_stripe_count:   1&lt;br/&gt;
lmm_stripe_size:    1048576&lt;br/&gt;
lmm_pattern:        1&lt;br/&gt;
lmm_layout_gen:     0&lt;br/&gt;
lmm_stripe_offset:  28&lt;br/&gt;
        obdidx           objid           objid           group&lt;br/&gt;
            28           22888         0x5968                0&lt;/p&gt;

&lt;p&gt;64g.64/1g.2&lt;br/&gt;
lmm_stripe_count:   1&lt;br/&gt;
lmm_stripe_size:    1048576&lt;br/&gt;
lmm_pattern:        1&lt;br/&gt;
lmm_layout_gen:     0&lt;br/&gt;
lmm_stripe_offset:  41&lt;br/&gt;
        obdidx           objid           objid           group&lt;br/&gt;
            41           22884         0x5964                0&lt;/p&gt;

&lt;p&gt;If, however, you only want a subset of the information (e.g. just the count and size), it just spits out the count and size of every file without showing the associated file name:&lt;/p&gt;

&lt;p&gt;$ lfs getstripe --stripe-count --stripe-size 64g.64/1g.&lt;span class=&quot;error&quot;&gt;&amp;#91;12&amp;#93;&lt;/span&gt;&lt;br/&gt;
lmm_stripe_count:   1&lt;br/&gt;
lmm_stripe_size:    1048576&lt;br/&gt;
lmm_stripe_count:   1&lt;br/&gt;
lmm_stripe_size:    1048576&lt;/p&gt;


&lt;p&gt;For consistency and parseability, it would be nice if this was consistent and it would also print the file name like so when multiple files given:&lt;/p&gt;

&lt;p&gt;$ lfs getstripe --stripe-count 64g.64/1g.&lt;span class=&quot;error&quot;&gt;&amp;#91;12&amp;#93;&lt;/span&gt;  #### PROPOSED ####&lt;br/&gt;
64g.64/1g.1&lt;br/&gt;
lmm_stripe_count:   1&lt;br/&gt;
lmm_stripe_size:    1048576&lt;br/&gt;
64g.64/1g.2&lt;br/&gt;
lmm_stripe_count:   1&lt;br/&gt;
lmm_stripe_size:    1048576&lt;/p&gt;


&lt;p&gt;Likewise, there is an inconsistency between when you give just one specifier vs. when you specify two or more.  For instance, if you just specify --stripe-count, it does not give the &quot;lmm_stripe_count:&quot; prefix whereas it does when you also specify something else like --stripe-size above.  &lt;/p&gt;

&lt;p&gt;$ lfs getstripe --stripe-count 64g.64/1g.&lt;span class=&quot;error&quot;&gt;&amp;#91;12&amp;#93;&lt;/span&gt;&lt;br/&gt;
1&lt;br/&gt;
1&lt;/p&gt;


&lt;p&gt;Ideally, it seems like you would want the options like --stripe-count to act just like the default no-option case except just printing the requested subset.&lt;/p&gt;

&lt;p&gt;Thanks.&lt;/p&gt;</description>
                <environment>sles11sp4</environment>
        <key id="46779">LU-9689</key>
            <summary>lfs getstripe does not print globbed file names when using options such as --stripe-count and --stripe-size</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="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="3">Duplicate</resolution>
                                        <assignee username="pjones">Peter Jones</assignee>
                                    <reporter username="kolano">Paul Kolano</reporter>
                        <labels>
                    </labels>
                <created>Mon, 19 Jun 2017 23:38:35 +0000</created>
                <updated>Mon, 31 Jan 2022 01:35:27 +0000</updated>
                            <resolved>Sun, 17 Dec 2017 08:44:29 +0000</resolved>
                                    <version>Lustre 2.7.0</version>
                                                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                            <comments>
                            <comment id="199655" author="kolano" created="Mon, 19 Jun 2017 23:44:51 +0000"  >&lt;p&gt;oops, sorry, the &quot;proposed output&quot; command line should also have --stripe-size specified&lt;/p&gt;</comment>
                            <comment id="199746" author="adilger" created="Tue, 20 Jun 2017 17:47:35 +0000"  >&lt;p&gt;The lack of field names and file names when fetching a specific attribute is intentional. This allows scripts to easily fetch a specific attribute such as the stripe count or stripe size for a file, without having to parse the output. &lt;/p&gt;

&lt;p&gt;If you want to fetch multiple attributes at one time, and the script is already going to parse the field names, then it is easier to just print all of the fields and parse out the fields of interest from the output. &lt;/p&gt;

&lt;p&gt;I can agree that in the unusual case where multiple fields are being fetched from multiple files that it may be desirable to have the file name separator, but there are two complications with this. It isn&apos;t necessarily known in advance whether multiple files will be matched, so making this conditional may be complex. Secondly, this changes the output format for a command that has been used for many years, so it could not be the default behavior. &lt;/p&gt;

&lt;p&gt;I guess the larger question is what you want to do with the getstripe output?  Is it for script use or human consumption?&lt;/p&gt;</comment>
                            <comment id="216529" author="adilger" created="Sun, 17 Dec 2017 08:44:17 +0000"  >&lt;p&gt;The &quot;&lt;tt&gt;lfs -printf&lt;/tt&gt;&quot; functionality will allow printing out arbitrarily-formatted output and fields, either for easier parsing and usage by other programs.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="68412">LU-15504</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="49717">LU-10378</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|hzzfef:</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>