Bug 213894 - lvextend fails even though there is plenty of space left to extend with
lvextend fails even though there is plenty of space left to extend with
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: lvm2 (Show other bugs)
4.4
All Linux
medium Severity medium
: ---
: ---
Assigned To: Alasdair Kergon
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-11-03 12:10 EST by Corey Marthaler
Modified: 2007-11-16 20:14 EST (History)
6 users (show)

See Also:
Fixed In Version: RHBA-2007-0287
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-05-07 20:12:40 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Corey Marthaler 2006-11-03 12:10:21 EST
Description of problem:
In an attempt to create a very segmented LV, I created 2 5G lvs out of a 135G
vg. I then extened them 2-3G at a time until they were both up to 45G a piece
(or 90G total) leaving 45G left in the vg. After that though I could no longer
extend beyond that.

[root@link-08 ~]# lvextend -L 17G V/test1
  Extending logical volume test1 to 17.00 GB
  Logical volume test1 successfully resized
[root@link-08 ~]# lvextend -L 17G V/test2
  Extending logical volume test2 to 17.00 GB
  Logical volume test2 successfully resized
[root@link-08 ~]# lvextend -L 19G V/test1
  Extending logical volume test1 to 19.00 GB
  Logical volume test1 successfully resized
[root@link-08 ~]# lvextend -L 19G V/test2
  Extending logical volume test2 to 19.00 GB
  Logical volume test2 successfully resized
[root@link-08 ~]# lvextend -L 21G V/test1
  Extending logical volume test1 to 21.00 GB
  Logical volume test1 successfully resized
[root@link-08 ~]# lvextend -L 21G V/test2
  Extending logical volume test2 to 21.00 GB
  Logical volume test2 successfully resized
[root@link-08 ~]# lvextend -L 25G V/test1
  Extending logical volume test1 to 25.00 GB
  Logical volume test1 successfully resized
[root@link-08 ~]# lvextend -L 25G V/test2
  Extending logical volume test2 to 25.00 GB
  Logical volume test2 successfully resized
[root@link-08 ~]# lvextend -L 45G V/test1
  Extending logical volume test1 to 45.00 GB
  Logical volume test1 successfully resized
[root@link-08 ~]# lvextend -L 45G V/test2
  Extending logical volume test2 to 45.00 GB
  Logical volume test2 successfully resized
[root@link-08 ~]# lvextend -L 75G V/test1
  Extending logical volume test1 to 75.00 GB
  Insufficient free space: 19200 extents needed, but only 11688 available
[root@link-08 ~]# lvextend -L 70G V/test1
  Extending logical volume test1 to 70.00 GB
  Insufficient free space: 17920 extents needed, but only 11688 available
[root@link-08 ~]# lvextend -L 60G V/test1
  Extending logical volume test1 to 60.00 GB
  Insufficient free space: 15360 extents needed, but only 11688 available
[root@link-08 ~]# lvextend -L 55G V/test1
  Extending logical volume test1 to 55.00 GB
  Insufficient free space: 14080 extents needed, but only 11688 available
[root@link-08 ~]# lvextend -L 50G V/test1
  Extending logical volume test1 to 50.00 GB
  Insufficient free space: 12800 extents needed, but only 11688 available
[root@link-08 ~]# lvextend -L 48G V/test1
  Extending logical volume test1 to 48.00 GB
  Insufficient free space: 12288 extents needed, but only 11688 available
[root@link-08 ~]# vgdisplay
  --- Volume group ---
  VG Name               V
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  28
  VG Access             read/write
  VG Status             resizable
  Clustered             yes
  Shared                no
  MAX LV                0
  Cur LV                2
  Open LV               0
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               135.66 GB
  PE Size               4.00 MB
  Total PE              34728
  Alloc PE / Size       23040 / 90.00 GB
  Free  PE / Size       11688 / 45.66 GB
  VG UUID               G5AnU2-9bgf-KMV8-AToo-jg41-xh9I-ljlB0R

[root@link-08 ~]# pvscan
  PV /dev/sda1   VG V   lvm2 [135.66 GB / 45.66 GB free]
  PV /dev/sdb1          lvm2 [135.66 GB]
  PV /dev/sdc1          lvm2 [135.66 GB]
  PV /dev/sdd1          lvm2 [135.66 GB]
  PV /dev/sde1          lvm2 [135.66 GB]
  PV /dev/sdf1          lvm2 [135.66 GB]
  PV /dev/sdg1          lvm2 [135.66 GB]
  Total: 7 [949.60 GB] / in use: 1 [135.66 GB] / in no VG: 6 [813.95 GB]
[root@link-08 ~]# lvs -a -o +devices
  LV    VG   Attr   LSize  Origin Snap%  Move Log Copy%  Devices
  test1 V    -wi-a- 45.00G                               /dev/sda1(0)
  test1 V    -wi-a- 45.00G                               /dev/sda1(2560)
  test1 V    -wi-a- 45.00G                               /dev/sda1(3584)
  test1 V    -wi-a- 45.00G                               /dev/sda1(4608)
  test1 V    -wi-a- 45.00G                               /dev/sda1(5632)
  test1 V    -wi-a- 45.00G                               /dev/sda1(6656)
  test1 V    -wi-a- 45.00G                               /dev/sda1(7680)
  test1 V    -wi-a- 45.00G                               /dev/sda1(8704)
  test1 V    -wi-a- 45.00G                               /dev/sda1(9728)
  test1 V    -wi-a- 45.00G                               /dev/sda1(10752)
  test1 V    -wi-a- 45.00G                               /dev/sda1(12800)
  test2 V    -wi-a- 45.00G                               /dev/sda1(1280)
  test2 V    -wi-a- 45.00G                               /dev/sda1(3072)
  test2 V    -wi-a- 45.00G                               /dev/sda1(4096)
  test2 V    -wi-a- 45.00G                               /dev/sda1(5120)
  test2 V    -wi-a- 45.00G                               /dev/sda1(6144)
  test2 V    -wi-a- 45.00G                               /dev/sda1(7168)
  test2 V    -wi-a- 45.00G                               /dev/sda1(8192)
  test2 V    -wi-a- 45.00G                               /dev/sda1(9216)
  test2 V    -wi-a- 45.00G                               /dev/sda1(10240)
  test2 V    -wi-a- 45.00G                               /dev/sda1(11776)
  test2 V    -wi-a- 45.00G                               /dev/sda1(17920)
