<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:50:32 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-12204] mke2fs in e2fsprogs-1.44.5.wc1 fails for large device</title>
                <link>https://jira.whamcloud.com/browse/LU-12204</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;If mke2fs formats large device (e.g. 900TB), it fails becouse device too big.&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;# ls -l /dev/ddn/scratch0_ost0003 
lrwxrwxrwx 1 root root 6 Apr 19 11:19 /dev/ddn/scratch0_ost0003 -&amp;gt; ../sdd
# fdisk -l /dev/sdd

Disk /dev/sdd: 952451.9 GB, 952451947560960 bytes, 232532213760 sectors
Units = sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 2097152 bytes / 2097152 bytes
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&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;# mke2fs -V
mke2fs 1.44.5.wc1 (15-Dec-2018)
	Using EXT2FS Library version 1.44.5.wc1
# mkfs.lustre --ost --servicenode=192.168.0.2@tcp --fsname=scratch0 --index=3 --mgsnode=192.168.0.1@tcp --mkfsoptions=&apos;-E lazy_itable_init=0,lazy_journal_init=0 -m1 -J size=4096 -O meta_bg&apos; --reformat --backfstype=ldiskfs /dev/ddn/scratch0_ost0003

   Permanent disk data:
Target:     scratch0:OST0003
Index:      3
Lustre FS:  scratch0
Mount type: ldiskfs
Flags:      0x1062
              (OST first_time update no_primnode )
Persistent mount opts: ,errors=remount-ro
Parameters: failover.node=192.168.0.2@tcp mgsnode=192.168.0.1@tcp

device size = 908328960MB
formatting backing filesystem ldiskfs on /dev/ddn/scratch0_ost0003
	target name   scratch0:OST0003
	4k blocks     232532213760
	options        -m1 -J size=4096  -I 512 -i 1048576 -q -O meta_bg,extents,uninit_bg,mmp,dir_nlink,quota,huge_file,64bit,flex_bg -G 256 -E lazy_itable_init=0,lazy_journal_init=0 -F
mkfs_cmd = mke2fs -j -b 4096 -L scratch0:OST0003  -m1 -J size=4096  -I 512 -i 1048576 -q -O meta_bg,extents,uninit_bg,mmp,dir_nlink,quota,huge_file,64bit,flex_bg -G 256 -E lazy_itable_init=0,lazy_journal_init=0 -F /dev/ddn/scratch0_ost0003 232532213760
   mke2fs: Size of device (0x3624000000 blocks) /dev/ddn/scratch0_ost0003 too big to create
   	a filesystem using a blocksize of 4096.

mkfs.lustre FATAL: Unable to build fs /dev/ddn/scratch0_ost0003 (256)

mkfs.lustre FATAL: mkfs failed 256
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;However, mke2fs in 1.42.13.wc6 works well.&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;# mke2fs -V
mke2fs 1.42.13.wc6 (05-Feb-2017)
	Using EXT2FS Library version 1.42.13.wc6

# mkfs.lustre --ost --servicenode=192.168.0.2@tcp --fsname=scratch0 --index=3 --mgsnode=192.168.0.1@tcp --mkfsoptions=&apos;-E lazy_itable_init=0,lazy_journal_init=0 -m1 -J size=4096 -O meta_bg&apos; --reformat --backfstype=ldiskfs /dev/ddn/scratch0_ost0003

   Permanent disk data:
Target:     scratch0:OST0003
Index:      3
Lustre FS:  scratch0
Mount type: ldiskfs
Flags:      0x1062
              (OST first_time update no_primnode )
Persistent mount opts: ,errors=remount-ro
Parameters: failover.node=192.168.0.2@tcp mgsnode=192.168.0.1@tcp

device size = 908328960MB
formatting backing filesystem ldiskfs on /dev/ddn/scratch0_ost0003
	target name   scratch0:OST0003
	4k blocks     232532213760
	options        -m1 -J size=4096  -I 512 -i 1048576 -q -O meta_bg,extents,uninit_bg,mmp,dir_nlink,quota,huge_file,64bit,flex_bg -G 256 -E lazy_itable_init=0,lazy_journal_init=0 -F
