[Openstack] snapshot question

masumotok at nttdata.co.jp masumotok at nttdata.co.jp
Wed Jun 29 05:36:08 UTC 2011


Hello, 
Thanks for your opinion!

> > > -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.
Savevm() is good idea. It is currently used as suspend() in libvirt driver, since calling savevm() terminates instances. (IMO, this behavior is matched as the concept of suspend). Regarding to snapshotting instances(not image_save), if nobody cares that instance is terminated after snapshotting(caution: I mean snapshotting, not saving image), I feel savevm() might be a solution.

> 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.
Btrfs sounds good. I'm gonna check it.

Kei


More information about the Openstack mailing list