[linux-lvm] lvextend problem

Nikolay Yevik Nikolay.Yevik at Halliburton.com
Thu Jun 14 18:08:30 UTC 2007


Greetings,

 

I would greatly appreciate if anyone can help me with the issue I am
having with vgextend.

I am trying to extend my LV but getting error about insufficient
extents, while there are enough free PEs in the VG.

 

Here is setup information:

# lvm version

  LVM version:     2.02.13 (2006-10-27)

  Library version: 1.02.12 (2006-10-13)

  Driver version:  4.7.0

 

# pvs

  PV         VG     Fmt  Attr PSize PFree

  /dev/sda2  system lvm2 a-   6.50G 708.00M

  /dev/sda3  data   lvm2 a-   1.42G      0

  /dev/sdb1  data   lvm2 a-   2.99G      0

  /dev/sdc1  system lvm2 a-   2.99G   2.99G

 

# vgs

  VG     #PV #LV #SN Attr   VSize VFree

  data     2   3   0 wz--n- 4.41G    0

  system   2   3   0 wz--n- 9.49G 3.68G

 

# lvs

  LV    VG     Attr   LSize   Origin Snap%  Move Log Copy%

  data1 data   -wi-ao 728.00M

  data2 data   -wi-ao 728.00M

  data3 data   -wi-ao   2.99G

  home  system -wi-ao 128.00M

  root  system -wi-ao   5.00G

  swap  system -wi-ao 700.00M

 

# vgdisplay

  --- Volume group ---

  VG Name               data

  System ID

  Format                lvm2

  Metadata Areas        2

  Metadata Sequence No  11

  VG Access             read/write

  VG Status             resizable

  MAX LV                0

  Cur LV                3

  Open LV               3

  Max PV                0

  Cur PV                2

  Act PV                2

  VG Size               4.41 GB

  PE Size               4.00 MB

  Total PE              1130

  Alloc PE / Size       1130 / 4.41 GB

  Free  PE / Size       0 / 0

  VG UUID               4I2UCL-raKY-a6Kt-b2SE-2vAV-vHB9-UndWx9

 

  --- Volume group ---

  VG Name               system

  System ID

  Format                lvm2

  Metadata Areas        2

  Metadata Sequence No  13

  VG Access             read/write

  VG Status             resizable

  MAX LV                0

  Cur LV                3

  Open LV               3

  Max PV                0

  Cur PV                2

  Act PV                2

  VG Size               9.49 GB

  PE Size               4.00 MB

  Total PE              2430

  Alloc PE / Size       1487 / 5.81 GB

  Free  PE / Size       943 / 3.68 GB

  VG UUID               KQ3dPF-X92n-0HVb-sYl5-iARG-wUEX-iEGJsG

 

# lvscan

  ACTIVE            '/dev/data/data1' [728.00 MB] inherit

  ACTIVE            '/dev/data/data2' [728.00 MB] inherit

  ACTIVE            '/dev/data/data3' [2.99 GB] inherit

  ACTIVE            '/dev/system/home' [128.00 MB] inherit

  ACTIVE            '/dev/system/root' [5.00 GB] inherit

  ACTIVE            '/dev/system/swap' [700.00 MB] inherit

 

# mount

/dev/mapper/system-root on / type ext3 (rw,acl,user_xattr)

proc on /proc type proc (rw)

sysfs on /sys type sysfs (rw)

debugfs on /sys/kernel/debug type debugfs (rw)

udev on /dev type tmpfs (rw)

devpts on /dev/pts type devpts (rw,mode=0620,gid=5)

/dev/sda1 on /boot type ext3 (rw,acl,user_xattr)

/dev/mapper/system-home on /home type ext3 (rw,acl,user_xattr)

/dev/mapper/data-data1 on /mnt/data1 type ext3 (rw,acl,user_xattr)

/dev/mapper/data-data2 on /mnt/data2 type ext3 (rw,acl,user_xattr)

/dev/mapper/data-data3 on /mnt/data3 type ext3 (rw,acl,user_xattr)

.host:/ on /mnt/hgfs type vmhgfs (rw,ttl=5)

securityfs on /sys/kernel/security type securityfs (rw)

none on /proc/fs/vmblock/mountPoint type vmblock (rw)

 

So "system" VG uses /dev/sda2 with 708M free and /dev/sdc1 with 2.99G
free.

This is confirmed by:

 

#pvdisplay /dev/sda2

  --- Physical volume ---

  PV Name               /dev/sda2

  VG Name               system

  PV Size               6.50 GB / not usable 3.76 MB

  Allocatable           yes

  PE Size (KByte)       4096

  Total PE              1664

  Free PE               177

  Allocated PE          1487

  PV UUID               fYVfh6-wMQ2-X2Zv-AJ6R-2CgK-c97o-KfPoLz

 

# pvdisplay /dev/sdc1

  --- Physical volume ---

  PV Name               /dev/sdc1

  VG Name               system

  PV Size               3.00 GB / not usable 3.07 MB

  Allocatable           yes

  PE Size (KByte)       4096

  Total PE              766

  Free PE               766

  Allocated PE          0

  PV UUID               XUUjaG-okI9-AQbG-JLwa-oqBO-rkse-pTyg53

 

So there is a total of free 943 PE (4M each) in "system" VG. 

 

I want to extend /dev/system/root:

 

# lvextend -l+2 /dev/system/root /dev/sdc1

  Extending logical volume root to 5.01 GB

  Insufficient free space: 1282 extents needed, but only 766 available

 

Or 

 

# lvextend -l+2 /dev/system/root

  Extending logical volume root to 5.01 GB

  Insufficient free space: 1282 extents needed, but only 943 available

 

Same if I specify actual size (in MB or GB) instead if number of PEs.

 

Looks like it tries to reallocate the whole LV to the size needed
instead of just adding the needed size from VG free space

to the already existing LV.

 

What I am not understanding or missing here?

 

 

Respectfully,

 

Nikolay V. Yevik

----------------------------------------------------------------------
This e-mail, including any attached files, may contain confidential and privileged information for the sole use of the intended recipient.  Any review, use, distribution, or disclosure by others is strictly prohibited.  If you are not the intended recipient (or authorized to receive information for the intended recipient), please contact the sender by reply e-mail and delete all copies of this message.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/linux-lvm/attachments/20070614/b1fcf068/attachment.htm>


More information about the linux-lvm mailing list