Re: libvirt internal snapshots incremental or not.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/13/2014 04:39 AM, Sijo Jose wrote:
> Hi,
> Is libvirt internal snapshots are incremental or not..?
> Consider the example,
> There are 3 snapshots, created respectively snp1 first,
> after some changes snp2, again after some changes snp3.
> 
> Question,
> 1.Is there any dependency that is ...snp2 depended upon snp1 and snp3
> depended upon snp2 OR snp1 OR both
> 
> 2.So if I remove snp2, does it makes snp3 invalid, OR can I use snp3
> further.

The snapshots are independent.  Deleting one does not invalidate the other.

In more detail, internal snapshots are implemented by ref-counting in
the qcow2 file format.  Prior to a snapshot, all allocated clusters have
a ref-count of 1.  When you create a snapshot, all current clusters have
their ref-count incremented.  When you write to a cluster, if the
ref-count is larger than 1, it does a copy-on-write operation to put the
write in a new cluster (the COW part of qcow2), and decrements the
ref-count of the old cluster.  When reverting to a snapshot, you are
just changing which set of clusters is current.  When deleting a
snapshot, you decrement the ref-count of all clusters pointed to by the
snapshot, possibly freeing memory for clusters that drop to 0 ref-count.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]