Ask Your Question

How to resize a volume group on cinder? [closed]

asked 2013-05-29 03:12:00 -0500

Ph4nToM gravatar image

updated 2013-05-29 17:44:46 -0500

smaffulli gravatar image

Hello, I commit a little mistake when I installer cinder. I'm not a specialist with volumes.

I create a volume which is called cinder-volumes

truncate --size 5G ~/cinder-volumes

But I would like a volume of 20Go.

I tried:

truncate -s +15G cinder-volumes

image description

The size of cinder-volumes is correctly updated, but the size of my partition lvm has not change. image description

My loop device is /dev/loop0

image description


image description

But when I look the size of my volume group, I've no change:

image description

To create my volume group, I follow this procedure:

image description

So I don't no if I have to resize my loop device.. it's strange.. have you an idea?

edit retag flag offensive reopen merge delete

Closed for the following reason too localized by Ph4nToM
close date 2013-06-13 03:50:54.794270

1 answer

Sort by ยป oldest newest most voted

answered 2013-05-29 06:08:51 -0500

darragh-oreilly gravatar image

updated 2013-05-29 06:59:55 -0500

So this file is backing a loop device that LVM is using as a PV. The loop device is probably /dev/loop0 - check with losetup -a

So to expand the PV into the new space you will need to close and reopen the file and then run pvresize:

# stop any instances using volumes and service cinder-volume first
losetup -d /dev/loop0
losetup -fv /root/cinder-volumes
pvresize /dev/loop0
edit flag offensive delete link more


I answered above your suggestion, the size of the volume group did not changed. Maybe I should use vgextend.. But I don't know how...

Ph4nToM gravatar imagePh4nToM ( 2013-05-29 06:18:00 -0500 )edit

yeah - resize probably does not see the new size of the file and so doesn't expand. I have updated the answer.

darragh-oreilly gravatar imagedarragh-oreilly ( 2013-05-29 06:36:29 -0500 )edit

Thanks a lot! It's work. Thanks for your help!!

Ph4nToM gravatar imagePh4nToM ( 2013-05-29 06:37:42 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2013-05-29 03:12:00 -0500

Seen: 5,012 times

Last updated: May 29 '13