Bug 801640 - [RFE] the error reported by resize2fs-M need to be more clear
[RFE] the error reported by resize2fs-M need to be more clear
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libguestfs (Show other bugs)
6.3
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Richard W.M. Jones
Virtualization Bugs
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-08 23:28 EST by Mohua Li
Modified: 2013-02-21 03:38 EST (History)
4 users (show)

See Also:
Fixed In Version: libguestfs-1.16.31-2.el6
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-02-21 03:38:07 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Mohua Li 2012-03-08 23:28:57 EST
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:
Comment 2 Richard W.M. Jones 2012-03-09 13:15:33 EST
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.
Comment 5 RHEL Product and Program Management 2012-07-10 02:19:38 EDT
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.
Comment 6 RHEL Product and Program Management 2012-07-10 20:01:27 EDT
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.
Comment 8 Wei Shi 2012-11-01 05:42:30 EDT
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>
Comment 10 errata-xmlrpc 2013-02-21 03:38:07 EST
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

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