Bug 212774 - cannot resize lvextend lvresize a logical volume
cannot resize lvextend lvresize a logical volume
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: lvm2 (Show other bugs)
rawhide
All Linux
medium Severity high
: ---
: ---
Assigned To: Alasdair Kergon
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-10-28 19:18 EDT by Kenneth Topp
Modified: 2007-11-30 17:11 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-10-30 11:24:44 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Kenneth Topp 2006-10-28 19:18:23 EDT
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-28 20:36:36 EDT
Can you run lvm_dump.sh and attach the tarball to this bug?

Thanks.
Comment 2 Kenneth Topp 2006-10-29 00:05:27 EDT
Created attachment 139657 [details]
/usr/sbin/lvmdump generated tarball
Comment 3 Kenneth Topp 2006-10-29 00:06:15 EDT
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 09:47:23 EST
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 11:24:44 EST
lvm2-2_02_13-2_fc7 submitted to build system
Comment 6 Alasdair Kergon 2006-10-30 17:54:06 EST
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.