[PLUG] problems creating logical volume (LVM)

Jason LaPier jason.lapier at gmail.com
Wed Nov 7 10:26:46 PST 2012


Answering my own question here: I was failing to change the number of
stripes form 2 to 5. This works:

lvcreate -l100%VG -n ebs_lv -i5 ebs_vg -I256


On Wed, Nov 7, 2012 at 9:53 AM, Jason LaPier <jason.lapier at gmail.com> wrote:

> First off -
> Bummed that I missed the PLUG talk on LVM - if I'd realized I was going to
> need it so soon, I would have gone out of my way to attend! In any case,
> Brian Martin's post [1] on the subject is a great read.
>
> So I'm trying to create a logical volume in a volume group that stripes
> across a few of Amazon's EBS volumes. When I try this with a couple 1 GB
> volumes, it works fine. When I try this with five 1 TB volumes, I'm seeing
> a strange error.
>
> $ vgcreate ebs_vg /dev/sdp1 /dev/sdp2 /dev/sdp3 /dev/sdp4 /dev/sdp5
> $ vgdisplay /dev/ebs_vg
>   --- Volume group ---
>   VG Name               ebs_vg
>   System ID
>   Format                lvm2
>   Metadata Areas        5
>   Metadata Sequence No  1
>   VG Access             read/write
>   VG Status             resizable
>   MAX LV                0
>   Cur LV                0
>   Open LV               0
>   Max PV                0
>   Cur PV                5
>   Act PV                5
>   VG Size               4.88 TiB
>   PE Size               4.00 MiB
>   Total PE              1279995
>   Alloc PE / Size       0 / 0
>   Free  PE / Size       1279995 / 4.88 TiB
> $ lvcreate -l 100%VG -n ebs_lv -i2 ebs_vg -I256
>   Rounding size (1279995 extents) up to stripe boundary size (1279996
> extents)
>   Volume group "ebs_vg" has insufficient free space (1279995 extents):
> 1279996 required.
>
>
> I'm expecting it to be smart enough to make it the right size by using the
> "100%" for the logical extents. If I try to manually set this to the number
> it seems to want, I still get the error:
>
> $ lvcreate -l 1279995 -n ebs_lv -i2 ebs_vg -I256
>   Rounding size (1279995 extents) up to stripe boundary size (1279996
> extents)
>   Volume group "ebs_vg" has insufficient free space (1279995 extents):
> 1279996 required.
>
> Anyone see anything glaring that I'm missing?
>
> Thanks!
>
> - Jason L.
>



More information about the PLUG mailing list