Red Hat Bugzilla – Bug 485236
with -b N and block count, mkfs.ext4 fails with dev-too-big
Last modified: 2013-03-13 16:41:58 EDT
Description of problem:
[this is on rawhide: mke2fs 1.41.4 (27-Jan-2009)
Using EXT2FS Library version 1.41.4 ]
FWIW, I was trying to create an ext4 file system with more than 2^32
blocks to demonstrate a parted bug fix, but with the particular device
I was using, I couldn't even create one with 2^31-1 blocks.
When I try to create an ext4 file system specifying both block size and
the number of blocks, the size of the underlying device should not matter,
as long as it is large enough.
However, when the underlying device too large, it fails like this:
Set-up: Create a 10TB sparse device called /dev/mapper/s1 with
/dev/sdb6 (just ~20GB) for backing store:
echo "0 $N zero" | dmsetup create zero1
echo "0 $N snapshot /dev/mapper/zero1 /dev/sdb6 p 128" | dmsetup create s1
Try to create an ext4 file system with 2^31-1 1024-byte blocks:
(note that I specify an explicit number of blocks)
# mkfs.ext4 -b 1024 /dev/mapper/s1 $(echo '2*1024^3-1'|bc|tee /dev/tty)
mke2fs 1.41.4 (27-Jan-2009)
mkfs.ext4: Size of device /dev/mapper/s1 too big to be expressed in 32 bits
using a blocksize of 4096.
I can understand failing like that when the "blocks-count" argument
is omitted, because then we're asking mkfs.ext4 to use the entire
Version-Release number of selected component (if applicable):
mke2fs 1.41.4 (27-Jan-2009)
How reproducible: always
Steps to Reproduce: see above
Actual results: mkfs.ext4 fails
Expected results: it succeeds
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.
More information and reason for this action is here:
Val has fixed this upstream, it's wending its way through Ted's branches:
Author: Valerie Aurora Henson <email@example.com>
Date: Mon Jun 1 16:15:40 2009 -0400
Fix bug in selecting fs type, resulting in 1K blocksize
One of the previous 64-bit patches (20ce9ade: 64-bit mke2fs cleanup,top
of the 'js/new-64-bit' branch) moved the fs type and feature detection
code to precede the determination of the device size so that we could
check the 64bit flag if the device size would overflow 32 bits.
Unfortunately, the fs type code uses the device size to determine the
default set of parameters, and since the device size wasn't set yet, it
was clearly "small enough" to fit the floppy profile.
The solution is a bit complex. One problem is that you can't set the
blocks count to > 32 bits if the 64bit feature isn't enabled. So I
created a function to automatically set the 64bit feature if
necessary. After we parse the user supplied options, I check if the
64bit feature has been disabled and bail out then.
Signed-off-by: Valerie Aurora Henson <firstname.lastname@example.org>
Signed-off-by: "Theodore Ts'o" <email@example.com>
Since Val actually fixed this one upstream I'm going to put it on her plate; Val, closing it as UPSTREAM is probably ok, although we should make sure it doesn't get lost, and to that end perhaps keeping it open would be good.
maaaaaybe a regression test in e2fsprogs would be good? We could make a sparse 10T file on ext4 to do the test w/o needing dm ....
Just a thought :)
This message is a reminder that Fedora 11 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 11. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora
'version' of '11'.
Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version prior to Fedora 11's end of life.
Bug Reporter: Thank you for reporting this issue and we are sorry that
we may not be able to fix it before Fedora 11 is end of life. If you
would still like to see this bug fixed and are able to reproduce it
against a later version of Fedora please change the 'version' of this
bug to the applicable version. If you are unable to change the version,
please add a comment here and someone will do it for you.
Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
The process we are following is described here:
Fedora 11 changed to end-of-life (EOL) status on 2010-06-25. Fedora 11 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.
If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version.
Thank you for reporting this bug and we are sorry it could not be fixed.
Eh, just marking this CLOSED/RAWHIDE since it did get fixed upstream.