Ask Your Question

how to increase volume capacity [closed]

asked 2014-11-15 07:26:11 -0500

Amitabh Sinha gravatar image

I have Havana multi-node setup ( 1. controller (with 320 GB LVM) 2. neutron 3. compute ). But i am not able to create volume more than 1 gb. How I can increase the capacity of volume ?

These are the following steps I followed

dd if=/dev/zero of=cinder-volumes bs=1 count=0 seek=2G losetup /dev/loop2 cinder-volumes fdisk /dev/loop2 #Type in the followings: n p 1 ENTER ENTER t 8e w

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Amitabh Sinha
close date 2014-11-24 21:53:26.804153

2 answers

Sort by ยป oldest newest most voted

answered 2014-11-16 14:23:25 -0500

lorrie gravatar image

1) Use this command "vgs" to check your default stack volume. In my case, by default I only get 10G for my "stack-volumes-lvmdriver-1" group.

In your case it is probably just 1 G, that's the reason that why you can only create 1 G volume for your instance.

2) If you want to use a loopback device to add as a volume, follow this link:

Be sure to use your own group (In my case it is "stack-volumes-lvmdriver-1" as I get it from "vgs" command).

3) if you are using an external device, you can skip the "pvcreate /dev/loop3" procedure.

edit flag offensive delete link more

answered 2014-11-15 20:20:41 -0500

I didn't understand why you trying to increase cinder-volumes size. That is a Volume Group(vg) not physical Volume (pv). You can do the following:

  1. Create a new backing image with required size: dd if=/dev/zero of=MyImage.img bs=1G count=4
  2. Create a loopback device with the above image: losetup /dev/loop1 MyImage.img # for Example I am talking loop1
  3. Then create physical volume on that loop back device pvcreate /dev/loop1
  4. Now create a volume group "cinder-volumes" vgcreate "cinder-volumes" /dev/loop1 # Delete the volume group with the same name using "vgremove"

Now you should be able to create your volume of 1GB.

edit flag offensive delete link more


@TechPatron I am able to craete 1 gb of volume. My question is how I can use or map 320 gb of lvm for creating volume?

Amitabh Sinha gravatar imageAmitabh Sinha ( 2014-11-17 02:04:10 -0500 )edit

Okay got your point, let us suppose your 320 GB LVM volume mount point is "/dev/sdb":

pvcreate /dev/sdb vgcreate "cinder-volumes" /dev/sdb

And then restart the cinder-volume service.

If you want to add it as a another device: vgcreate "cinder-volumes1" /dev/sdb

Change the cinder.conf accordingly

TechPatron gravatar imageTechPatron ( 2014-11-17 06:02:38 -0500 )edit

@thanks Techpatron :-)

Amitabh Sinha gravatar imageAmitabh Sinha ( 2014-11-17 22:41:02 -0500 )edit

thank you it's working well

golfreeze gravatar imagegolfreeze ( 2017-05-09 01:17:22 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2014-11-15 07:26:11 -0500

Seen: 4,293 times

Last updated: Nov 16 '14