Hi all, i use XCP 0.5 with a NFS storage repository and normally i do daily snapshots from all VMs i have, as follow: 1) create snapshot 2) export snapshot to file 3) delete snapshot One day I get the VM error "Snapshot chain is too long". I notice however that this appears to only VM''s with more than 1 attached virtual disk. In my case I have a couple VM''s with 2 disks, and there were many orphaned copies of only 1 of the 2 disks. From OpenXenManager is not possible to delete these snapshots.. I read a problem like this on Xencenter forum http://forums.citrix.com/thread.jspa?threadID=261023 <http://forums.citrix.com/thread.jspa?threadID=261023&tstart=0> &tstart=0 and the solution is http://support.citrix.com/article/CTX123400 Does someone know how to fix this bug on XCP 0.5 ? Regards, Simone Cariani _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api
Hi Simone, Whenever you create a snapshot disk it will increase the length of the "snapshot chain" by 1 and there is a hard length limit of 30. However whenever you delete a snapshot disk the background "coalesce" process should be able to reduce the "snapshot chain" length again. So your procedure (create snapshot; export snapshot; delete snapshot) ought to work fine. This is in fact the same process followed by the "VM protection and recovery" feature which will be part of XCP 1.0. The problem you linked to is related but not quite the same: it refers to a limitation within the "coalesce" process where it cannot reduce a chain of length 2 into a chain of length 1. The only reason people worry about this is because a chain of length 2 can take up a lot more space on LVM where there is no "thin provisioning" - this isn''t a problem for you on NFS. Given your observation that this only happens to VMs with more than 1 attached virtual disk, I think you''ve found a bug in the tool which you used to add the second disk to the VM. When you delete a VM snapshot (or uninstall a VM or template generally), only those disks which have a special flag set are actually deleted (specifically those with VBD.other-config:owner IIRC). If you use the "xe vm-disk-add" CLI command it should set this flag. If this flag isn''t set then it would cause the additional disks not to be deleted... this would cause your "snapshot chain" to get ever bigger, hit 30 and then fail. I think a workaround is to identify the disk (VDI not VM) snapshots which haven''t been deleted and delete them manually, possibly via the CLI ("xe vdi-destroy"). After a short while the background "coalesce" process should kick in and reduce your chain lengths again. Cheers, Dave From: xen-api-bounces@lists.xensource.com [mailto:xen-api-bounces@lists.xensource.com] On Behalf Of Simone Cariani Sent: 12 November 2010 12:00 To: xen-api@lists.xensource.com; xen-users@lists.xensource.com Subject: [Xen-API] problem with snapshot unallocation Hi all, i use XCP 0.5 with a NFS storage repository and normally i do daily snapshots from all VMs i have, as follow: 1) create snapshot 2) export snapshot to file 3) delete snapshot One day I get the VM error "Snapshot chain is too long". I notice however that this appears to only VM''s with more than 1 attached virtual disk. In my case I have a couple VM''s with 2 disks, and there were many orphaned copies of only 1 of the 2 disks. >From OpenXenManager is not possible to delete these snapshots.. I read a problem like this on Xencenter forum http://forums.citrix.com/thread.jspa?threadID=261023&tstart=0 and the solution is http://support.citrix.com/article/CTX123400 Does someone know how to fix this bug on XCP 0.5 ? Regards, Simone Cariani _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api
Simone Cariani
2010-Nov-15 14:48 UTC
[Xen-users] R: [Xen-API] problem with snapshot unallocation
Thank you very much for your reply!! I will follow your suggestions. Regards, Simone Cariani Da: Dave Scott [mailto:Dave.Scott@eu.citrix.com] Inviato: lunedì 15 novembre 2010 11.55 A: ''Simone Cariani''; xen-api@lists.xensource.com; xen-users@lists.xensource.com Oggetto: RE: [Xen-API] problem with snapshot unallocation Hi Simone, Whenever you create a snapshot disk it will increase the length of the snapshot chain by 1 and there is a hard length limit of 30. However whenever you delete a snapshot disk the background coalesce process should be able to reduce the snapshot chain length again. So your procedure (create snapshot; export snapshot; delete snapshot) ought to work fine. This is in fact the same process followed by the VM protection and recovery feature which will be part of XCP 1.0. The problem you linked to is related but not quite the same: it refers to a limitation within the coalesce process where it cannot reduce a chain of length 2 into a chain of length 1. The only reason people worry about this is because a chain of length 2 can take up a lot more space on LVM where there is no thin provisioning this isnt a problem for you on NFS. Given your observation that this only happens to VMs with more than 1 attached virtual disk, I think youve found a bug in the tool which you used to add the second disk to the VM. When you delete a VM snapshot (or uninstall a VM or template generally), only those disks which have a special flag set are actually deleted (specifically those with VBD.other-config:owner IIRC). If you use the xe vm-disk-add CLI command it should set this flag. If this flag isnt set then it would cause the additional disks not to be deleted this would cause your snapshot chain to get ever bigger, hit 30 and then fail. I think a workaround is to identify the disk (VDI not VM) snapshots which havent been deleted and delete them manually, possibly via the CLI (xe vdi-destroy). After a short while the background coalesce process should kick in and reduce your chain lengths again. Cheers, Dave _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
David Markey
2010-Nov-17 08:25 UTC
[Xen-users] Re: [Xen-API] problem with snapshot unallocation
>From coalesce-leaf script:*Only LVM SRs will be considered, and only VDIs whose VHD chain length equals 2.* *Note that the VM will be suspended during the operation. DO NOT* *start/resume/unpause the VM during the operation.* * * So, I''m not sure this particular process will work with NFS based SRs. Although i''m looking at the 5.5u2 version. On 15 November 2010 14:48, Simone Cariani <simone.cariani@xigroup.it> wrote:> Thank you very much for your reply!! I will follow your suggestions. > > > > Regards, > > > > Simone Cariani > > > > > > > > *Da:* Dave Scott [mailto:Dave.Scott@eu.citrix.com] > *Inviato:* lunedì 15 novembre 2010 11.55 > *A:* ''Simone Cariani''; xen-api@lists.xensource.com; > xen-users@lists.xensource.com > *Oggetto:* RE: [Xen-API] problem with snapshot unallocation > > > > Hi Simone, > > > > Whenever you create a snapshot disk it will increase the length of the > “snapshot chain” by 1 and there is a hard length limit of 30. However > whenever you delete a snapshot disk the background “coalesce” process should > be able to reduce the “snapshot chain” length again. So your procedure > (create snapshot; export snapshot; delete snapshot) ought to work fine. This > is in fact the same process followed by the “VM protection and recovery” > feature which will be part of XCP 1.0. > > > > The problem you linked to is related but not quite the same: it refers to a > limitation within the “coalesce” process where it cannot reduce a chain of > length 2 into a chain of length 1. The only reason people worry about this > is because a chain of length 2 can take up a lot more space on LVM where > there is no “thin provisioning” – this isn’t a problem for you on NFS. > > > > Given your observation that this only happens to VMs with more than 1 > attached virtual disk, I think you’ve found a bug in the tool which you used > to add the second disk to the VM. When you delete a VM snapshot (or > uninstall a VM or template generally), only those disks which have a special > flag set are actually deleted (specifically those with > VBD.other-config:owner IIRC). If you use the “xe vm-disk-add” CLI command it > should set this flag. If this flag isn’t set then it would cause the > additional disks not to be deleted… this would cause your “snapshot chain” > to get ever bigger, hit 30 and then fail. > > > > I think a workaround is to identify the disk (VDI not VM) snapshots which > haven’t been deleted and delete them manually, possibly via the CLI (“xe > vdi-destroy”). After a short while the background “coalesce” process should > kick in and reduce your chain lengths again. > > > > Cheers, > > Dave > > > > _______________________________________________ > xen-api mailing list > xen-api@lists.xensource.com > http://lists.xensource.com/mailman/listinfo/xen-api > >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users