with -b N and block count, should mkfs.ext4 fail with dev-too-big?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux