Bug 480023 - fsadm fails growing fs with block size != 1K
fsadm fails growing fs with block size != 1K
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: lvm2 (Show other bugs)
11
All Linux
low Severity medium
: ---
: ---
Assigned To: LVM and device-mapper development team
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-01-14 11:19 EST by Bryn M. Reeves
Modified: 2009-07-19 06:31 EDT (History)
10 users (show)

See Also:
Fixed In Version: 2.02.48-1.fc11
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 480022
Environment:
Last Closed: 2009-07-19 06:31:56 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Bryn M. Reeves 2009-01-14 11:19:40 EST
+++ This bug was initially created as a clone of Bug #480022 +++

Description of problem:
The fsadm script fails when attempting to grow an ext3 file system with any block size other than 1K:

# fsadm --lvresize resize /dev/tvg0/l0 1G
fsadm: --lvresize resize /dev/tvg0/l0 1G
fsadm: check /dev/tvg0/l0
fsck 1.35 (28-Feb-2004)
e2fsck 1.35 (28-Feb-2004)
/dev/mapper/tvg0-l0: clean, 11/102400 files, 7394/102400 blocks
  Extending logical volume l0 to 1.00 GB
  Logical volume l0 successfully resized
fsadm: resize /dev/tvg0/l0 1048576
resize2fs 1.35 (28-Feb-2004)
The containing partition (or device) is only 262144 (4k) blocks.
You requested a new size of 1048576 blocks.

fsadm: Resize ext2 failed
cleanup: exec lvresize -r -L4096 /dev/mapper/tvg0-l0
  fsadm failed: 1

The new block count passed to resize2fs is out by a factor of the file system  block size in kilobytes.

Since 1K block sizes are only used for tiny media this limits the usefulness of the script.

Version-Release number of selected component (if applicable):
lvm2-2.02.37-3.el4

How reproducible:
100%

Steps to Reproduce:

t0 is a volume group with ~1G free extents (you can get away with less)

1. lvcreate -n l0 -L 400M t0
2. mke2fs -b4096 -j /dev/t0/l0
3. e2fsck -f /dev/t0/l0
4. fsadm --lvresize resize /dev/t0 1G
  
Actual results:
Block size passed to resize2fs is out by a factor of 4:

# fsadm --lvresize resize /dev/t0/l0 1G
fsadm: check /dev/tvg0/l0
fsck 1.35 (28-Feb-2004)
e2fsck 1.35 (28-Feb-2004)
/dev/mapper/t0-l0: clean, 11/102400 files, 7394/102400 blocks
  Extending logical volume l0 to 1.00 GB
  Logical volume l0 successfully resized
fsadm: resize /dev/t0/l0 1048576
resize2fs 1.35 (28-Feb-2004)
The containing partition (or device) is only 262144 (4k) blocks.
You requested a new size of 1048576 blocks.

fsadm: Resize ext2 failed
cleanup: exec lvresize -r -L4096 /dev/mapper/tvg0-l0
  fsadm failed: 1


Expected results:
File system correctly resized.

Additional info:
Comment 1 Milan Broz 2009-01-15 10:52:51 EST
patch is upstream -> POST until fedora build is available.
Comment 2 Bug Zapper 2009-06-09 06:43:09 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 3 Fedora Update System 2009-07-03 05:29:39 EDT
lvm2-2.02.48-1.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/lvm2-2.02.48-1.fc11
Comment 4 Fedora Update System 2009-07-11 13:15:34 EDT
lvm2-2.02.48-1.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update lvm2'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-7468
Comment 5 Fedora Update System 2009-07-19 06:31:11 EDT
lvm2-2.02.48-1.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.

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