mkfs_cmd = mke2fs -j -b 4096 -L scratch0:OST0003  -m1 -J size=4096  -I 512 -i 1048576 -q -O meta_bg,extents,uninit_bg,mmp,dir_nlink,quota,huge_file,64bit,flex_bg -G 256 -E lazy_itable_init=0,lazy_journal_init=0 -F /dev/ddn/scratch0_ost0003 232532213760
Writing CONFIGS/mountdata
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment>e2fsprogs-1.44.5.wc1, rhel7.5, msater branch</environment>
        <key id="55448">LU-12204</key>
            <summary>mke2fs in e2fsprogs-1.44.5.wc1 fails for large device</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</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="1">Fixed</resolution>
                                        <assignee username="dongyang">Dongyang Li</assignee>
                                    <reporter username="sihara">Shuichi Ihara</reporter>
                        <labels>
                    </labels>
                <created>Fri, 19 Apr 2019 12:35:44 +0000</created>
                <updated>Tue, 16 Jul 2019 23:27:59 +0000</updated>
                            <resolved>Tue, 16 Jul 2019 23:27:59 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>6</watches>
                                                                            <comments>
                            <comment id="246095" author="adilger" created="Fri, 19 Apr 2019 17:51:48 +0000"  >&lt;p&gt;Dongyang, can you please take a look at this.&#160;&lt;/p&gt;</comment>
                            <comment id="246338" author="dongyang" created="Thu, 25 Apr 2019 02:54:01 +0000"  >&lt;p&gt;The check was introduced in upstream 1.43.4:&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;
commit 101ef2e93c253ae62320628e8958067d2d2a4e2a
Author: Jan Kara &amp;lt;jack@suse.cz&amp;gt;
Date:   Tue Oct 25 14:08:59 2016 -0400    mke2fs: Avoid crashes / infinite loops &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; absurdly large devices
    
    When a device reports absurdly high size, some arithmetics in mke2fs can
    overflow (e.g. number of block descriptors) and we end in an infinite
    loop. Fix that by checking and refusing insanely large devices.
    
    Signed-off-by: Jan Kara &amp;lt;jack@suse.cz&amp;gt;
    Signed-off-by: Theodore Ts&apos;o &amp;lt;tytso@mit.edu&amp;gt;diff --git a/misc/mke2fs.c b/misc/mke2fs.c
index d98e71e0..6a83bd9f 100644
--- a/misc/mke2fs.c
+++ b/misc/mke2fs.c
@@ -2089,6 +2089,18 @@ profile_error:
                        EXT2_BLOCK_SIZE(&amp;amp;fs_param));
                exit(1);
        }
+       /*
+        * Guard against group descriptor count overflowing... Mostly to avoid
+        * strange results &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; absurdly large devices.
+        */
+       &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (fs_blocks_count &amp;gt; ((1ULL &amp;lt;&amp;lt; (fs_param.s_log_block_size + 3 + 32)) - 1)) {
+               fprintf(stderr, _(&lt;span class=&quot;code-quote&quot;&gt;&quot;%s: Size of device (0x%llx blocks) %s &quot;&lt;/span&gt;
+                                 &lt;span class=&quot;code-quote&quot;&gt;&quot;too big to create\n\t&quot;&lt;/span&gt;
+                                 &lt;span class=&quot;code-quote&quot;&gt;&quot;a filesystem using a blocksize of %d.\n&quot;&lt;/span&gt;),
+                       program_name, fs_blocks_count, device_name,
+                       EXT2_BLOCK_SIZE(&amp;amp;fs_param));
+               exit(1);
+       }
 
        ext2fs_blocks_count_set(&amp;amp;fs_param, fs_blocks_count);

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;block size is&#160;2 ^ (10 + s_log_block_size), so for us with a 4096 blocksize, s_log_block_size is 2 here. so we are really checking if fs_block_count &amp;gt; ((1 &amp;lt;&amp;lt; (2 + 3 + 32)) - 1),&lt;/p&gt;

&lt;p&gt;which means the target should be no bigger than 512T. if we have 64bit feature enabled(which we do), the target should be a lot bigger than that.&lt;/p&gt;

&lt;p&gt;I&apos;m confused about how does the check work here, as well as the magic number 3 and 32.&lt;/p&gt;

