<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 03:10:51 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-14565] Changing recordsize of OST Breaks &apos;df&apos; (lfs df works correctly)</title>
                <link>https://jira.whamcloud.com/browse/LU-14565</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;Changing recordsize from 1M(default) to 32K breaks the &apos;df&apos; output. &apos;lfs df&apos; however works correctly. The &apos;size&apos;, &apos;used&apos; and &apos;Avail&apos; fields of the &apos;df&apos; output shows wrong values. This is seen immediately. Switching record size back to 32K, it was observed that it fixes the issue.&lt;/p&gt;

&lt;p&gt;Steps to recreate:&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;
$ df -h 
$ cp &amp;lt;file&amp;gt; /mnt/lustre
$ df -h 
$ zfs set recordsize=32768 gpool/data
$ df -h &lt;span class=&quot;code-comment&quot;&gt;/* Almost immediately starts showing wrong results, lfs df is good */&lt;/span&gt;
$ zfs set recordsize=1048576 gpool/data
$ df -h &lt;span class=&quot;code-comment&quot;&gt;/* Results are good again */&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Details&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;
# df -h
Filesystem Size Used Avail Use% Mounted on
...
gpool/metadata 77M 3.0M 72M 5% /mnt/zfsmdt
gpool/data 76M 3.0M 71M 5% /mnt/zfsost
192.168.50.72@tcp:/lustre 76M 3.0M 71M 5% /mnt/lustre&lt;/pre&gt;
&lt;/div&gt;&lt;/div&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;
# lfs df -h
UUID bytes Used Available Use% Mounted on
lustre-MDT0000_UUID 76.6M 3.0M 71.6M 5% /mnt/lustre[MDT:0]
lustre-OST0000_UUID 76.0M 3.0M 71.0M 5% /mnt/lustre[OST:0]
filesystem_summary: 76.0M 3.0M 71.0M 5% /mnt/lustre
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;Verify recordsize&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;
# zfs get recordsize gpool/data
NAME PROPERTY VALUE SOURCE
gpool/data recordsize 1M local&lt;/pre&gt;
&lt;/div&gt;&lt;/div&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;
# cp configure /mnt/lustre
# ls -ali configure
670300 -rwxr-xr-x 1 root root 1346008 Mar 26 11:49 configure&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&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;
# df -h
Filesystem Size Used Avail Use% Mounted on
...
gpool/metadata 75M 3.0M 70M 5% /mnt/zfsmdt
gpool/data 76M 5.0M 69M 7% /mnt/zfsost
192.168.50.72@tcp:/lustre 76M 5.0M 69M 7% /mnt/lustre
# lfs df -h
UUID bytes Used Available Use% Mounted on
lustre-MDT0000_UUID 74.6M 3.0M 69.6M 5% /mnt/lustre[MDT:0]
lustre-OST0000_UUID 76.0M 5.0M 69.0M 7% /mnt/lustre[OST:0]
filesystem_summary: 76.0M 5.0M 69.0M 7% /mnt/lustre
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Change the record size&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;
zfs set recordsize=32768 gpool/data&lt;/pre&gt;
&lt;/div&gt;&lt;/div&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;
# df -h
...
gpool/metadata 75M 3.0M 70M 5% /mnt/zfsmdt
gpool/data 77M 5.1M 70M 7% /mnt/zfsost
192.168.50.72@tcp:/lustre 2.4G 163M 2.2G 7% /mnt/lustre &amp;lt;~~~ Bumps to 2.4GB&lt;/pre&gt;
&lt;/div&gt;&lt;/div&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;
# lfs df -h
UUID bytes Used Available Use% Mounted on
lustre-MDT0000_UUID 74.6M 3.0M 69.6M 5% /mnt/lustre[MDT:0]
lustre-OST0000_UUID 76.8M 5.1M 69.7M 7% /mnt/lustre[OST:0]
filesystem_summary: 76.8M 5.1M 69.7M 7% /mnt/lustre
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;/p&gt;</description>
                <environment>This was tested on single node client/server CentOS-7.5/ZFS-0.7.13 with lustre 2.12.6 branch/master. Further this was also seen on CentOS 7.8 with Lustre 2.12.3 and 2.12.6 w/ ZFS 0.7.13.</environment>
        <key id="63542">LU-14565</key>
            <summary>Changing recordsize of OST Breaks &apos;df&apos; (lfs df works correctly)</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="arshad512">Arshad Hussain</assignee>
                                    <reporter username="arshad512">Arshad Hussain</reporter>
                        <labels>
                    </labels>
                <created>Fri, 26 Mar 2021 12:09:45 +0000</created>
                <updated>Fri, 13 May 2022 13:38:23 +0000</updated>
                            <resolved>Wed, 19 May 2021 18:32:56 +0000</resolved>
                                    <version>Lustre 2.12.6</version>
                                    <fixVersion>Lustre 2.12.8</fixVersion>
                    <fixVersion>Lustre 2.15.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                            <comments>
                            <comment id="296951" author="aeonjeff" created="Sat, 27 Mar 2021 07:34:39 +0000"  >&lt;p&gt;`lfs df` (before OST recordsize change to 32K from 1M)&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;lustre-OST0000_UUID         5.3T       18.0M        5.3T   1% /lustre[OST:0]
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;strace of `df -Th` (before OST recordsize change to 32K from 1M)&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;stat(&quot;/lustre&quot;, {st_mode=S_IFDIR|0755, st_size=10752, ...}) = 0
statfs(&quot;/lustre&quot;, {f_type=0xbd00bd0, f_bsize=4096, f_blocks=1424878848, f_bfree=1424874240, f_bavail=1424873728, f_files=54550890, f_ffree=54550561, f_fsid={val=[743766374, 0]}, f_namelen=255, f_frsize=4096, f_flags=ST_VALID}) = 0
stat(&quot;/lustre&quot;, {st_mode=S_IFDIR|0755, st_size=10752, ...}) = 0
write(1, &quot;10.0.50.30@tcp:/lustre  lustre  &quot;..., 6410.0.50.30@tcp:/lustre  lustre    5.4T   18M  5.4T   1% /lustre
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;`lfs df` (after OST recordsize change to 32K from 1M)&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;lustre-OST0000_UUID         5.3T       17.5M        5.3T   1% /lustre[OST:0]
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;strace of `df -Th` (after OST recordsize change to 32K from 1M)&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;stat(&quot;/lustre&quot;, {st_mode=S_IFDIR|0755, st_size=10752, ...}) = 0
statfs(&quot;/lustre&quot;, {f_type=0xbd00bd0, f_bsize=4096, f_blocks=45596122112, f_bfree=45595978752, f_bavail=45595962368, f_files=54550890, f_ffree=54550561, f_fsid={val=[743766374, 0]}, f_namelen=255, f_frsize=4096, f_flags=ST_VALID}) = 0
stat(&quot;/lustre&quot;, {st_mode=S_IFDIR|0755, st_size=10752, ...}) = 0
write(1, &quot;10.0.50.30@tcp:/lustre  lustre  &quot;..., 6410.0.50.30@tcp:/lustre  lustre    170T  560M  170T   1% /lustre
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="296990" author="arshad512" created="Sun, 28 Mar 2021 00:35:21 +0000"  >&lt;p&gt;For linux frize(fragment/smallest) and bsize(block/largest) size is always the same.&lt;br/&gt;
Unfortunately, bsize is also used as optimal blocksize (recordsize) in&lt;br/&gt;
a dataset. When the recordsize is changed. The bsize is also reflected.&lt;br/&gt;
This leads to miscalculation and &apos;df&apos; output.&lt;/p&gt;

&lt;p&gt;The statfs() should always be reported on the maximum size. Note that the , dmu_objset_space() for both 1MB recoredsize and 32KB recoredsize reports the same and they seem to be correct&lt;/p&gt;

&lt;p&gt;I will upload the patch after local testing for review.&lt;/p&gt;

&lt;p&gt;My debug run: 1MB recordsize&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;
Mar 28 05:01:55 mrpel7 kernel: LustreError: 8094:0:(osd_handler.c:496:osd_objset_statfs()) max_blksz=1048576
Mar 28 05:01:55 mrpel7 kernel: LustreError: 8094:0:(osd_handler.c:500:osd_objset_statfs()) usedbytes=3261440, availbytes=94025216 shift=20
Mar 28 05:01:55 mrpel7 kernel: LustreError: 8094:0:(osd_handler.c:504:osd_objset_statfs()) os_blocks=92, os_bfree=89, os_bavail=89&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;


&lt;p&gt;My debug run: 32KB recordsize&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;
Mar 28 05:02:30 mrpel7 kernel: LustreError: 8527:0:(osd_handler.c:496:osd_objset_statfs()) max_blksz=32768
Mar 28 05:02:30 mrpel7 kernel: LustreError: 8527:0:(osd_handler.c:500:osd_objset_statfs()) usedbytes=3261440, availbytes=94022144 shift=15
Mar 28 05:02:30 mrpel7 kernel: LustreError: 8527:0:(osd_handler.c:504:osd_objset_statfs()) os_blocks=2968, os_bfree=2869, os_bavail=2869&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="297021" author="gerrit" created="Mon, 29 Mar 2021 05:54:38 +0000"  >&lt;p&gt;Arshad Hussain (arshad.hussain@aeoncomputing.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/43154&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/43154&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-14565&quot; title=&quot;Changing recordsize of OST Breaks &amp;#39;df&amp;#39; (lfs df works correctly)&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-14565&quot;&gt;&lt;del&gt;LU-14565&lt;/del&gt;&lt;/a&gt; osd_zfs: Make &apos;statfs&apos; always use 1MB defualt size&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: df160677af3e90e9e62865b18825991877bc46f0&lt;/p&gt;</comment>
                            <comment id="301944" author="gerrit" created="Wed, 19 May 2021 02:03:24 +0000"  >&lt;p&gt;Oleg Drokin (green@whamcloud.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/43154/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/43154/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-14565&quot; title=&quot;Changing recordsize of OST Breaks &amp;#39;df&amp;#39; (lfs df works correctly)&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-14565&quot;&gt;&lt;del&gt;LU-14565&lt;/del&gt;&lt;/a&gt; ofd: Do not rely on tgd_blockbit&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 8ee6e1c8825c4fabfd6c39db11081839ca53d454&lt;/p&gt;</comment>
                            <comment id="302042" author="pjones" created="Wed, 19 May 2021 18:32:56 +0000"  >&lt;p&gt;Landed for 2.15&lt;/p&gt;</comment>
                            <comment id="302202" author="arshad512" created="Fri, 21 May 2021 03:18:08 +0000"  >&lt;p&gt;Hi Peter,Andreas,&lt;/p&gt;

&lt;p&gt;This is also applicable for b2_12 branch.&#160; Please consider this for b2_12 backport.&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;

&lt;p&gt;Arshad&lt;/p&gt;

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

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="303931" author="gerrit" created="Wed, 9 Jun 2021 03:49:34 +0000"  >&lt;p&gt;Arshad Hussain (arshad.hussain@aeoncomputing.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/43954&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/43954&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-14565&quot; title=&quot;Changing recordsize of OST Breaks &amp;#39;df&amp;#39; (lfs df works correctly)&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-14565&quot;&gt;&lt;del&gt;LU-14565&lt;/del&gt;&lt;/a&gt; ofd: Do not rely on tgd_blockbit&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: b2_12-next&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 865e7def9d5d3e2fdf247483a81c767ab27bb856&lt;/p&gt;</comment>
                            <comment id="303945" author="gerrit" created="Wed, 9 Jun 2021 05:02:48 +0000"  >&lt;p&gt;Arshad Hussain (arshad.hussain@aeoncomputing.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/43955&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/43955&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-14565&quot; title=&quot;Changing recordsize of OST Breaks &amp;#39;df&amp;#39; (lfs df works correctly)&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-14565&quot;&gt;&lt;del&gt;LU-14565&lt;/del&gt;&lt;/a&gt; ofd: Do not rely on tgd_blockbit&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: b2_12&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 4d5ca21aa94c295acb5dd666925d64c62079461d&lt;/p&gt;</comment>
                            <comment id="318216" author="gerrit" created="Sun, 14 Nov 2021 05:51:24 +0000"  >&lt;p&gt;&quot;Oleg Drokin &amp;lt;green@whamcloud.com&amp;gt;&quot; merged in patch &lt;a href=&quot;https://review.whamcloud.com/43955/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/43955/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-14565&quot; title=&quot;Changing recordsize of OST Breaks &amp;#39;df&amp;#39; (lfs df works correctly)&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-14565&quot;&gt;&lt;del&gt;LU-14565&lt;/del&gt;&lt;/a&gt; ofd: Do not rely on tgd_blockbit&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: b2_12&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: f268a03170abe5375959ace774e10b92af5b14b1&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="70288">LU-15853</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_10030" key="com.atlassian.jira.plugin.system.customfieldtypes:labels">
                        <customfieldname>Epic/Theme</customfieldname>
                        <customfieldvalues>
                                        <label>zfs</label>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10390" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i01qnz:</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>