Bug 480023 - fsadm fails growing fs with block size != 1K
Summary: fsadm fails growing fs with block size != 1K
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: lvm2
Version: 11
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: LVM and device-mapper development team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-01-14 16:19 UTC by Bryn M. Reeves
Modified: 2009-07-19 10:31 UTC (History)
10 users (show)

Fixed In Version: 2.02.48-1.fc11
Doc Type: Bug Fix
Doc Text:
Clone Of: 480022
Environment:
Last Closed: 2009-07-19 10:31:56 UTC


Attachments (Terms of Use)

Description Bryn M. Reeves 2009-01-14 16:19:40 UTC
+++ 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 15:52:51 UTC
patch is upstream -> POST until fedora build is available.

Comment 2 Bug Zapper 2009-06-09 10:43:09 UTC
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 09:29:39 UTC
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 17:15:34 UTC
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 10:31:11 UTC
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.