<div dir="ltr">Thank you for catching this Andreas!  I even had the + in my notes, and I still forgot it!  Such a noob.<div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Mar 14, 2014 at 3:22 AM, andreas nastke <span dir="ltr"><<a href="mailto:nastke@gdp-group.com" target="_blank">nastke@gdp-group.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">you have 'set' the size to 229.99G<br>
<br>
-L 229.99G<br>
<br>
you want to 'increase' by 229.99G<br>
<br>
-L +229.99G<br>
<br>
<br>
Ogal Finklestein-Birl schrieb:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
Greetings gurus:<br>
<br>
I do not deal with LVM on a daily basis, and I think my note-taking of<br>
previous LVM commands needs to be polished.<br>
<br>
== Background ==<br>
Have a VM with 2 virtual disks, 30G (LVM only on 3rd partition) and 65G<br>
(all LVM) respectively.<br>
<br>
A single VG on the server: VolGroup00; four LV's: LogVol00 to 03<br>
<br>
<br>
== Problem ==<br>
The 71G /usr/local (VolGroup00-LogVol02) hit 100%<br>
<br>
I shut the server down and increased the 65G virtual disk up to 295G<br>
(+230G)  -- the thought process: take /usr/local from 71G to ~300G.<br>
<br>
Booted into single and fdisk'ed a new /dev/sdb2<br>
<br>
/dev/sda3            4298       30720    27057152   8e  Linux LVM<br>
/dev/sdb1               1        8485    68155731   83  Linux<br>
/dev/sdb2            8486       38509   241167780   83  Linux<br>
<br>
<br>
Consulted my notes and did the following:<br>
<br>
pvcreate /dev/sdb2<br>
umount -vv /usr/local<br>
vgextend VolGroup00 /dev/sdb2<br>
lvextend -L 229.99G /dev/mapper/VolGroup00-<u></u>LogVol02<br>
e2fsck -f /dev/mapper/VolGroup00-<u></u>LogVol02<br>
resize2fs /dev/mapper/VolGroup00-<u></u>LogVol02<br>
mount -vv /usr/local<br>
df -h<br>
<br>
/dev/mapper/VolGroup00-<u></u>LogVol02  227G   68G  148G  32% /usr/local<br>
<br>
My confusion came in when I saw 227G total and not 300G.<br>
My suspicion was confirmed with pvdisplay -s (and pvs)<br>
<br>
  Device "/dev/sda3" has a capacity of 0<br>
  Device "/dev/sdb1" has a capacity of 0<br>
  Device "/dev/sdb2" has a capacity of 71.83 GiB<br>
<br>
 But I am confused even further; I thought pvdisplay was referring to the<br>
physical disks, but fdisk does not show a missing 71G for /dev/sdb2<br>
<br>
pvs<br>
  PV         VG         Fmt  Attr PSize   PFree<br>
  /dev/sda3  VolGroup00 lvm2 a--   25.80g     0<br>
  /dev/sdb1  VolGroup00 lvm2 a--   65.00g     0<br>
  /dev/sdb2  VolGroup00 lvm2 a--  229.99g 71.83g<br>
<br>
vgs<br>
  VG         #PV #LV #SN Attr   VSize   VFree<br>
  VolGroup00   3   4   0 wz--n- 320.79g 71.83g<br>
<br>
<br>
== Questions ==<br>
Where did I go wrong, or did I go wrong?<br>
<br>
It obviously seems like I am missing 71G, but am I missing it and how do I<br>
go about reclaiming it?<br>
<br>
<br>
== Additional data ==<br>
pvdisplay<br>
  --- Physical volume ---<br>
  PV Name               /dev/sda3<br>
  VG Name               VolGroup00<br>
  PV Size               25.80 GiB / not usable 3.00 MiB<br>
  Allocatable           yes (but full)<br>
  PE Size               4.00 MiB<br>
  Total PE              6605<br>
  Free PE               0<br>
  Allocated PE          6605<br>
<br>
  --- Physical volume ---<br>
  PV Name               /dev/sdb1<br>
  VG Name               VolGroup00<br>
  PV Size               65.00 GiB / not usable 2.33 MiB<br>
  Allocatable           yes (but full)<br>
  PE Size               4.00 MiB<br>
  Total PE              16639<br>
  Free PE               0<br>
  Allocated PE          16639<br>
