<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:34:19 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-3485] add resize2fs testing for OST/MDT filesystems</title>
                <link>https://jira.whamcloud.com/browse/LU-3485</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;We need to add resize2fs (ext4 resizer) testing for MDT and OST filesystems, so that we are sure this functionality works together with the Lustre features, and that it does not corrupt Lustre filesystems when used.&lt;/p&gt;

&lt;p&gt;It is important when testing resize2fs that the target filesystems have a reasonably large number of files in them.  It is also critical that e2fsck be run both before and after resize2fs is used, in order to verify that no corruption was introduced during this process.&lt;/p&gt;

&lt;p&gt;Until &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-137&quot; title=&quot;ioctl passthrough mechanism for Lustre OST/MDT mountpoints&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-137&quot;&gt;&lt;del&gt;LU-137&lt;/del&gt;&lt;/a&gt; (ioctl passthrough) is finished, only offline resizing will be possible.  That means the MDT and OST filesystems need to be unmounted before resize2fs is run, and remounted afterward.&lt;/p&gt;

&lt;p&gt;It might make sense to add these checks as part of the sanity-scrub.sh tests, the large LUN testing, or maybe as an early subtest in lfsck.sh (though the old lfsck test will soon become obsolete, so I&apos;m reluctant to use that).&lt;/p&gt;</description>
                <environment></environment>
        <key id="19496">LU-3485</key>
            <summary>add resize2fs testing for OST/MDT filesystems</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="2" iconUrl="https://jira.whamcloud.com/images/icons/priorities/critical.svg">Critical</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="yujian">Jian Yu</assignee>
                                    <reporter username="adilger">Andreas Dilger</reporter>
                        <labels>
                    </labels>
                <created>Thu, 20 Jun 2013 17:21:31 +0000</created>
                <updated>Wed, 13 Dec 2023 22:59:35 +0000</updated>
                            <resolved>Tue, 4 Mar 2014 18:21:52 +0000</resolved>
                                    <version>Lustre 2.5.0</version>
                                    <fixVersion>Lustre 2.6.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>9</watches>
                                                                            <comments>
                            <comment id="62868" author="jamesanunez" created="Wed, 24 Jul 2013 00:51:22 +0000"  >&lt;p&gt;Proposed patch is at&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://review.whamcloud.com/#/c/7094&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/#/c/7094&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="65894" author="jamesanunez" created="Thu, 5 Sep 2013 23:31:53 +0000"  >&lt;p&gt;The submitted patch was failing on my test system due to not being able to resize the file system back to its original size. I now see what the problem is and at least one reason the resize2fs man page warns &#8220;The minimum size of the filesystem as estimated by resize2fs may  be  incorrect&#8221;. &lt;/p&gt;

&lt;p&gt;Here&#8217;s what was happening.  I&#8217;m on the MDS/MGS with the file system unmounted. I reformat the MDS file system to be 20,000 KB (yes this is small and possibly unrealistic):&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;[root@mds jnunez]# mkfs.lustre --fsname=lscratch --mgs --mdt --reformat --device-size=200000 --index=0 /dev/lvm-MDS/P1

   Permanent disk data:
Target:     lscratch:MDT0000
Index:      0
Lustre FS:  lscratch
Mount type: ldiskfs
Flags:      0x65
              (MDT MGS first_time update )
Persistent mount opts: user_xattr,errors=remount-ro
Parameters:

device size = 3340MB
formatting backing filesystem ldiskfs on /dev/lvm-MDS/P1
	target name  lscratch:MDT0000
	4k blocks     50000
	options        -I 512 -i 2048 -q -O dirdata,uninit_bg,^extents,dir_nlink,quota,huge_file,flex_bg -E lazy_journal_init -F
mkfs_cmd = mke2fs -j -b 4096 -L lscratch:MDT0000  -I 512 -i 2048 -q -O dirdata,uninit_bg,^extents,dir_nlink,quota,huge_file,flex_bg -E lazy_journal_init -F /dev/lvm-MDS/P1 50000
Writing CONFIGS/mountdata
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Check the reported minimum block count with resize2fs and dumpe2fs:&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;[root@mds jnunez]# resize2fs -P /dev/lvm-MDS/P1
resize2fs 1.42.7.wc1 (12-Apr-2013)
Estimated minimum size of the filesystem: 50000
[root@mds jnunez]# dumpe2fs /dev/lvm-MDS/P1 | grep &quot;Block count:&quot;
dumpe2fs 1.42.7.wc1 (12-Apr-2013)
Block count:              50000
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;So, everything is fine to this point and it looks like the minimum size of the file system is 50000 blocks. Now, let&#8217;s increase the size of the file system and check:&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;[root@mds jnunez]# resize2fs -p /dev/lvm-MDS/P1 60000
resize2fs 1.42.7.wc1 (12-Apr-2013)
Resizing the filesystem on /dev/lvm-MDS/P1 to 60000 (4k) blocks.
The filesystem on /dev/lvm-MDS/P1 is now 60000 blocks long.

