<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:41:39 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-11181] df -i and lfs df -i show incorrect inode count</title>
                <link>https://jira.whamcloud.com/browse/LU-11181</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;lfs df -i and df -i doen&apos;t report correct inode counts.&lt;/p&gt;

&lt;p&gt;On a newly created filesystem we have 2 MDTs. Here is the info on the MDTs.&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;
nbp10-srv1 ~ # tune2fs -l /dev/mapper/nbp10_1-MDT0
tune2fs 1.42.13.wc6 (05-Feb-2017)
device /dev/dm-1 mounted by lustre
Filesystem volume name:   nbp10-MDT0000
Last mounted on:          /
Filesystem UUID:          bc01a76f-c04d-4f35-966b-e3e655a12528
Filesystem magic number:  0xEF53
Filesystem revision #:    1 (dynamic)
Filesystem features:      has_journal ext_attr resize_inode dir_index filetype needs_recovery mmp flex_bg dirdata sparse_super large_file huge_file uninit_bg dir_nlink extra_isize quota
Filesystem flags:         signed_directory_hash 
Default mount options:    user_xattr acl
Filesystem state:         clean
Errors behavior:          Continue
Filesystem OS type:       Linux
Inode count:              4241293312
Block count:              3106406400
Reserved block count:     0
Free blocks:              2044739588
Free inodes:              4241293299
First block:              0
Block size:               4096
Fragment size:            4096
Reserved GDT blocks:      387
Blocks per group:         24000
Fragments per group:      24000
Inodes per group:         32768
Inode blocks per group:   8192
Flex block group size:    16
Filesystem created:       Wed Jul 25 21:43:46 2018
Last mount time:          Wed Jul 25 21:46:39 2018
Last write time:          Wed Jul 25 21:46:45 2018
Mount count:              3
Maximum mount count:      -1
Last checked:             Wed Jul 25 21:43:46 2018
Check interval:           0 (&amp;lt;none&amp;gt;)
Lifetime writes:          196 MB
Reserved blocks uid:      0 (user root)
Reserved blocks gid:      0 (group root)
First inode:              11
Inode size:               1024
Required extra isize:     32
Desired extra isize:      32
Journal inode:            8
Default directory hash:   half_md4
Directory Hash Seed:      9b03f637-f156-4f57-aeff-e6872c65eb67
Journal backup:           inode blocks
MMP block number:         17822
MMP update interval:      5
User quota inode:         3
Group quota inode:        4


nbp10-srv3 ~ # tune2fs -l /dev/mapper/nbp10_2-MDT1
tune2fs 1.42.13.wc6 (05-Feb-2017)
device /dev/dm-0 mounted by lustre
Filesystem volume name:   nbp10-MDT0001
Last mounted on:          /
Filesystem UUID:          eb11a0e3-772a-4e83-9177-08d41210c8b7
Filesystem magic number:  0xEF53
Filesystem revision #:    1 (dynamic)
Filesystem features:      has_journal ext_attr resize_inode dir_index filetype needs_recovery mmp flex_bg dirdata sparse_super large_file huge_file uninit_bg dir_nlink extra_isize quota
Filesystem flags:         signed_directory_hash 
Default mount options:    user_xattr acl
Filesystem state:         clean
Errors behavior:          Continue
Filesystem OS type:       Linux
Inode count:              4241293312
Block count:              3106406400
Reserved block count:     0
Free blocks:              2044739588
Free inodes:              4241293299
First block:              0
Block size:               4096
Fragment size:            4096
Reserved GDT blocks:      387
Blocks per group:         24000
Fragments per group:      24000
Inodes per group:         32768
Inode blocks per group:   8192
Flex block group size:    16
Filesystem created:       Wed Jul 25 21:43:48 2018
Last mount time:          Wed Jul 25 21:46:39 2018
Last write time:          Wed Jul 25 21:46:45 2018
Mount count:              3
Maximum mount count:      -1
Last checked:             Wed Jul 25 21:43:48 2018
Check interval:           0 (&amp;lt;none&amp;gt;)
Lifetime writes:          196 MB
Reserved blocks uid:      0 (user root)
Reserved blocks gid:      0 (group root)
First inode:              11
Inode size:               1024
Required extra isize:     32
Desired extra isize:      32
Journal inode:            8
Default directory hash:   half_md4
Directory Hash Seed:      76bf0136-01da-4bd1-b383-21d9ec90ee17
Journal backup:           inode blocks
MMP block number:         17822
MMP update interval:      5
User quota inode:         3
Group quota inode:        4

 &lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;$ lfs df -i |grep nobackupp10 |grep -e summary -e MDT&lt;br/&gt;
 nbp10-MDT0000_UUID 4241293312 351 4241292961 0% /nobackupp10&lt;span class=&quot;error&quot;&gt;&amp;#91;MDT:0&amp;#93;&lt;/span&gt;&lt;br/&gt;
 nbp10-MDT0001_UUID 4241293312 337 4241292975 0% /nobackupp10&lt;span class=&quot;error&quot;&gt;&amp;#91;MDT:1&amp;#93;&lt;/span&gt;&lt;br/&gt;
 filesystem_summary: 429501508 688 429500820 0% /nobackupp10&lt;/p&gt;

