resize2fs -P minimum size differs greatly between v1.42.10 and v1.42.9
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
e2fsprogs (Ubuntu) |
Invalid
|
Medium
|
Unassigned |
Bug Description
I have a disk image created as part of lp:maas-images.
This process takes a cloud image (http://
http://
Inside that .tar.gz is a .img file. The .img file is operated on
by loop mount, chroot, apt-get install and other changes.
Immediately upon download and extraction of a pristine image, resize2fs output
on trusty, utopic and vivid differ. A summary of differences:
a.) 'resize2fs -P' on
trusty (1.42.9) : 230329
utopic (1.42.10): 236103
vivid (1.42.12): 236103
b.) vivid resize2fs requires running 'e2fsck -f' first.
I do realize that 'resize2fs -P' reports "Estimated minumum size" and that a
difference of ~6k blocks doesn't seem like too big of a deal, but I'm seeing
this behavior on a much grander scale after doing some loop mount operations
on the disk image as part of the maas-images build process (lp:maas-images).
On that derived image, I see 'resize2fs -P' numbers like:
trusty: 274500
utopic: 358400
vivid: 358400
The 83900 blocks out of a 358400 seems significant (23% of the fs size),
and results in the image appearing full on utopic/vivid, even though
a mount and df show only 74% full.
See below for more information.
## The original image as downloaded.
$ wget http://
$ tar -Sxvzf ubuntu-
$ md5sum trusty-
9fd4790c920aaeb
## Trusty
$ resize2fs -P trusty-
resize2fs 1.42.9 (4-Feb-2014)
Estimated minimum size of the filesystem: 230329
$ dumpe2fs trusty-
dumpe2fs 1.42.9 (4-Feb-2014)
http://
## Utopic
$ resize2fs -P trusty-
resize2fs 1.42.10 (18-May-2014)
Estimated minimum size of the filesystem: 236103
$ dumpe2fs trusty-
dumpe2fs 1.42.10 (18-May-2014)
http://
## Vivid
$ resize2fs -P trusty-
resize2fs 1.42.12 (29-Aug-2014)
Please run 'e2fsck -f trusty-
$ cp trusty-
$ e2fsck -f trusty-
e2fsck 1.42.12 (29-Aug-2014)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
cloudimg-rootfs: 57885/90112 files (0.0% non-contiguous), 207837/360448 blocks
$ resize2fs -P trusty-
resize2fs 1.42.12 (29-Aug-2014)
Estimated minimum size of the filesystem: 236103
$ md5sum trusty-
9fd4790c920aaeb
c38a3ca8cba7996
$ dumpe2fs trusty-
dumpe2fs 1.42.12 (29-Aug-2014)
http://
$ dumpe2fs trusty-
dumpe2fs 1.42.12 (29-Aug-2014)
http://
## maas images image
## output below is for the maas build process output image
## This one specifically is an arm64 image, and the operations
## done (apt-get update) and such were done with the help chroot via
## qemu-static.
## build the image (works on trusty, fails due to resizing issues on utopic)
$ time maas-cloudimg2eph2 -vv --kernel=
http://
/tmp/
--krd-
$ pastebinit out.log
http://
$ zcat /tmp/maas_
$ ls -l /tmp/root-image
-rw-rw-r-- 1 ubuntu ubuntu 1468006400 Jan 27 14:56 /tmp/root-image
## see attached root-image.
$ e2image /tmp/root-image /tmp/root-
e2image 1.42.9 (4-Feb-2014)
$ xz /tmp/root-
## Now, the above 'root-image' file on utopic, vivid and trusty.
##
## Trusty
$ resize2fs -P /tmp/root-image
resize2fs 1.42.9 (4-Feb-2014)
Estimated minimum size of the filesystem: 274500
$ mkdir -p /tmp/mp && sudo mount -o loop,ro /tmp/root-image /tmp/mp &&
df /tmp/mp && sudo umount /tmp/mp
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/loop0 1356344 980284 359676 74% /tmp/mp
$ dumpe2fs /tmp/root-image | pastebinit
dumpe2fs 1.42.9 (4-Feb-2014)
http://
## Utopic
$ resize2fs -P /tmp/root-image
resize2fs 1.42.10 (18-May-2014)
Estimated minimum size of the filesystem: 358400
$ mkdir -p /tmp/mp && sudo mount -o loop,ro /tmp/root-image /tmp/mp &&
df /tmp/mp && sudo umount /tmp/mp
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/loop0 1356344 980284 359676 74% /tmp/mp
$ dumpe2fs /tmp/root-image | pastebinit
dumpe2fs 1.42.10 (18-May-2014)
http://
## Vivid
$ resize2fs -P /tmp/root-image
resize2fs 1.42.12 (29-Aug-2014)
Estimated minimum size of the filesystem: 358400
$ mkdir -p /tmp/mp && sudo mount -o loop,ro /tmp/root-image /tmp/mp &&
df /tmp/mp && sudo umount /tmp/mp
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/loop0 1356344 980284 359676 74% /tmp/mp
$ dumpe2fs /tmp/root-image | pastebinit
dumpe2fs 1.42.12 (29-Aug-2014)
http://
ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: e2fsprogs 1.42.12-1ubuntu1
ProcVersionSign
Uname: Linux 3.18.0-9-generic x86_64
ApportVersion: 2.15.1-0ubuntu2
Architecture: amd64
Date: Tue Jan 27 14:13:26 2015
Ec2AMI: ami-000000f5
Ec2AMIManifest: FIXME
Ec2Availability
Ec2InstanceType: m1.small
Ec2Kernel: aki-00000002
Ec2Ramdisk: ari-00000002
ProcEnviron:
TERM=xterm
PATH=(custom, no user)
XDG_RUNTIME_
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: e2fsprogs
UpgradeStatus: No upgrade log present (probably fresh install)
summary: |
- resize2fs behavior differs greatly between trusty and utopic and vivid + resize2fs -P minimum size differs greatly between v1.42.10 and v1.42.9 |
To rule out kernel involvement, I took the same 'root-image' and ran this on utopic:
# these downloaded trusty versions [https:/ /launchpad. net/ubuntu/ +source/ e2fsprogs] 1.42.9- 3ubuntu1_ amd64.deb 1.42.9- 3ubuntu1_ amd64.deb
$ sudo dpkg -i e2fslibs_
$ sudo dpkg -i e2fsprogs_
$ resize2fs -P /tmp/root-image
resize2fs 1.42.9 (4-Feb-2014)
Estimated minimum size of the filesystem: 274500
And then quickly checking that 'apt-get install e2fsprogs' installs utopic version 1.42.10 and:
$ resize2fs -P /tmp/root-image
resize2fs 1.42.10 (18-May-2014)
Estimated minimum size of the filesystem: 358400