New Question

Cinder SMB backend missing size correction of images

asked 2016-02-18 18:13:42 +0300

tomcsanyid gravatar image

Currently the Cinder SMB backend only copies the image file from Glance onto the SMB share and then signals the hypervisor that the image is ready, however there is a major step missing from this flow: re-sizing (extending) the image according to its flavor. Basically the VHDX's parameter 'maximum size' needs to be adjusted to the value that's coming from the controller (? this is just an assumption). Example: We have an Ubuntu image in Glance with the size of 2.3 GB. If the user selects a flavor that has a root disk size of 5 GB then he/she should be able to see 5 GB of disk in Linux, however this is not the case, 2.3GB is the reported size. Note that this is totally independent of the VHDX being dynamically expanding type. Please commit a fix to Cinder-SMB as soon as possible.

Cheers, Domi

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted

answered 2016-02-18 18:58:53 +0300

alexpilotti gravatar image

updated 2016-02-19 19:05:13 +0300

Hi Domi,

You are referring to Cinder, so I'm assuming that you are doing a boot from volume instead of using a local disk. In that case the flavor does not apply to the size of the volume. The Cinder volume VHD(X) gets resized to the requested volume size, which in turn is attached to the Nova VM.

What is not clear is the 2.3 GB size. Volume sizes are multiples of 1GB, so the VHDX size should be e.g. 3GB. Are you sure that the reported size does not refer to the partition inside the VHDX and not the VHDX itself?


The master branch is not affected, while on Liberty, the recently added Cinder caching patch introduced a minor regression that affected resizing. The fix is trivial and has been committed to 7.0.0 / 7.0.1 release branches:

Thanks for signaling this issue,


edit flag offensive delete link more


Hi Alessandro, the 2.3 GB is the reported partition size inside the VM using Linux. We are indeed doing a boot from volume. "The Cinder volume VHD(X) gets resized to the requested volume size, which in turn is attached to the Nova VM." -> this is exactly what should happen, but it doesn't apparently

tomcsanyid gravatar imagetomcsanyid ( 2016-02-18 22:12:34 +0300 )edit

The partition inside the Linux VM needs to be extended by cloud-init (grow_root). Cinder's job is to resize the disk, not its content.

alexpilotti gravatar imagealexpilotti ( 2016-02-18 22:16:23 +0300 )edit

Indeed, but the disk isn't resize, that's the problem. Let me show you how the disk of a VM looks like using Get-VHD in PowerShell: do you see the problem? The Size parameter of it isn't modified to match the volume size requested

tomcsanyid gravatar imagetomcsanyid ( 2016-02-18 22:31:12 +0300 )edit

Ok, that's why I was asking if it was the internal partition or the actual VHDX. This is definitely not good. :) We tested and everything looks good in our test environment, can you please paste a script with the sequence of CLI steps to reproduce it? (cinder create, etc)

alexpilotti gravatar imagealexpilotti ( 2016-02-19 01:44:08 +0300 )edit

We are not using cinder create directly, but Horizon to create a machine, so in CLI that would be nova boot like this: nova boot --nic net-id=net_id --flavor our_flavor --block-device source=image,id=3f74e0f8-0e2c-499f-8836-bcae029c8af2,dest=volume,size=10,shutdown=PRESERVE,bootindex=0 test

tomcsanyid gravatar imagetomcsanyid ( 2016-02-19 12:07:34 +0300 )edit

Your Answer

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

Add Answer

Question Tools



Asked: 2016-02-18 18:13:42 +0300

Seen: 843 times

Last updated: Feb 19 '16