&lt;p&gt;Andreas can you please&#160;shed some light on this?&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;</comment>
                            <comment id="246357" author="adilger" created="Thu, 25 Apr 2019 16:00:31 +0000"  >&lt;p&gt;I suspect this is a bug?  If &lt;tt&gt;s_log_block_size=2&lt;/tt&gt; instead of &lt;tt&gt;=12&lt;/tt&gt; as one would expect then this is 2^10=1024x too small. I think the limit is intended to be the number of blocks in 2^32 block groups, each of which can hold &lt;tt&gt;blocksize &amp;#42; 8&lt;/tt&gt; blocks (= number of bits in a block bitmap).&lt;/p&gt;</comment>
                            <comment id="246360" author="adilger" created="Thu, 25 Apr 2019 16:53:54 +0000"  >&lt;p&gt;I will push a patch upstream. &lt;/p&gt;</comment>
                            <comment id="246379" author="gerrit" created="Thu, 25 Apr 2019 21:55:23 +0000"  >&lt;p&gt;Andreas Dilger (adilger@whamcloud.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/34762&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/34762&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-12204&quot; title=&quot;mke2fs in e2fsprogs-1.44.5.wc1 fails for large device&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-12204&quot;&gt;&lt;del&gt;LU-12204&lt;/del&gt;&lt;/a&gt; mke2fs: fix check for absurdly large devices&lt;br/&gt;
Project: tools/e2fsprogs&lt;br/&gt;
Branch: master-lustre&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: a231aadd0f5f6a1f44e6ae0a951f778aaa51f6d2&lt;/p&gt;</comment>
                            <comment id="246381" author="sihara" created="Fri, 26 Apr 2019 01:23:44 +0000"  >&lt;p&gt;Thanks Andreas. patch &lt;a href=&quot;https://review.whamcloud.com/34762&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/34762&lt;/a&gt; works and mke2fs succeeded.&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;# mke2fs -V
mke2fs 1.44.5.wc1 (15-Dec-2018)
	Using EXT2FS Library version 1.44.5.wc1

# time mkfs.lustre --ost --servicenode=127.0.0.2@tcp --fsname=scratch0 --index=3 --mgsnode=127.0.0.2@tcp --mkfsoptions=&apos;-E lazy_itable_init=0,lazy_journal_init=0,stripe_width=512,stride=512 -m1 -J size=4096 -O meta_bg,^resize_inode&apos; --backfstype=ldiskfs --reformat /dev/ddn/scratch0_ost0003

   Permanent disk data:
Target:     scratch0:OST0003
Index:      3
Lustre FS:  scratch0
Mount type: ldiskfs
Flags:      0x1062
              (OST first_time update no_primnode )
Persistent mount opts: ,errors=remount-ro
Parameters: failover.node=127.0.0.2@tcp mgsnode=127.0.0.2@tcp

device size = 908328960MB
formatting backing filesystem ldiskfs on /dev/ddn/scratch0_ost0003
	target name   scratch0:OST0003
	kilobytes     930128855040
	options        -m1 -J size=4096  -I 512 -i 1048576 -q -O meta_bg,^resize_inode,extents,uninit_bg,mmp,dir_nlink,quota,huge_file,64bit,flex_bg -G 256 -E lazy_itable_init=0,lazy_journal_init=0,stripe_width=512,stride=512 -F
mkfs_cmd = mke2fs -j -b 4096 -L scratch0:OST0003  -m1 -J size=4096  -I 512 -i 1048576 -q -O meta_bg,^resize_inode,extents,uninit_bg,mmp,dir_nlink,quota,huge_file,64bit,flex_bg -G 256 -E lazy_itable_init=0,lazy_journal_init=0,stripe_width=512,stride=512 -F /dev/ddn/scratch0_ost0003 930128855040k
Writing CONFIGS/mountdata

real	7m28.018s
user	0m35.627s
sys	5m9.036s
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="248608" author="gerrit" created="Fri, 7 Jun 2019 00:19:50 +0000"  >&lt;p&gt;Andreas Dilger (adilger@whamcloud.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/34762/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/34762/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-12204&quot; title=&quot;mke2fs in e2fsprogs-1.44.5.wc1 fails for large device&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-12204&quot;&gt;&lt;del&gt;LU-12204&lt;/del&gt;&lt;/a&gt; mke2fs: fix check for absurdly large devices&lt;br/&gt;
Project: tools/e2fsprogs&lt;br/&gt;
Branch: master-lustre&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: dec51e82bc03b0eb5619c99863ae5d914b814ea7&lt;/p&gt;</comment>
                            <comment id="251466" author="pjones" created="Tue, 16 Jul 2019 14:58:07 +0000"  >&lt;p&gt;Can this ticket be considered RESOLVED in 1.45.2-wc1?&lt;/p&gt;</comment>
                            <comment id="251520" author="dongyang" created="Tue, 16 Jul 2019 23:27:09 +0000"  >&lt;p&gt;Correct Peter, I will close it as RESOLVED.&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|i00f3r:</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>