<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:18: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-1707] Add llapi_* function to return the OST/MDT count for a path.</title>
                <link>https://jira.whamcloud.com/browse/LU-1707</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;It would be valuable to programmatically discover the number of OSTs that are available. An &lt;tt&gt;llapi_*&lt;/tt&gt; function would be a suitable place for this call.&lt;/p&gt;

&lt;h3&gt;&lt;a name=&quot;UseCase&quot;&gt;&lt;/a&gt;Use Case&lt;/h3&gt;
&lt;p&gt;When writing HDF5 files one typically configures the number of writers as a fraction of the number of OSTs for best performance. &lt;/p&gt;

&lt;p&gt;Currently this information is only available by writing a file with stripe count set to -1 and then counting the number of stripes present. A programmatic interface to the OST count would simplify this task.&lt;/p&gt;</description>
                <environment></environment>
        <key id="15409">LU-1707</key>
            <summary>Add llapi_* function to return the OST/MDT count for a path.</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="rhenwood">Richard Henwood</reporter>
                        <labels>
                            <label>llnl</label>
                    </labels>
                <created>Fri, 3 Aug 2012 10:58:49 +0000</created>
                <updated>Tue, 14 Jul 2020 06:43:00 +0000</updated>
                                                                                <due></due>
                            <votes>0</votes>
                                    <watches>7</watches>
                                                                            <comments>
                            <comment id="43744" author="rhenwood" created="Fri, 24 Aug 2012 14:09:30 +0000"  >&lt;p&gt;The current method is:&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;Set a directory to stripe over the all OSTs &lt;tt&gt;lfs setstripe -c -1 ./&lt;/tt&gt;&lt;/li&gt;
	&lt;li&gt;Write a file into the directory.&lt;/li&gt;
	&lt;li&gt;Read the number of stripes the file has &lt;tt&gt;lfs getstripe -q&lt;/tt&gt;. Count using string parsing.&lt;/li&gt;
	&lt;li&gt;Delete the file, and the directory.&lt;/li&gt;
&lt;/ol&gt;
</comment>
                            <comment id="43745" author="rhenwood" created="Fri, 24 Aug 2012 14:19:54 +0000"  >&lt;p&gt;The number of OST&apos;s on the system is available using the command:&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;# lfs osts /mnt/lustre/
OBDS::
0: lustre-OST0000_UUID ACTIVE
1: lustre-OST0001_UUID ACTIVE
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="43748" author="rhenwood" created="Fri, 24 Aug 2012 15:12:20 +0000"  >&lt;p&gt;It seems like the function in &lt;tt&gt;lustreapi.h&lt;/tt&gt; is &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;int llapi_ostlist(char *path, struct find_param *param);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The documentation is, sparse. I&apos;ll try and rustle up a usage example.&lt;/p&gt;</comment>
                            <comment id="72994" author="afn" created="Fri, 6 Dec 2013 16:42:41 +0000"  >
&lt;p&gt;Just noticed this ticket/thread. I also need this functionality from within my code&lt;br/&gt;
and Ned has recommended the undocumented function &quot;llapi_get_obd_count&quot; to get the &lt;br/&gt;
required info in another thread. The problem/difficulty with it is apparently that it&lt;br/&gt;
requires ioctl functionality to work, which is problematic on machines like sequoia.&lt;br/&gt;
The current status right now is that it has a work around to avoid the ioctl, but &lt;br/&gt;
I don&apos;t know how generally effective that workaround is. &lt;/p&gt;

