[Bug 956038] Re: resize2fs allows resize beyond maximum fs size - corrupts fs
Neil Wilson
neil at aldur.co.uk
Thu Mar 15 14:24:49 UTC 2012
Similarly with online resizing:
$ cp tiny xxl
$ dd if=/dev/zero of=xxl bs=1 count=0 seek=1310720M
$ sudo losetup /dev/loop0 xxl
$ sudo e2fsck /dev/loop0
e2fsck 1.42 (29-Nov-2011)
/dev/loop0: clean, 11/65536 files, 12635/262144 blocks
$ sudo mount /dev/loop0 /mnt
$ sudo resize2fs /dev/loop0
resize2fs 1.42 (29-Nov-2011)
Filesystem at /dev/loop0 is mounted on /mnt; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 80
Performing an on-line resize of /dev/loop0 to 335544320 (4k) blocks.
resize2fs: Operation not permitted While trying to add group #8192
$ sudo umount /dev/loop0
$ sudo e2fsck /dev/loop0
e2fsck 1.42 (29-Nov-2011)
/dev/loop0: clean, 11/67108864 files, 4220121/268435456 blocks
With online resizing the filesystem fails to a consistent state at the
maximum filesystem size.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to e2fsprogs in Ubuntu.
https://bugs.launchpad.net/bugs/956038
Title:
resize2fs allows resize beyond maximum fs size - corrupts fs
Status in “e2fsprogs” package in Ubuntu:
New
Bug description:
If you resize a 1G partition to more than 1T the filesystem becomes
corrupted offline and errors on-line.
resize2fs does not check the maximum size of the filesystem before
initiating the resize.
To reproduce:
$ dd if=/dev/zero of=tiny bs=1 count=0 seek=1G
$ mkfs.ext4 -F -J size=128 tiny
....
Maximum filesystem blocks=268435456
....
$ cp tiny xxl
$ resize2fs xxl 1310720M
resize2fs 1.42 (29-Nov-2011)
Resizing the filesystem on xxl to 335544320 (4k) blocks.
The filesystem on xxl is now 335544320 blocks long.
$ e2fsck xxl
e2fsck 1.42 (29-Nov-2011)
e2fsck: Group descriptors look bad... trying backup blocks...
One or more block group descriptor checksums are invalid. Fix<y>?
ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: e2fsprogs 1.41.14-1ubuntu3
ProcVersionSignature: Ubuntu 3.0.0-16.29-generic 3.0.20
Uname: Linux 3.0.0-16-generic x86_64
ApportVersion: 1.23-0ubuntu4
Architecture: amd64
CheckboxSubmission: 55cafa5b8b82ed224cc59d444cb1fc25
CheckboxSystem: 3e53d3ea5811723345f19eff5070f9ab
Date: Thu Mar 15 13:51:37 2012
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
SourcePackage: e2fsprogs
UpgradeStatus: No upgrade log present (probably fresh install)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/e2fsprogs/+bug/956038/+subscriptions
More information about the foundations-bugs
mailing list