linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* with -b N and block count, should mkfs.ext4 fail with dev-too-big?
@ 2009-02-11 12:50 Jim Meyering
  2009-02-11 14:09 ` Theodore Tso
  0 siblings, 1 reply; 5+ messages in thread
From: Jim Meyering @ 2009-02-11 12:50 UTC (permalink / raw)
  To: ext; +Cc: Eric Sandeen

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-02-11 21:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-11 12:50 with -b N and block count, should mkfs.ext4 fail with dev-too-big? Jim Meyering
2009-02-11 14:09 ` 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

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).