&lt;p&gt;In any case, I&apos;m glad it is more than just me that needs this...things are always&lt;br/&gt;
more likely to get fixed when multiple wheels are squeaking &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;Andy&lt;/p&gt;</comment>
                            <comment id="73042" author="jhammond" created="Sat, 7 Dec 2013 14:47:37 +0000"  >&lt;p&gt;Do we really want to know how many OSTs are available or rather do we want to know what is the maximum stripe count we can get on a file? I suspect it is the latter. If so we should add a function whose name reflects this (say llapi_get_max_stripe_count(int fd/const char *path/...).&lt;/p&gt;

&lt;p&gt;Second, in the lustre source not all OBDs are OSTs, so if we want the OST count then the function should be llapi_get_ost_count().&lt;/p&gt;</comment>
                            <comment id="73045" author="afn" created="Sat, 7 Dec 2013 22:06:42 +0000"  >&lt;p&gt;The thing I want is the maximum number of components I can stripe over from the point of view of my running application.&lt;br/&gt;
I need that quantity for what appears to be exactly the same use case as Richard describes above...setting how many&lt;br/&gt;
(and which) writers I should have.&lt;/p&gt;

&lt;p&gt;So something along the lines of your first suggestion seems the most appropriate for me.&lt;/p&gt;

&lt;p&gt;I&apos;m not really clear on the differences, subtle and not so subtle, between the alphabet soup&lt;br/&gt;
of ost&apos;s, obd&apos;s, oss&apos;s, mds&apos;s mdt&apos;s and so on, so I&apos;ll leave the second issue to you &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;Andy &lt;/p&gt;</comment>
                            <comment id="73097" author="rhenwood" created="Mon, 9 Dec 2013 17:27:19 +0000"  >&lt;p&gt;John: thanks for your thoughts on this.&lt;/p&gt;

&lt;p&gt;Can you provide an example when: the # of available OSTs != maximum stripe count?&lt;/p&gt;</comment>
                            <comment id="73098" author="jhammond" created="Mon, 9 Dec 2013 17:29:53 +0000"  >&lt;p&gt;IIRC any system with more than 2000 OSTs will have this property.&lt;/p&gt;</comment>
                            <comment id="73110" author="rhenwood" created="Mon, 9 Dec 2013 18:23:14 +0000"  >&lt;p&gt;I understand. My interpretation is now that both Andy and myself do want the &apos;maximum stripe count&apos;, as you suggested.&lt;/p&gt;</comment>
                            <comment id="73114" author="morrone" created="Mon, 9 Dec 2013 18:57:23 +0000"  >&lt;p&gt;An even simpler case:  A filesystem has 100 OSTs, but one is marked inactive.  The function should return 99 in that case.&lt;/p&gt;</comment>
                            <comment id="88635" author="simmonsja" created="Wed, 9 Jul 2014 19:22:13 +0000"  >&lt;p&gt;While looking at &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-2182&quot; title=&quot;Add llapi_file_get_layout() function in liblustreapi&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-2182&quot;&gt;&lt;del&gt;LU-2182&lt;/del&gt;&lt;/a&gt; I noticed this ticket. This functionality has been implemented as &lt;/p&gt;

&lt;p&gt;int llapi_get_obd_count(char *mnt, int *count, int is_mdt)&lt;/p&gt;

&lt;p&gt;If this fits what you are looking for then let us know so this ticket can be closed.&lt;/p&gt;</comment>
                            <comment id="88640" author="afn" created="Wed, 9 Jul 2014 19:37:53 +0000"  >&lt;p&gt;&lt;br/&gt;
See my above comment of  4:42 Dec 6, 2013, re llapi_get_obd_count in the context of closing this ticket.&lt;/p&gt;</comment>
                            <comment id="88642" author="simmonsja" created="Wed, 9 Jul 2014 20:12:35 +0000"  >&lt;p&gt;Yep, I also just had this discussion with Ned.a few minutes ago. This overlaps the work I&apos;m doing in &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-5030&quot; title=&quot;&amp;quot;lctl {get,set}_param&amp;quot; should also check in /sys/fs/{lnet,lustre}&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-5030&quot;&gt;&lt;del&gt;LU-5030&lt;/del&gt;&lt;/a&gt; so I will get around to implementing this for you. Looks like I will have to focus my time toward &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-5030&quot; title=&quot;&amp;quot;lctl {get,set}_param&amp;quot; should also check in /sys/fs/{lnet,lustre}&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-5030&quot;&gt;&lt;del&gt;LU-5030&lt;/del&gt;&lt;/a&gt; first.&lt;/p&gt;</comment>
                            <comment id="93555" author="adilger" created="Tue, 9 Sep 2014 17:32:07 +0000"  >&lt;p&gt;Ned, does the new llapi_layout_* functionality landed via &lt;a href=&quot;http://review.whamcloud.com/5302&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/5302&lt;/a&gt; or is there still work to be done?&lt;/p&gt;</comment>
                            <comment id="93563" author="nedbass" created="Tue, 9 Sep 2014 18:05:11 +0000"  >&lt;p&gt;The functionality described in the description of this issue is still lacking in the API.  A set of new interfaces is needed that implements John&apos;s suggestion from &lt;a href=&quot;https://jira.hpdd.intel.com/browse/LU-3840?focusedCommentId=89285&amp;amp;page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-89285&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;this&lt;/a&gt; comment.&lt;/p&gt;</comment>
                            <comment id="100582" author="adilger" created="Wed, 3 Dec 2014 18:29:04 +0000"  >&lt;p&gt;Adding this as a requirement to &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-5969&quot; title=&quot;Create an LGPL version of liblustreapi&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-5969&quot;&gt;LU-5969&lt;/a&gt;. &lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="16365">LU-2182</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="27763">LU-5969</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|hzw2nz:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>10514</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>