[Openstack] snapshot question

Isaku Yamahata yamahata at valinux.co.jp
Tue Jun 28 10:42:09 UTC 2011


On Tue, Jun 28, 2011 at 01:07:02AM +0900, masumotok at nttdata.co.jp wrote:
> > -Kei, as to Q2 in your original message...I have absolutely no idea why the
> > image is bigger, but hopefully one of these days I'll get time to get back
> > into the libvirt code and help you out! :)
> 
> This is another essential issue here. I just wrote "when I call snapshot() once, what's happen original image" at the previous e-mail, but when we try to call snapshot() over and over again, original disk image is bigger and bigger. I have no idea how eventually bigger disk image is. I think the reason why image size is bigger is that snapshot is included into original image ....... Anyway, I am waiting you get back :).

Although I'm not familiar with libvirt and not an export of qemu block
layer.  Qemu savevm (I'm assuming libvirt maps it to qemu savevm)
takes snapshot of not only disk image, but also guest RAM. Thus guest
can re-execute at the point of snapshot.
The difference is guest RAM size, I think.

Regarding to freeing snapshots of qcow2, major file systems don't
provide a way to free once-allocated-blocks except truncate.
So qcow2 doesn't have a way to free unnecessary blocks.
You may need btrfs or modern advanced file systems that supports
punching hole and discard.
-- 
yamahata




More information about the Openstack mailing list