From: Jim Meyering <jim@meyering.net>
To: ext <linux-ext4@vger.kernel.org>
Cc: Eric Sandeen <sandeen@redhat.com>
Subject: with -b N and block count, should mkfs.ext4 fail with dev-too-big?
Date: Wed, 11 Feb 2009 13:50:39 +0100 [thread overview]
Message-ID: <87ab8ti1cw.fsf@meyering.net> (raw)
Hi,
[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:
N=$(echo '10*2*1024^3'|bc)
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)
2147483647
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.
[Exit 1]
I can understand failing like that when the "blocks-count" argument
is omitted, because then we're asking mkfs.ext4 to use the entire
device.
Regards,
Jim
PS. let me know if you'd like a BZ for this, and I'll fill out the form
next reply other threads:[~2009-02-11 12:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-11 12:50 Jim Meyering [this message]
2009-02-11 14:09 ` with -b N and block count, should mkfs.ext4 fail with dev-too-big? Theodore Tso
2009-02-11 19:26 ` Valerie Aurora Henson
2009-02-11 19:32 ` Eric Sandeen
2009-02-11 21:17 ` Valerie Aurora Henson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ab8ti1cw.fsf@meyering.net \
--to=jim@meyering.net \
--cc=linux-ext4@vger.kernel.org \
--cc=sandeen@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).