Bug 212774 - cannot resize lvextend lvresize a logical volume
Summary: cannot resize lvextend lvresize a logical volume
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: lvm2
Version: rawhide
Hardware: All
OS: Linux
medium
high
Target Milestone: ---
Assignee: Alasdair Kergon
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-10-28 23:18 UTC by Kenneth Topp
Modified: 2007-11-30 22:11 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-10-30 16:24:44 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
/usr/sbin/lvmdump generated tarball (22.74 KB, application/x-compressed-tar)
2006-10-29 04:05 UTC, Kenneth Topp
no flags Details

Description Kenneth Topp 2006-10-28 23:18:23 UTC
fc6 devicemapper/lvm2 is unusable due to pvmove being broken, so this is being
run on rawhide bits.

With:
$ rpm -qa lvm2 device-mapper
lvm2-2.02.13-1.fc7
device-mapper-1.02.12-3.fc7

And running:

# lvresize -vvvvvv --size +1g /dev/tm/home 

I get: 

#metadata/pv_manip.c:241         /dev/sda1 0:      0  59618: home(0:0)
#metadata/pv_manip.c:241         /dev/sdf1 0:      0  59618: home(103779:0)
#metadata/pv_manip.c:241         /dev/sdc1 0:      0  95387: home(163397:0)
#metadata/pv_manip.c:241         /dev/sdg1 0:      0  44161: home(59618:0)
#metadata/pv_manip.c:241         /dev/sdg1 1:  44161  15457: NULL(0:0)
#format_text/archiver.c:129     Archiving volume group "tm" metadata (seqno 36).
  Extending logical volume home to 1011.88 GB
#metadata/pv_map.c:49         Allowing allocation on /dev/sdg1 start PE 44161
length 15457
#metadata/lv_manip.c:900   Insufficient free space: 259040 extents needed, but
only 15457 available

Comment 1 Dave Wysochanski 2006-10-29 00:36:36 UTC
Can you run lvm_dump.sh and attach the tarball to this bug?

Thanks.

Comment 2 Kenneth Topp 2006-10-29 04:05:27 UTC
Created attachment 139657 [details]
/usr/sbin/lvmdump generated tarball

Comment 3 Kenneth Topp 2006-10-29 04:06:15 UTC
I believe the issue is this recently added check isn't checking "uint32_t
*allocated"

http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/lv_manip.c.diff?r1=1.110&r2=1.111&cvsroot=lvm2


Comment 4 Kenneth Topp 2006-10-30 14:47:23 UTC
This patch fixes it for me.  Hopefully these updates will make it to fc6 soon.

--- lv_manip.c.lvm2.fixup       2006-10-23 11:54:51.000000000 -0400
+++ lv_manip.c  2006-10-30 09:43:11.000000000 -0500
@@ -894,9 +894,9 @@
 
        /* Is there enough total space? */
        free_pes = pv_maps_size(pvms);
-       if (needed > free_pes) {
+       if (needed - *allocated > free_pes) {
                log_error("Insufficient free space: %" PRIu32 " extents needed,"
-                         " but only %" PRIu32 " available", needed,
+                         " but only %" PRIu32 " available", needed - *allocated,
                          free_pes);
                return 0;
        }


Comment 5 Alasdair Kergon 2006-10-30 16:24:44 UTC
lvm2-2_02_13-2_fc7 submitted to build system

Comment 6 Alasdair Kergon 2006-10-30 22:54:06 UTC
Thanks for the fix.

Built successfully so should appear in rawhide/fc7.

When we hit upon a stable lvm2 release I'll update fc6 to it.  (This bug was
introduced after fc6 froze of course.)



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