[root@mds jnunez]# dumpe2fs /dev/lvm-MDS/P1 | grep &quot;Block count:&quot;
dumpe2fs 1.42.7.wc1 (12-Apr-2013)
Block count:              60000
[root@mds jnunez]# resize2fs -P /dev/lvm-MDS/P1
resize2fs 1.42.7.wc1 (12-Apr-2013)
Estimated minimum size of the filesystem: 60000
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;That worked, but the minimum size of the file system is now 60000 blocks. Let&#8217;s go back to the original size of the file system:&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;[root@mds jnunez]# resize2fs -p /dev/lvm-MDS/P1 50000
resize2fs 1.42.7.wc1 (12-Apr-2013)
resize2fs: New size smaller than minimum (60000)
[root@mds jnunez]# dumpe2fs /dev/lvm-MDS/P1 | grep &quot;Block count:&quot;
dumpe2fs 1.42.7.wc1 (12-Apr-2013)
Block count:              60000
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;We can&#8217;t go back to the original size of the file system, even though we haven&#8217;t written anything to the file system.&lt;/p&gt;

&lt;p&gt;Near the end of resize2fs.c when calculating the minimum blocks for the file system, we see the comment&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; 
	 * If at this point we&apos;ve already added up more &quot;needed&quot; than
	 * the current size, just return current size as minimum.
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;There&#8217;s my problem; resize2fs just returns the number of blocks in the current file system if the calculated amount of blocks needed for the file system exceeds the current number of blocks. &lt;/p&gt;

&lt;p&gt;Why do I care?&lt;/p&gt;

&lt;p&gt;In the patch, I was saving the value of the original number of blocks in the file system and, at the end of the test, trying to return the file system back to the original size. The resize back to the original size will occasionally fail due to an originally &#8220;small&#8221;, smaller than resize2fs minimum calculation, file system. This failure to resize isn&#8217;t due to a problem in Lustre, so, the test should not fail/error. Maybe I&#8217;ll just return the file system to the max of the original file system size or the minimum file system size as dictated by resize2fs, i.e. max (original file system size, resize2fs calculated minimum file system size).&lt;/p&gt;

&lt;p&gt;Maybe others knew about this, but I had to trip over it myself.&lt;/p&gt;</comment>
                            <comment id="66817" author="pjones" created="Tue, 17 Sep 2013 07:29:39 +0000"  >&lt;p&gt;Yu, Jian&lt;/p&gt;

&lt;p&gt;Could you please advise on this one?&lt;/p&gt;

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

&lt;p&gt;Peter&lt;/p&gt;</comment>
                            <comment id="66824" author="jamesanunez" created="Tue, 17 Sep 2013 13:37:11 +0000"  >&lt;p&gt;The issue right now is that the existing test 2 and test 3 in the large lun script are timing out in most of the auto test runs. Is this a problem with the existing tests, an issue with llverdev, or just what is to be expected? So, the new tests are not able to run due to the time out.&lt;/p&gt;</comment>
                            <comment id="66871" author="adilger" created="Tue, 17 Sep 2013 21:01:13 +0000"  >&lt;p&gt;James, I don&apos;t think there is a huge benefit to try and reduce the filesystem size back to the original.  There are a number of reasons why this may not work, so I think it would be better to just test the expansion for now, and then just a smaller shrink at the end.  Expansion is the only thing the vast majority of users will be doing anyway.&lt;/p&gt;

&lt;p&gt;I&apos;m also fine to just test this on a smaller test filesystem via conf-sanity on a regular basis, and leave the large LUN testing for only occasional testing (e.g. only once a month or whatever).&lt;/p&gt;</comment>
                            <comment id="67224" author="yujian" created="Mon, 23 Sep 2013 09:53:36 +0000"  >&lt;p&gt;Here is the patch for master branch to add a test case into conf-sanity.sh for running resize2fs on MDT and OST filesystems: &lt;a href=&quot;http://review.whamcloud.com/7796&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/7796&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="69994" author="yujian" created="Mon, 28 Oct 2013 05:41:56 +0000"  >&lt;p&gt;The above patch for conf-sanity.sh landed on master branch.&lt;br/&gt;
I&apos;ll update the patch for large-lun.sh in &lt;a href=&quot;http://review.whamcloud.com/7094&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/7094&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="78363" author="jlevi" created="Tue, 4 Mar 2014 18:21:52 +0000"  >&lt;p&gt;Patch landed to Master. If more work is needed, please open a new ticket.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                                        </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|hzvton:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>8765</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>