[openstack-dev] [Nova][BluePrint Register] Shrink the volume when file in the instance was deleted.

John Garbutt john at johngarbutt.com
Thu Jan 2 14:54:13 UTC 2014


On 25 December 2013 05:14, Qixiaozhen <qixiaozhen at huawei.com> wrote:
> Hi,all
>
> A blueprint is registered that is about shrinking the volume in thin
> provision.

Have you got the link?

> Thin provision means allocating the disk space once the instance writes the
> data on the area of volume in the first time.
>
> However, if the files in the instance were deleted, thin provision could not
> deal with this situation. The space that was allocated by the files could
> not be released.
>
> So it is necessary to shrink the volume when the files are deleted in the
> instance.

In this case the user will probably need to zero out the free space of
your filesystem too, in some cases, unless nova does that for them,
which sounds a bit dodgy.

> The operation of shrinking can be manually executed by the user with the web
> portal or CLI command or periodically in the background.

I wondered about an "optimise disk" call.

A few thoughts:
* I am not sure it can always be done "online" for all drivers, may
need an offline mode
* Similar operations have ways of confirming and reverting to protect
against dataloss
* Ideally keep all operations on the virtual disk, and no operations
on its content
* With chains of disks, you may want to simplify the chain too (where
it makes sense)

John



More information about the OpenStack-dev mailing list