All of lore.kernel.org
 help / color / mirror / Atom feed
From: andreas nastke <nastke@gdp-group.com>
To: LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] Expanded virtual disk for LVM: missing space? or free	space? or no space?
Date: Fri, 14 Mar 2014 08:22:02 +0100	[thread overview]
Message-ID: <5322AE1A.4010505@gdp-group.com> (raw)
In-Reply-To: <CADPXwZP_wSC_C5ZFXR0igwbVqULKPJ2PYhpU_eH2vgNs5MqTWw@mail.gmail.com>

you have 'set' the size to 229.99G

-L 229.99G

you want to 'increase' by 229.99G

-L +229.99G


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

  reply	other threads:[~2014-03-14  7:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-13 21:58 [linux-lvm] Expanded virtual disk for LVM: missing space? or free space? or no space? Ogal Finklestein-Birl
2014-03-14  7:22 ` andreas nastke [this message]
2014-03-14 12:05   ` Ogal Finklestein-Birl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5322AE1A.4010505@gdp-group.com \
    --to=nastke@gdp-group.com \
    --cc=linux-lvm@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.