Bug 466899 - system-config-lvm online resize.
system-config-lvm online resize.
Product: Fedora
Classification: Fedora
Component: system-config-lvm (Show other bugs)
All Linux
medium Severity low
: ---
: ---
Assigned To: Marek Grac
Fedora Extras Quality Assurance
: FutureFeature
Depends On:
  Show dependency treegraph
Reported: 2008-10-14 08:40 EDT by Itamar Reis Peixoto
Modified: 2009-08-20 08:35 EDT (History)
8 users (show)

See Also:
Fixed In Version: system-config-lvm-1_1_8-1_fc12
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-08-20 08:35:05 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Patch to compare versions (687 bytes, patch)
2009-02-25 16:24 EST, Ignacio Vazquez-Abrams
no flags Details | Diff
new version of the old patch (688 bytes, patch)
2009-02-26 08:20 EST, Itamar Reis Peixoto
no flags Details | Diff

  None (edit)
Description Itamar Reis Peixoto 2008-10-14 08:40:45 EDT
Description of problem:

[root@vps1 ~]# lvresize -L 20G /dev/VolGroup00/install
  Extending logical volume install to 20.00 GB
  Logical volume install successfully resized

[root@vps1 ~]# resize2fs -p /dev/VolGroup00/install
resize2fs 1.41.2 (02-Oct-2008)
Filesystem at /dev/VolGroup00/install is mounted on /install; on-line resizing required
old desc_blocks = 1, new_desc_blocks = 2
Performing an on-line resize of /dev/VolGroup00/install to 5242880 (4k) blocks.
The filesystem on /dev/VolGroup00/install is now 5242880 blocks long.

why system-config-lvm can't do a online resize when the filesystem is being used and umount fail ?
Comment 1 Oliver Henshaw 2009-02-22 14:34:15 EST
I ran into this problem, and tracked it down to wrong logic in /usr/share/system-config-lvm/Filesystem.py  - the function ext3.__extend_online_cmd(self) checks for tools able to perform an online resize, but fails because 1.41.3 cannot be compared with 1.39.

$ resize2fs
resize2fs 1.41.3 (12-Oct-2008)
Usage: resize2fs [-d debug_flags] [-f] [-F] [-M] [-P] [-p] device [new_size]
$ python
>>> float("resize2fs 1.41.3 (12-Oct-2008)".strip().split()[1])
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: invalid literal for float(): 1.41.3

Packages installed:
Comment 2 Itamar Reis Peixoto 2009-02-22 17:40:00 EST
(In reply to comment #1)
Are you able to write a patch ?
Comment 3 Ignacio Vazquez-Abrams 2009-02-25 16:24:44 EST
Created attachment 333235 [details]
Patch to compare versions

This patch works by turning the string into a sequence of integers, then comparing.
Comment 4 Itamar Reis Peixoto 2009-02-25 19:02:34 EST
(In reply to comment #3)

thanks for the patch, but no luck :-(

[itamar@itamar devel]$ system-config-lvm
Traceback (most recent call last):
  File "/usr/share/system-config-lvm/system-config-lvm.py", line 49, in <module>
    from lvm_model import lvm_model, lvm_conf_get_locking_type
  File "/usr/share/system-config-lvm/lvm_model.py", line 19, in <module>
    import Filesystem
  File "/usr/share/system-config-lvm/Filesystem.py", line 196
    map(int, e.strip().split()[1].split('.')) >= [1, 39]:
SyntaxError: invalid syntax
[itamar@itamar devel]$
Comment 5 Stephen Warren 2009-02-25 22:08:08 EST
Try this for the replacement text in the patch:

+            if ((s == 0 or s == 1) and 
+                map(int, e.strip().split()[1].split('.')) >= [1, 39]):

(i.e. add the missing trailing ) before the : on the 2nd line)
Comment 6 Michal Schmidt 2009-02-26 05:24:11 EST
Fedora Core 6 had e2fsprogs 1.39. Can't you just drop the version check now?
Comment 7 Itamar Reis Peixoto 2009-02-26 08:20:44 EST
Created attachment 333324 [details]
new version of the old patch

new version of the old patch
Comment 8 Itamar Reis Peixoto 2009-02-26 08:21:39 EST
(In reply to comment #6)
> Fedora Core 6 had e2fsprogs 1.39. Can't you just drop the version check now?

remove the check or apply the lasted version of the patch ?
Comment 9 Oliver Henshaw 2009-07-15 09:10:27 EDT
ext3.__extend_online_cmd(self) is still unchanged in system-config-lvm-1.1.4-5.1.fc11.noarch.
Comment 10 Marek Grac 2009-08-12 14:51:25 EDT
Patch accepted (only minor stylish change)

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