[External] Re: openstack volume snapshots and deleting

Ratliff, John jdratlif at iu.edu
Fri Dec 6 15:22:17 UTC 2019

Creating a volume from a volume with ceph, at least in our configuration
(which I don't have any authority to change) will not create full volume,
but rather a COW volume.

However, I can use rbd flatten on the image, and then delete the snapshot.
It takes time to copy the image if they're large, which makes sense as to
why it doesn't do this by default. But that is a reasonable workaround.



-----Original Message-----
From: Sean McGinnis <sean.mcginnis at gmx.com> 
Sent: Thursday, December 5, 2019 1:59 PM
To: Ratliff, John <jdratlif at iu.edu>
Cc: openstack-discuss at lists.openstack.org
Subject: Re: [External] Re: openstack volume snapshots and deleting

On Thu, Dec 05, 2019 at 06:25:28PM +0000, Ratliff, John wrote:
> Yes, I  tried this second thing, but it doesn't work either.
> I created a new instance called test1.example.net.
> I created a volume snapshot (test1.example.net_ss1) I created a volume 
> from that snapshot (vol_from_ss) I created a volume from the volume 
> that was from the snapshot
> (vol_from_vol_from_ss)
> I deleted the vol_from_ss (this works) I deleted the snapshot (this 
> does not work)

Looking at the RBD driver, it looks like it does not actually follow the
expected clone semantics. Unless rbd_max_clone is set to 0, or the number of
clones is less than whatever that is set to, it will actually do a COW
volume on top of the snapshot.

This is a performance optimization (it doesn't have to copy all of the data
into the new volume), but is actually a bug, IMO.

You can try changing that config option and restarting services to pick that
up, then trying again.

Otherwise, it looks like that drivers clone handling will create its own
snapshot of a volume. So unless you need to keep that snapshot around for
some other reason, it looks like you should be able to just:

openstack volume create --source orig-volume new-volume

And if I follow it right, it will create a snapshot under the covers, then
use that to create the new volume.

Hopefully one of those helps.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5696 bytes
Desc: not available
URL: <http://lists.openstack.org/pipermail/openstack-discuss/attachments/20191206/866c31ae/attachment.bin>

More information about the openstack-discuss mailing list