<div dir="ltr"><div>Sorry, Edward. It's been so late. Mails from list growed day by day and I didn't know how to handle it... until today I finally found a perfect way to organise all those mail (ha, using google "Lable" and "Filter") and I found your message.<br>
<br></div>It has been done, I have added a new API for cinder-api and cinder-volume myself, to roll a volume back to a snapshot. cinder-backup is still in my consideration and I know that "bootable volume" bug too, just don't know there is a patch.<br>
<br>But for now I am dispatched to some kind of Load Blancing job (digging in L3 agent and LBaaS agent and some other things), it may be a long while before I come back to Cinder and Ceph things.<br></div><div class="gmail_extra">
<br><br><div class="gmail_quote">2014-01-23 20:52 GMT+08:00 Edward Hope-Morley <span dir="ltr"><<a href="mailto:edward.hope-morley@canonical.com" target="_blank">edward.hope-morley@canonical.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Changqian, see comments inline.<br>
<div><div class="h5"><br>
On 02/01/14 07:38, Changqian Zuo wrote:<br>
> Hi,<br>
><br>
> First time mailing to a list.<br>
><br>
> I'm trying to add a RBD volume snapshot rollback operation to Cinder.<br>
> I've just got through WSGI part of Cinder API code and have read some<br>
> pieces of Cinder Volume. Now there is not much time for me to complete<br>
> the whole code base (with Ceph driver) very carefully, I need some<br>
> advice.<br>
><br>
> Is adding a Extension Controller the most suitable way to do this? How<br>
> to deal with snapshot and volume state transformation, would it affect<br>
> other part of Cinder codes? What parts of Cinder codes I should pay<br>
> special attention?<br>
><br>
> Many thanks.<br>
><br>
> Some background information:<br>
><br>
> We're planning to use Cinder bootable volume (Ceph RBD as backend) as<br>
> instance root disk in my company's OpenStack environment. Creating a<br>
> volume snapshot from image, and then use this snapshot to spawn instance<br>
> root volumes.<br>
><br>
> To backup volume state, I've thought of Cinder-Backup service (still<br>
> need to add a in-use backup for Cinder), but it takes too much space (a<br>
> 80G volume would take at least 248G space for base backup image with x3<br>
> Ceph replication ratio). The other way is volume snapshot, but in this<br>
> case when restoring volume data, I have to create a new volume from<br>
> snapshot, destroy the original instance (there's no API to change a<br>
> instance's bootable volume), and create a new instance from new volume.<br>
</div></div>If the you use the ceph backup driver with cinder backup (added<br>
in Havana), it is capable of doing incremental/differential backups<br>
so it only actually stores the data that is in use so e.g. if you have<br>
a 80G volume with 1G of actual data, the backup volume will only be<br>
1G on disk (x number of replicas).<br>
<br>
You can then do a 'restore' which, again, will only transfer the actual<br>
data.<br>
<br>
Unfortunately, there is a bug in cinder-backup (all drivers) whereby<br>
bootable<br>
volumes cannot be restored, or more specifically volumes cannot be<br>
restored as<br>
bootable. There is currently a patch in progress to resolve this which we<br>
hope will land during the I cycle - <a href="https://review.openstack.org/#/c/51900/" target="_blank">https://review.openstack.org/#/c/51900/</a><br>
<br>
hope that helps,<br>
<br>
Ed.<br>
<div class="im HOEnZb">> The old volume can not be removed, for a snapshot is referencing to it<br>
> (the snapshot must be kept). If I do this again and again, there would<br>
> be many snapshots referencing to many different volumes, and I have to<br>
> keep these volumes (not used elsewhere), which is a mess.<br>
><br>
><br>
><br>
</div><div class="HOEnZb"><div class="h5">> _______________________________________________<br>
> Mailing list: <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack</a><br>
> Post to     : <a href="mailto:openstack@lists.openstack.org">openstack@lists.openstack.org</a><br>
> Unsubscribe : <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack</a><br>
<br>
</div></div></blockquote></div><br></div>