Bug 519131 - resize2fs -M is failing during live image creation
Summary: resize2fs -M is failing during live image creation
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: e2fsprogs
Version: rawhide
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
Assignee: Josef Bacik
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-08-25 10:05 UTC by Sebastian Vahl
Modified: 2009-09-10 21:52 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-09-10 21:52:52 UTC


Attachments (Terms of Use)
full log of livecd-creator (70.56 KB, text/plain)
2009-08-29 06:53 UTC, Sebastian Vahl
no flags Details
might be a fix? (1.61 KB, patch)
2009-09-04 09:12 UTC, Peng Tao
no flags Details | Diff

Description Sebastian Vahl 2009-08-25 10:05:35 UTC
Description of problem: As noted in #517222 I was asked to file a bug against e2fsprogs. So here it is. 
During live image creation for x86_64 resize2fs is failing when there are too many packages installed. This is hard to describe but the current kickstart for F12Alpha succeeds. But when I'm adding some more packages it is failing.

passwd: Success
e2fsck 1.41.9 (22-Aug-2009)
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
F12-KDE-039-x86_: 84842/196608 files (0.1% non-contiguous), 535447/786432 blocks
e2image 1.41.9 (22-Aug-2009)
resize2fs 1.41.9 (22-Aug-2009)
/sbin/resize2fs: No space left on device while trying to resize /daten/LIVECD/tmp/imgcreate-dQzAbO/tmp-UsG6hL/ext3fs.img
Please run 'e2fsck -fy /daten/LIVECD/tmp/imgcreate-dQzAbO/tmp-UsG6hL/ext3fs.img' to fix the filesystem
after the aborted resize operation.
Resizing the filesystem on /daten/LIVECD/tmp/imgcreate-dQzAbO/tmp-UsG6hL/ext3fs.img to 534923 (4k) blocks.
/usr/lib/python2.6/site-packages/imgcreate/errors.py:45: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
  return unicode(self.message)
Error creating Live CD : resize2fs returned an error (1)!  image to debug at /tmp/resize-image-PzrdHC


Version-Release number of selected component (if applicable):
e2fsprogs-1.41.9-1.fc12.x86_64


I really don't know what information you need or how to debug this. So please let me know what kind of information are necessary.

# resize2fs -p resize-image-PzrdHC
resize2fs 1.41.4 (27-Jan-2009)
The filesystem is already 786432 blocks long.  Nothing to do!

# resize2fs -P resize-image-PzrdHC
resize2fs 1.41.4 (27-Jan-2009)
Estimated minimum size of the filesystem: 534923

# resize2fs -M resize-image-PzrdHC
resize2fs 1.41.4 (27-Jan-2009)
Resizing the filesystem on resize-image-PzrdHC to 534923 (4k) blocks.
resize2fs: No space left on device while trying to resize resize-image-PzrdHC

# mount -o loop resize-image-PzrdHC /mnt/iso/
# df /mnt/iso/
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/loop0             3096336   2092396    972484  69% /mnt/iso

Comment 1 Eric Sandeen 2009-08-27 17:03:43 UTC
Can you attach or otherwise make available that resize-image-PzrdHC?

Or maybe better, if you can replicate this, can you attach the full livecd creation log as well as the resulting image?

Although I'll need to think about this a bit more... and I'm on vacation this week so will have to get back to it later.

Thanks,
-Eric

Comment 2 Sebastian Vahl 2009-08-29 06:53:41 UTC
Created attachment 359136 [details]
full log of livecd-creator

I don't know how big the attachments could be so I've uploaded the gzip'ed image to my webspace: http://deadbabylon.de/files/resize-image-PzrdHC.gz

Comment 3 Eric Sandeen 2009-09-03 21:44:32 UTC
thanks.

So fsck says we are using 535447 blocks currently:

F12-KDE-039-x86_: 84842/196608 files (0.1% non-contiguous), 535447/786432 blocks


and resize2fs -M tries to resize it to 534923, which is -smaller- :

Resizing the filesystem on /daten/LIVECD/tmp/imgcreate-dQzAbO/tmp-UsG6hL/ext3fs.img to 534923 (4k) blocks.

Ugh.  The minimum resize calculation is so full of voodoo & heuristics that this may be tough.

As a fallback, livecd-creator -could- go back to the ol' binary search for minimum...

But I'll see if I can sort this out.  Thanks for providing the image, that'll help a lot.

-Eric

Comment 4 Peng Tao 2009-09-04 09:12:35 UTC
Created attachment 359775 [details]
might be a fix?

I think the attached patch would solve the problem.

-Bergwolf

Comment 5 Josef Bacik 2009-09-10 21:52:52 UTC
Yup, that patch fixes the problem.  I've committed the fix to rawhide.


Note You need to log in before you can comment on or make changes to this bug.