Ask Your Question

How to resize an instance residing on a block storage volume?

asked 2014-05-22 09:47:09 -0500

wng gravatar image


I'm using Icehouse and all tricks I've tried to resize (extend) a volume-based instance have failed. The simplest way ('resize' from the dashboard) claims to work, the new flavor is listed but the size of the physical device as reported by fdisk (I'n not talking partitions) is the same.


edit retag flag offensive close merge delete


You can attach volume to instance and manage like here

dbaxps gravatar imagedbaxps ( 2014-05-22 10:19:22 -0500 )edit

What seems to work is: stop instance, and then use the CLI to reset the volume's state from 'in-use' to 'available', extend it, reset its state back to 'in-use', then reboot the block storage server, start the instance and there it is. Of course, this doesn't qualify as a procedure since you cannot afford to reboot a server every time you need to extend; the thing is restarting individual services (openstack-cinder-volume, tgtd, lvm2-monitor) was not enough for the instance to get resized - perhaps the ORDER needs to be a different one... in any case restarting tgtd is probably not applicable either because it would drop other iSCSI connections...

wng gravatar imagewng ( 2014-05-23 02:42:38 -0500 )edit

i dont need to reboot block storage server just need to start instance then the boot volume becomes new size

gray13 gravatar imagegray13 ( 2016-11-15 05:46:23 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2014-05-23 06:50:33 -0500

wng gravatar image

OK, I've found a solution - a bit tedious, but usable.

The problem was that an instance hosted completely on an iSCSI volume (boot-from-image-create-new-volume) could not be properly resized using the dashboard: the new flavor was shown BUT the storage was the same (fdisk on the instance, lvdisplay on the block storage server).

Here's what worked for me:

  1. stop the instance

  2. on the controller CLI

  3. "cinder list" will show you the id of the volume you're interested in, note the state is 'in-use'
  4. cinder reset-state --state available your-volume-ID
  5. cinder extend your-volume-ID new-size-in-GB
  6. cinder reset-state --state in-use your-volume-ID

  7. on the block storage

  8. "lvdisplay" should now show the new volume size
  9. "tgtadm --lld iscsi --mode target --op show" will still show the OLD volume size for LUN 1
  10. note "Target xx: iqn....." in the output of the previous command; xx is your target ID (tid) which you'll need below
  11. "tgt-admin --update tid=xx -v -f" will do a re-scan
  12. "tgtadm --lld iscsi --mode target --op show" will now show the NEW (increased) size

  13. resize the instance to a new flavor, one that would have the NEW storage size (because right now the instance will be listed with the flavor's disk size, not the real one)

  14. you can now start the instance; the partition will be resized automatically

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools



Asked: 2014-05-22 09:47:09 -0500

Seen: 8,032 times

Last updated: May 23 '14