[sheepdog-users] About snapshots

Ing. Luca Lazzeroni - Trend Servizi Srl luca at gvnet.it
Fri Aug 16 19:25:19 CEST 2013


Il giorno 16/ago/2013, alle ore 11:33, Liu Yuan <namei.unix at gmail.com> ha scritto:

> On Fri, Aug 16, 2013 at 11:22:17AM +0200, Ing. Luca Lazzeroni - Trend Servizi Srl wrote:
>> Il giorno 16/ago/2013, alle ore 11:03, Liu Yuan <namei.unix at gmail.com> ha scritto:
>> 
>>> On Fri, Aug 16, 2013 at 10:48:17AM +0200, Ing. Luca Lazzeroni - Trend Servizi Srl wrote:
>>>> Hi,
>>>> I'm trying to use external snapshot feature of QEMU/libVirt with sheepdog baked vdi to take VDI live backups without using sheepdog snapshots.
>>>> This is to avoid the problem of disk-space unreleased on snapshot deletion.
>>> 
>>> Maybe you can simply use qemu-img sheepdog:image local_iamge to read the image
>>> out of cluster?
>>> 
>> 
>> Yes, I could, but I need "live" backups, so I can't stop the running vm and backing up the VDI of a running VM can lead to data corruption,
>> 
>>> The release of unused objects from deleted snapshots will be supported in the
>>> up comming series of v0.7.x, I guess in about one month or two.
>>> 
>> 
>> Good, but I'm trying to find out a "tricky" solution in the meantime :-)
> 

MMh…. I've tryied with sheepdog baked images in qcow2 format…
Sheep crashed almost all the time (when I "manage" snapshots via "qemu-img snapshot") and started recovery… it's not stable enough for backup purposes..

I've also managed to use libvirt with external qemu snapshot baked on local filesystem; I can succesfully create live snapshot and vm continues to work, but… I cannot commit snapshot back to sheepdog-baked image.

Then I've tryed to create an off-line image baked by a sheepdog image and use that as a disk device for vm. Everything worked until I've tryed to commit back changes (in offline mode, of course)…

And… Voila…

qemu-img: image is read-only

So I cannot commit back changes into original sheepdog image.
By "strace"-ing the qemu-img process, it effectively ask the sheepdog backend to open the image for merging changes, but sheepdog seems to refuse opening image to qemu-img.
If instead I power on a vm using the sheepdog original image as storage device, everything works.

So I finally stated there's no reliable way to make live backups of vm without loosing storage space; since the VM I'm backing up is a Mail-Server with 200 Gb storage and sheeps works in copy-on-write mode, the snapshot size during the copy operation grows up to about 3 Gb. With a 1,4 TB of storage free  on each node and 1 copy per week, I hope "reclaim patches" will became available before filling disks :-)
The extreme solution in case of disk-space could be to restore the VM from backup into a new VDI and delete the old VDI (so the entire chain of used block would be free)… But it's a solution which requires a downtime of about 2 hours which, you know,  can be too high for this kind of service.





Ing. Luca Lazzeroni - Trend Servizi Srl
Responsabile R&D
http://www.trendservizi.it







More information about the sheepdog-users mailing list