Gionatan Danti
2018-May-02 12:45 UTC
Re: [libvirt-users] Create qcow2 v3 volumes via libvirt
On 01/05/2018 22:49, Gionatan Danti wrote:> Ok, I think I'll continue to use RAW images + filesystem snapshots + > external snapshot when required. > It is unfortunate that we have no GUI to manage external snapshots. I > even remember that external snapshot remove was not supported - I had to > use the --metadata flag and a plain "rm" to remove them (or using > --no-metadata in the first place)[1]. Does it remain the current behavior? > > Thanks. > > [1] > https://www.redhat.com/archives/libvirt-users/2015-September/msg00037.htmlAny hope to get virsh external snapshot creation/deletion fixed? Or, even better, to have virt-manager support for external snapshots? Thanks. -- Danti Gionatan Supporto Tecnico Assyoma S.r.l. - www.assyoma.it email: g.danti@assyoma.it - info@assyoma.it GPG public key ID: FF5F32A8
Kashyap Chamarthy
2018-May-04 08:26 UTC
Re: [libvirt-users] Create qcow2 v3 volumes via libvirt
On Wed, May 02, 2018 at 02:45:05PM +0200, Gionatan Danti wrote:> On 01/05/2018 22:49, Gionatan Danti wrote: > > Ok, I think I'll continue to use RAW images + filesystem snapshots + > > external snapshot when required. > > It is unfortunate that we have no GUI to manage external snapshots. I > > even remember that external snapshot remove was not supported - I had to > > use the --metadata flag and a plain "rm" to remove them (or using > > --no-metadata in the first place)[1]. Does it remain the current > > behavior?Yes, you still have to clean up external snapshot metadata manually, as the link below indicates. Deleting external snapshots is a non-trivial problem. For example, if you have a disk image chain like: [A] <-- [B] <-- [C] <-- [D] Now if you no longer need image [B], what is the most efficient way to get rid of it? Three possibilities: - Merge [B] into [A], and rewrite the backing chain of [C] to point to [A]. Now can you discard image [B]. - Merge [A] into [B], call the new image [AB]. Now you can discard [A]. - Merge [B] into [C], and rewrite the backing chain of [C] to point to [A]. Now you can discard image [B]. It depends on how large each of the disk images are, and based on the size, merge / coalesce them accordingly, to arrive at the quickest solution. Note that existing commands (`virsh blockpull` and `virsh blockcommit`, which is relatively faster) will allow you handle it manually or script it -- which many people already do it. A couple of references (that are also easily scriptable): http://wiki.libvirt.org/page/Live-merge-an-entire-disk-image-chain-including-current-active-disk https://wiki.libvirt.org/page/Live-disk-backup-with-active-blockcommit> > [1] > > https://www.redhat.com/archives/libvirt-users/2015-September/msg00037.html > > Any hope to get virsh external snapshot creation/deletion fixed?I don't see any problem creation external snapshots (or more correctly: "overlays"). Deletion of external snapshots involves a bit more work, but it is scriptable as well. [...] -- /kashyap
Gionatan Danti
2018-May-04 13:31 UTC
Re: [libvirt-users] Create qcow2 v3 volumes via libvirt
On 04/05/2018 10:26, Kashyap Chamarthy wrote:> Yes, you still have to clean up external snapshot metadata manually, as > the link below indicates. Deleting external snapshots is a non-trivial > problem. For example, if you have a disk image chain like: > > [A] <-- [B] <-- [C] <-- [D] > > Now if you no longer need image [B], what is the most efficient way to > get rid of it? Three possibilities: > > - Merge [B] into [A], and rewrite the backing chain of [C] > to point to [A]. Now can you discard image [B]. > - Merge [A] into [B], call the new image [AB]. Now you can > discard [A]. > - Merge [B] into [C], and rewrite the backing chain of [C] to point to > [A]. Now you can discard image [B]. > > It depends on how large each of the disk images are, and based on the > size, merge / coalesce them accordingly, to arrive at the quickest > solution.True.> > Note that existing commands (`virsh blockpull` and `virsh blockcommit`, > which is relatively faster) will allow you handle it manually or script > it -- which many people already do it. > > A couple of references (that are also easily scriptable): > > http://wiki.libvirt.org/page/Live-merge-an-entire-disk-image-chain-including-current-active-disk > https://wiki.libvirt.org/page/Live-disk-backup-with-active-blockcommit > >>> [1] >>> https://www.redhat.com/archives/libvirt-users/2015-September/msg00037.html >> >> Any hope to get virsh external snapshot creation/deletion fixed? > > I don't see any problem creation external snapshots (or more correctly: > "overlays"). Deletion of external snapshots involves a bit more work, > but it is scriptable as well. >Reading old mailing list posts, I was under impression that some work was put to automatically and trasparently issue the best blockpull/blockcommit command. If not - fair enough ;) Thanks. -- Danti Gionatan Supporto Tecnico Assyoma S.r.l. - www.assyoma.it email: g.danti@assyoma.it - info@assyoma.it GPG public key ID: FF5F32A8