Ask Your Question
0

Resizing instances is done without resizing the disk

asked 2019-10-30 01:16:32 -0500

mohammad gravatar image

Resizing instances is done without resizing the disk. Even the RAM and CPU change, but the disk doesn't resize.

I did the installation both manually and using packstack. I use CentOS Linux release 7.6.1810 (Core) and openstack Rocky 3.16.2 . AND I used both lvm and ceph as a storage (Each time separately)

But this problem still exists and I have "no errors" in the logs. Can anyone help me ?

edit retag flag offensive close merge delete

Comments

Does the new flavor offer a larger disk? Usually, you'll have to resize the physical volume inside the instance before you can use the additional space. So after resize the underlying disk (e.g. /dev/vda) should be larger (check with lsblk), then you need to extend partitions (fdisk) ...

eblock gravatar imageeblock ( 2019-10-30 03:45:05 -0500 )edit

and only after that you can run pvresize and lvresize. If this doesn't apply to your case and the underlying disk really stays the same you'll have to provide more details and turn on debug logs for nova.

eblock gravatar imageeblock ( 2019-10-30 03:47:13 -0500 )edit

Yes the new flavor offer a larger disk. i turn on debug logs for nova . but i have no error.

The Qcow2 disk, does not resize. Evan i create image from instance and launch it with new flavor,But again The disk, does not resize. I think this is a bug :(

mohammad gravatar imagemohammad ( 2019-10-30 04:24:15 -0500 )edit

I use both ubuntu and centos. Also lvresize operation is ok.

mohammad gravatar imagemohammad ( 2019-11-14 01:47:58 -0500 )edit

I don't think it's a bug. There are several options to resize disks during instance creation, e.g. using cloud-init.

eblock gravatar imageeblock ( 2019-12-04 04:02:52 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2020-05-08 05:53:16 -0500

Fenuks gravatar image

I can confirm this for Openstack Train 20.1.0 using Ceph as storage under Cinder (but I don't think problem is in Ceph).

It looks like this:

  1. Crate an instance with flavor c1m2.small (8G root volume, 0G ephemeral). Instance (in my case Debian10) is created with 1vCPU, 2G RAM and 8G volume with single partition of ext4.
  2. Resize the instance to c2m4.medium (16G root volume, 0G ephemeral), wait for it to be resized and confirm. Instance is now 2vCPU, 4G RAM and still 8G volume with single partition of ext4. No errors in logs.
  3. Use cinder extend <instance volume id> 16 without shutting down the instance. Volume is resized properly to 16GB, instance would be active throughout. Note that in Horizon there is no option to extend attached volume, only CLI works.
  4. In instance volume now reads as 16G, but partition is still 8G, not occupying entire space. That is to be expected, cinder extend does not resize the partitions.
  5. In instance I can now extend the partition and filesystem. For example, using parted /dev/vda resizepart 1 -1 and resize2fs /dev/vda.

I expected flavor change would also extend the volume, update metadata (?) and make cloud-init extend the partition and filesystem on it, and not do this manually.

It looks like openstack (nova?) is not giving a command to extend the root volume when it changes the flavor. Although creating new instances respects flavor root volume size and creates it appropriately.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2019-10-30 00:12:32 -0500

Seen: 166 times

Last updated: May 08