Bug 801640 - [RFE] the error reported by resize2fs-M need to be more clear
Summary: [RFE] the error reported by resize2fs-M need to be more clear
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libguestfs
Version: 6.3
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-03-09 04:28 UTC by Mohua Li
Modified: 2013-02-21 08:38 UTC (History)
4 users (show)

Fixed In Version: libguestfs-1.16.31-2.el6
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-21 08:38:07 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:0324 normal SHIPPED_LIVE libguestfs bug fix and enhancement update 2013-02-20 20:54:42 UTC

Description Mohua Li 2012-03-09 04:28:57 UTC
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 18:15:33 UTC
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 06:19:38 UTC
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-11 00:01:27 UTC
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 09:42:30 UTC
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 08:38:07 UTC
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.