Bug 466899 - system-config-lvm online resize.
Summary: system-config-lvm online resize.
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: system-config-lvm
Version: rawhide
Hardware: All
OS: Linux
medium
low
Target Milestone: ---
Assignee: Marek Grac
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-10-14 12:40 UTC by Itamar Reis Peixoto
Modified: 2009-08-20 12:35 UTC (History)
8 users (show)

Fixed In Version: system-config-lvm-1_1_8-1_fc12
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-08-20 12:35:05 UTC
Type: ---
Embargoed:


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

Description Itamar Reis Peixoto 2008-10-14 12:40:45 UTC
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 19:34:15 UTC
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:
system-config-lvm-1.1.4-3.1.fc10.noarch
e2fsprogs-1.41.3-2.fc10.i386

Comment 2 Itamar Reis Peixoto 2009-02-22 22:40:00 UTC
(In reply to comment #1)
Are you able to write a patch ?

Comment 3 Ignacio Vazquez-Abrams 2009-02-25 21:24:44 UTC
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-26 00:02:34 UTC
(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-26 03:08:08 UTC
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 10:24:11 UTC
Fedora Core 6 had e2fsprogs 1.39. Can't you just drop the version check now?

Comment 7 Itamar Reis Peixoto 2009-02-26 13:20:44 UTC
Created attachment 333324 [details]
new version of the old patch

new version of the old patch

Comment 8 Itamar Reis Peixoto 2009-02-26 13:21:39 UTC
(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 13:10:27 UTC
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 18:51:25 UTC
Patch accepted (only minor stylish change)


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