<br>
  --- Physical volume ---<br>
  PV Name               /dev/sdb2<br>
  VG Name               VolGroup00<br>
  PV Size               230.00 GiB / not usable 3.41 MiB<br>
  Allocatable           yes<br>
  PE Size               4.00 MiB<br>
  Total PE              58878<br>
  Free PE               18389<br>
  Allocated PE          40489<br>
<br>
<br>
<br>
vgdisplay -v<br>
    Finding all volume groups<br>
    Finding volume group "VolGroup00"<br>
  --- Volume group ---<br>
  VG Name               VolGroup00<br>
  System ID<br>
  Format                lvm2<br>
  Metadata Areas        3<br>
  Metadata Sequence No  9<br>
  VG Access             read/write<br>
  VG Status             resizable<br>
  MAX LV                0<br>
  Cur LV                4<br>
  Open LV               4<br>
  Max PV                0<br>
  Cur PV                3<br>
  Act PV                3<br>
  VG Size               320.79 GiB<br>
  PE Size               4.00 MiB<br>
  Total PE              82122<br>
  Alloc PE / Size       63733 / 248.96 GiB<br>
  Free  PE / Size       18389 / 71.83 GiB<br>
<br>
  --- Logical volume ---<br>
  LV Path                /dev/VolGroup00/LogVol01<br>
  LV Name                LogVol01<br>
  VG Name                VolGroup00<br>
  LV Write Access        read/write<br>
  LV Creation host, time ,<br>
  LV Status              available<br>
  # open                 1<br>
  LV Size                5.86 GiB<br>
  Current LE             1500<br>
  Segments               1<br>
  Allocation             inherit<br>
  Read ahead sectors     auto<br>
  - currently set to     256<br>
  Block device           253:1<br>
<br>
  --- Logical volume ---<br>
  LV Path                /dev/VolGroup00/LogVol00<br>
  LV Name                LogVol00<br>
  VG Name                VolGroup00<br>
  LV Write Access        read/write<br>
  LV Creation host, time ,<br>
  LV Status              available<br>
  # open                 1<br>
  LV Size                7.32 GiB<br>
  Current LE             1875<br>
  Segments               1<br>
  Allocation             inherit<br>
  Read ahead sectors     auto<br>
  - currently set to     256<br>
  Block device           253:0<br>
<br>
  --- Logical volume ---<br>
  LV Path                /dev/VolGroup00/LogVol03<br>
  LV Name                LogVol03<br>
  VG Name                VolGroup00<br>
  LV Write Access        read/write<br>
  LV Creation host, time ,<br>
  LV Status              available<br>
  # open                 1<br>
  LV Size                5.78 GiB<br>
  Current LE             1480<br>
  Segments               1<br>
  Allocation             inherit<br>
  Read ahead sectors     auto<br>
  - currently set to     256<br>
  Block device           253:2<br>
<br>
  --- Logical volume ---<br>
  LV Path                /dev/VolGroup00/LogVol02<br>
  LV Name                LogVol02<br>
  VG Name                VolGroup00<br>
  LV Write Access        read/write<br>
  LV Creation host, time ,<br>
  LV Status              available<br>
  # open                 1<br>
  LV Size                229.99 GiB<br>
  Current LE             58878<br>
  Segments               3<br>
  Allocation             inherit<br>
  Read ahead sectors     auto<br>
  - currently set to     256<br>
  Block device           253:3<br>
<br>
  --- Physical volumes ---<br>
  PV Name               /dev/sda3<br>
  PV Status             allocatable<br>
  Total PE / Free PE    6605 / 0<br>
<br>
  PV Name               /dev/sdb1<br>
  PV Status             allocatable<br>
  Total PE / Free PE    16639 / 0<br>
<br>
  PV Name               /dev/sdb2<br>
  PV Status             allocatable<br>
  Total PE / Free PE    58878 / 18389<br>
<br>
<br>
<br>
lvdisplay -m<br>
  --- Logical volume ---<br>
  LV Path                /dev/VolGroup00/LogVol01<br>
  LV Name                LogVol01<br>
  VG Name                VolGroup00<br>
  LV Write Access        read/write<br>
  LV Creation host, time ,<br>
  LV Status              available<br>
  # open                 1<br>
  LV Size                5.86 GiB<br>
  Current LE             1500<br>
  Segments               1<br>
  Allocation             inherit<br>
  Read ahead sectors     auto<br>
  - currently set to     256<br>
  Block device           253:1<br>
