How to Manually Extend Cinder Volumes Group in OpenStack

Sep 14, 2015 Cloud Computing, Storage

openstack
Cinder Volumes group is a block storage based on LVM (Logical Volume Manager) volume group, usually situated in Controller node in OpenStack cloud. It provides persistent block storage for runtime instances.

During typical packstack installation Cinder Volumes group size is determined in answer file (insert file) by following parameter:

CONFIG_CINDER_VOLUMES_SIZE=20G

If the Cinder Volumes group size we chose upon packstack installation turns out to be insufficient to create new volumes, we can attach additional physical volume on Controller node to the existing Cinder Volumes group and extend it with the new physical volume to gain more space.

Steps:

1. Verify existing Cinder Volumes group:

[root@controller ~]# vgdisplay cinder-volumes
  --- Volume group ---
  VG Name               cinder-volumes
  System ID             
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  5
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                2
  Open LV               1
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               20,60 GiB
  PE Size               4,00 MiB
  Total PE              5273
  Alloc PE / Size       4096 / 16,00 GiB
  Free  PE / Size       1177 / 4,60 GiB
  VG UUID               xvGx4h-ROGb-lMGh-u6nl-pciY-lI9O-OmDIig
  
[root@controller ~]# pvdisplay
  --- Physical volume ---
  PV Name               /dev/sdb
  VG Name               cinder-volumes
  PV Size               20,60 GiB / not usable 2,00 MiB
  Allocatable           yes 
  PE Size               4,00 MiB
  Total PE              5273
  Free PE               5017
  Allocated PE          256
  PV UUID               gJYlN2-NkIK-A0vT-pmD7-6dDn-6i7Z-jkKcss
   

Above example shows 4,6GB of free space (free physical extents) in cinder-volumes group based on /dev/sdb physical device.

2. Attach additional volume to existing Cinder Volumes group

Let’s add spare physical volume /dev/sdc to existing cinder-volumes group to extend it’s capacity:

[root@controller ~]# pvcreate /dev/sdc
  Physical volume "/dev/sdc" successfully created
[root@controller ~]# vgextend cinder-volumes /dev/sdc
  Volume group "cinder-volumes" successfully extended
[root@controller ~]# vgdisplay cinder-volumes
  --- Volume group ---
  VG Name               cinder-volumes
  System ID             
  Format                lvm2
  Metadata Areas        2
  Metadata Sequence No  6
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                2
  Open LV               1
  Max PV                0
  Cur PV                2
  Act PV                2
  VG Size               40,59 GiB
  PE Size               4,00 MiB
  Total PE              10392
  Alloc PE / Size       4096 / 16,00 GiB
  Free  PE / Size       6296 / 24,59 GiB
  VG UUID               xvGx4h-ROGb-lMGh-u6nl-pciY-lI9O-OmDIig

[root@controller ~]# pvdisplay
  --- Physical volume ---
  PV Name               /dev/sdb
  VG Name               cinder-volumes
  PV Size               20,60 GiB / not usable 2,00 MiB
  Allocatable           yes 
  PE Size               4,00 MiB
  Total PE              5273
  Free PE               1177
  Allocated PE          4096
  PV UUID               gJYlN2-NkIK-A0vT-pmD7-6dDn-6i7Z-jkKcss
   
  --- Physical volume ---
  PV Name               /dev/sdc
  VG Name               cinder-volumes
  PV Size               20,00 GiB / not usable 4,00 MiB
  Allocatable           yes 
  PE Size               4,00 MiB
  Total PE              5119
  Free PE               5119
  Allocated PE          0
  PV UUID               O2zS89-quZB-7lAM-BxK1-SflU-CGcK-vvayFM
   

Above example shows that cinder-volumes group was extended to 24,59GB (free physical extents) by adding /dev/sdc physical volume.

One thought on “How to Manually Extend Cinder Volumes Group in OpenStack”
  1. Hi Grzegorz, I followed your instruction of openstack deployment alot and I always found very helpful. I am not an expert in storage. Is there any slides of EMC SCALEIO deployment in openstack environent. This sacleio software is very hot in these days. It will be great if you give your prcsiuos time on it and will be helpfull for me and other learners as well.

    Thanks,
    Khan

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.