[root@link-08 ~]#
[root@link-08 ~]# lvscan
  ACTIVE            '/dev/V/test1' [45.00 GB] inherit
  ACTIVE            '/dev/V/test2' [45.00 GB] inherit
[root@link-08 ~]# lvextend -L 46G V/test1
  Extending logical volume test1 to 46.00 GB
  Insufficient free space: 11776 extents needed, but only 11688 available
[root@link-08 ~]# lvextend -L +1G V/test2
  Extending logical volume test2 to 46.00 GB
  Insufficient free space: 11776 extents needed, but only 11688 available


I then extended the vg another 135G and then the extends once again worked,
however, the space used for the lvextends ended up being the free 45G on the
original PV.


[root@link-08 ~]# vgextend V /dev/sdb1
  Volume group "V" successfully extended
[root@link-08 ~]# vgdisplay
  --- Volume group ---
  VG Name               V
  System ID
  Format                lvm2
  Metadata Areas        2
  Metadata Sequence No  29
  VG Access             read/write
  VG Status             resizable
  Clustered             yes
  Shared                no
  MAX LV                0
  Cur LV                2
  Open LV               0
  Max PV                0
  Cur PV                2
  Act PV                2
  VG Size               271.31 GB
  PE Size               4.00 MB
  Total PE              69456
  Alloc PE / Size       23040 / 90.00 GB
  Free  PE / Size       46416 / 181.31 GB
  VG UUID               G5AnU2-9bgf-KMV8-AToo-jg41-xh9I-ljlB0R

[root@link-08 ~]# lvextend -L +1G V/test2
  Extending logical volume test2 to 46.00 GB
  Logical volume test2 successfully resized
[root@link-08 ~]# lvextend -L +1G V/test1
  Extending logical volume test1 to 46.00 GB
  Logical volume test1 successfully resized
[root@link-08 ~]# lvs -a -o +devices
  LV    VG   Attr   LSize  Origin Snap%  Move Log Copy%  Devices
  test1 V    -wi-a- 46.00G                               /dev/sda1(0)
  test1 V    -wi-a- 46.00G                               /dev/sda1(2560)
  test1 V    -wi-a- 46.00G                               /dev/sda1(3584)
  test1 V    -wi-a- 46.00G                               /dev/sda1(4608)
  test1 V    -wi-a- 46.00G                               /dev/sda1(5632)
  test1 V    -wi-a- 46.00G                               /dev/sda1(6656)
  test1 V    -wi-a- 46.00G                               /dev/sda1(7680)
  test1 V    -wi-a- 46.00G                               /dev/sda1(8704)
  test1 V    -wi-a- 46.00G                               /dev/sda1(9728)
  test1 V    -wi-a- 46.00G                               /dev/sda1(10752)
  test1 V    -wi-a- 46.00G                               /dev/sda1(12800)
  test1 V    -wi-a- 46.00G                               /dev/sda1(23296)
  test2 V    -wi-a- 46.00G                               /dev/sda1(1280)
  test2 V    -wi-a- 46.00G                               /dev/sda1(3072)
  test2 V    -wi-a- 46.00G                               /dev/sda1(4096)
  test2 V    -wi-a- 46.00G                               /dev/sda1(5120)
  test2 V    -wi-a- 46.00G                               /dev/sda1(6144)
  test2 V    -wi-a- 46.00G                               /dev/sda1(7168)
  test2 V    -wi-a- 46.00G                               /dev/sda1(8192)
  test2 V    -wi-a- 46.00G                               /dev/sda1(9216)
  test2 V    -wi-a- 46.00G                               /dev/sda1(10240)
  test2 V    -wi-a- 46.00G                               /dev/sda1(11776)
  test2 V    -wi-a- 46.00G                               /dev/sda1(17920)


Version-Release number of selected component (if applicable):
[root@link-08 ~]# rpm -qa | grep lvm2
lvm2-cluster-2.02.13-1
lvm2-cluster-debuginfo-2.02.06-7.0.RHEL4
lvm2-2.02.13-1
[root@link-08 ~]# rpm -q device-mapper
device-mapper-1.02.12-3
[root@link-08 ~]# uname -ar
Linux link-08 2.6.9-42.17.ELsmp #1 SMP Mon Oct 9 18:42:57 EDT 2006 x86_64 x86_64
x86_64 GNU/Linux
Comment 1 Corey Marthaler 2006-11-03 12:58:40 EST
I was able to easily reproduce this.
Comment 2 Dave Wysochanski 2007-01-09 18:47:45 EST
I think this should be fixed in the latest build of lvm2 for rhel4 -
lvm2-2.02.14 or above.
Comment 3 RHEL Product and Program Management 2007-01-10 08:45:03 EST
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.
Comment 5 Corey Marthaler 2007-01-22 14:40:02 EST
This fix has been verified in lvm2-2.02.19-1.el4.
Comment 9 Red Hat Bugzilla 2007-05-07 20:12:41 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2007-0287.html

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