<br>
  --- Segments ---<br>
  Logical extent 0 to 1499:<br>
    Type                linear<br>
    Physical volume     /dev/sda3<br>
    Physical extents    0 to 1499<br>
<br>
<br>
  --- Logical volume ---<br>
  LV Path                /dev/VolGroup00/LogVol00<br>
  LV Name                LogVol00<br>
  VG Name                VolGroup00<br>
  LV Write Access        read/write<br>
  LV Creation host, time ,<br>
  LV Status              available<br>
  # open                 1<br>
  LV Size                7.32 GiB<br>
  Current LE             1875<br>
  Segments               1<br>
  Allocation             inherit<br>
  Read ahead sectors     auto<br>
  - currently set to     256<br>
  Block device           253:0<br>
<br>
  --- Segments ---<br>
  Logical extent 0 to 1874:<br>
    Type                linear<br>
    Physical volume     /dev/sda3<br>
    Physical extents    1500 to 3374<br>
<br>
<br>
  --- Logical volume ---<br>
  LV Path                /dev/VolGroup00/LogVol03<br>
  LV Name                LogVol03<br>
  VG Name                VolGroup00<br>
  LV Write Access        read/write<br>
  LV Creation host, time ,<br>
  LV Status              available<br>
  # open                 1<br>
  LV Size                5.78 GiB<br>
  Current LE             1480<br>
  Segments               1<br>
  Allocation             inherit<br>
  Read ahead sectors     auto<br>
  - currently set to     256<br>
  Block device           253:2<br>
<br>
  --- Segments ---<br>
  Logical extent 0 to 1479:<br>
    Type                linear<br>
    Physical volume     /dev/sda3<br>
    Physical extents    3375 to 4854<br>
<br>
<br>
  --- Logical volume ---<br>
  LV Path                /dev/VolGroup00/LogVol02<br>
  LV Name                LogVol02<br>
  VG Name                VolGroup00<br>
  LV Write Access        read/write<br>
  LV Creation host, time ,<br>
  LV Status              available<br>
  # open                 1<br>
  LV Size                229.99 GiB<br>
  Current LE             58878<br>
  Segments               3<br>
  Allocation             inherit<br>
  Read ahead sectors     auto<br>
  - currently set to     256<br>
  Block device           253:3<br>
<br>
  --- Segments ---<br>
  Logical extent 0 to 1749:<br>
    Type                linear<br>
    Physical volume     /dev/sda3<br>
    Physical extents    4855 to 6604<br>
<br>
  Logical extent 1750 to 18388:<br>
    Type                linear<br>
    Physical volume     /dev/sdb1<br>
    Physical extents    0 to 16638<br>
<br>
  Logical extent 18389 to 58877:<br>
    Type                linear<br>
    Physical volume     /dev/sdb2<br>
    Physical extents    0 to 40488<br>
<br>
<br>
Many thanks in advance!<br>
Ogal<br>
<br>
<br>
<br></div></div>
------------------------------<u></u>------------------------------<u></u>------------<br>
<br>
______________________________<u></u>_________________<br>
linux-lvm mailing list<br>
<a href="mailto:linux-lvm@redhat.com" target="_blank">linux-lvm@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/linux-lvm" target="_blank">https://www.redhat.com/<u></u>mailman/listinfo/linux-lvm</a><br>
read the LVM HOW-TO at <a href="http://tldp.org/HOWTO/LVM-HOWTO/" target="_blank">http://tldp.org/HOWTO/LVM-<u></u>HOWTO/</a><br>
</blockquote>
<br>
______________________________<u></u>_________________<br>
linux-lvm mailing list<br>
<a href="mailto:linux-lvm@redhat.com" target="_blank">linux-lvm@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/linux-lvm" target="_blank">https://www.redhat.com/<u></u>mailman/listinfo/linux-lvm</a><br>
read the LVM HOW-TO at <a href="http://tldp.org/HOWTO/LVM-HOWTO/" target="_blank">http://tldp.org/HOWTO/LVM-<u></u>HOWTO/</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Ogal Finklestein aka S.A. Birl<br><br>
</div>