Hide Forgot
Description of problem: the error reported by libguestfs api resize2fs-M is wrong, without trace, ><fs> resize2fs-M /dev/vda1 libguestfs: error: resize2fs_M: you need to run e2fsck with the correct and/or forceall options first with trace, can see it's cause by the size of the disk, ><fs> resize2fs-M /dev/vda1 libguestfs: send_to_daemon: 60 bytes: 00 00 00 38 | 20 00 f5 f5 | 00 00 00 04 | 00 00 01 19 | 00 00 00 00 | ... guestfsd: main_loop: proc 304 (e2fsck) took 0.16 seconds guestfsd: main_loop: new request, len 0x38 resize2fs -M /dev/vda1 resize2fs 1.41.12 (17-May-2010) resize2fs: Not enough space to build proposed filesystem while trying to resize /dev/vda1 Please run 'e2fsck -fy /dev/vda1' to fix the filesystem after the aborted resize operation. guestfsd: error: you need to run e2fsck with the correct and/or forceall options first guestfsd: main_loop: proc 281 (resize2fs_M) took 0.04 seconds libguestfs: recv_from_daemon: 120 bytes: 20 00 f5 f5 | 00 00 00 04 | 00 00 01 19 | 00 00 00 01 | 00 12 34 1a | ... libguestfs: error: resize2fs_M: you need to run e2fsck with the correct and/or forceall options first i think libguestfs need to return different error message according to resize2fs's error message, but not all " you need to run e2fsck with the correct and/or forceall options first" Version-Release number of selected component (if applicable): libguestfs-1.16.8-1.el6.x86_64 How reproducible: always Steps to Reproduce: 1.guestfish -N -fs 2.resize2fs-M /dev/vda1 3. Actual results: Expected results: show the resize2fs error " Not enough space to build proposed filesystem while trying to resize /dev/vda1" instead " resize2fs_M: you need to run e2fsck with the correct and/or forceall options first" Additional info:
I posted a fix upstream, but it is far too invasive for 6.3. https://www.redhat.com/archives/libguestfs/2012-March/msg00049.html Moving this bug to 6.4.
Upstream (not RHEL): https://github.com/libguestfs/libguestfs/commit/dfe30bdfe70f18d61404b41300f274480163c44d https://github.com/libguestfs/libguestfs/commit/2fb545b840745f6d944d89872f1d7372821b30cc https://github.com/libguestfs/libguestfs/commit/5b7b1c43ab85bb75bdb36844cce1cc124d5df4f2
This request was not resolved in time for the current release. Red Hat invites you to ask your support representative to propose this request, if still desired, for consideration in the next release of Red Hat Enterprise Linux.
This request was erroneously removed from consideration in Red Hat Enterprise Linux 6.4, which is currently under development. This request will be evaluated for inclusion in Red Hat Enterprise Linux 6.4.
Reproduced: libguestfs-1.16.19-1.el6.x86_64 # guestfish -N fs ><fs> resize2fs-M /dev/vda1 libguestfs: error: resize2fs_M: you need to run e2fsck with the correct and/or forceall options first ><fs> Verified: libguestfs-1.16.32-2.el6.x86_64 # guestfish -N fs ><fs> resize2fs-M /dev/vda1 libguestfs: error: resize2fs_M: resize2fs 1.41.12 (17-May-2010) resize2fs: Not enough space to build proposed filesystem while trying to resize /dev/vda1 Please run 'e2fsck -fy /dev/vda1' to fix the filesystem after the aborted resize operation. ><fs>
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2013-0324.html