&lt;p&gt;$ df -i /nobackupp10&lt;br/&gt;
 Filesystem Inodes IUsed IFree IUse% Mounted on&lt;br/&gt;
 10.151.26.159@o2ib:10.151.26.160@o2ib:/nbp10 429501508 688 429500820 1% /nobackupp10&lt;/p&gt;</description>
                <environment></environment>
        <key id="52836">LU-11181</key>
            <summary>df -i and lfs df -i show incorrect inode count</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.whamcloud.com/images/icons/priorities/major.svg">Major</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="1">Fixed</resolution>
                                        <assignee username="adilger">Andreas Dilger</assignee>
                                    <reporter username="mhanafi">Mahmoud Hanafi</reporter>
                        <labels>
                    </labels>
                <created>Thu, 26 Jul 2018 17:25:53 +0000</created>
                <updated>Tue, 2 Feb 2021 19:24:37 +0000</updated>
                            <resolved>Fri, 7 Sep 2018 20:21:24 +0000</resolved>
                                    <version>Lustre 2.10.3</version>
                                                        <due></due>
                            <votes>0</votes>
                                    <watches>5</watches>
                                                                            <comments>
                            <comment id="230960" author="gerrit" created="Thu, 26 Jul 2018 18:59:09 +0000"  >&lt;p&gt;Andreas Dilger (adilger@whamcloud.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/32887&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/32887&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-11181&quot; title=&quot;df -i and lfs df -i show incorrect inode count&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-11181&quot;&gt;&lt;del&gt;LU-11181&lt;/del&gt;&lt;/a&gt; mdt: include DoM in inode ratio discussion&lt;br/&gt;
Project: doc/manual&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: b5150a017b75592f93dee512ae27be4a97165dcf&lt;/p&gt;</comment>
                            <comment id="230961" author="adilger" created="Thu, 26 Jul 2018 19:02:23 +0000"  >&lt;p&gt;You excluded the &lt;tt&gt;lfs df -i&lt;/tt&gt; output from the OSTs, but I suspect the reason for this difference is because &lt;tt&gt;lfs df -i&lt;/tt&gt; and &lt;tt&gt;df -i&lt;/tt&gt; (via &lt;tt&gt;statfs()&lt;/tt&gt;) limit the number of inodes shown to &lt;b&gt;available&lt;/b&gt; objects on the OSTs (also taking the default stripe count into account) if it is lower than the number of inodes on the MDT(s).  This is because even if you have 8B inodes on the MDTs, you also need to allocate at least one OST object for each MDT object in order to store data in that file.&lt;/p&gt;

&lt;p&gt;If you plan on adding new OSTs in the future, or creating zero-length files (e.g. where only the filename/xattrs are important) then this is fine.  Otherwise, your MDTs are over-provisioned and will not be able to use the full inode count. &lt;/p&gt;

&lt;p&gt;If this is a new filesystem, I would recommend to reduce the MDT inodes count to better match the OST inode count.  Depending on your file usage patterns, and if the MDT is stored on flash (which I strongly recommend for all new deployments) you may want to increase the &lt;em&gt;inode ratio&lt;/em&gt; (space per inode) from the default 2.5KB/inode to something significantly larger, say 64KB/inode to allow future use by the Data-on-MDT feature that is available in Lustre 2.11 and later.  Using &lt;tt&gt;mkfs.lustre ... --mkfsoptions=&quot;-i 65536&quot;&lt;/tt&gt; to allocate one inode per 64KB of space would reduce the number of inodes on the two MDTs from 8B to 380M, but it would allow significant performance improvements in the future (see &lt;a href=&quot;http://wiki.lustre.org/images/c/c5/LUG2018-Small_File_IO_Perf_DataOnMDT-Gmitter.pdf&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Small File IO Performance in Lustre&lt;/a&gt; and &lt;a href=&quot;http://wiki.lustre.org/images/9/94/LUG2018-Lustre_Data_on_MDT_An_Early_Look-Leers.pdf&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Early Performance Investigation of Data on Metadata&lt;/a&gt; for more details).&lt;/p&gt;

&lt;p&gt;I&apos;ve also pushed an update to the Lustre Manual to improve the section on formatting ldiskfs MDTs to explain this better.&lt;/p&gt;</comment>
                            <comment id="231584" author="gerrit" created="Tue, 7 Aug 2018 15:11:13 +0000"  >&lt;p&gt;Joseph Gmitter (jgmitter@whamcloud.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/32887/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/32887/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-11181&quot; title=&quot;df -i and lfs df -i show incorrect inode count&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-11181&quot;&gt;&lt;del&gt;LU-11181&lt;/del&gt;&lt;/a&gt; mdt: include DoM in inode ratio discussion&lt;br/&gt;
Project: doc/manual&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 5fd65770942c45e10f88d8d414ce799937931392&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="56991">LUDOC-458</issuekey>
        </issuelink>
                            </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_10390" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hzzzwf:</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="10021"><![CDATA[2]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        </customfields>
    </item>
</channel>
</rss>