WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

RE: [Xen-API] problem with snapshot unallocation

To: 'Simone Cariani' <simone.cariani@xxxxxxxxxx>, "xen-api@xxxxxxxxxxxxxxxxxxx" <xen-api@xxxxxxxxxxxxxxxxxxx>, "xen-users@xxxxxxxxxxxxxxxxxxx" <xen-users@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-API] problem with snapshot unallocation
From: Dave Scott <Dave.Scott@xxxxxxxxxxxxx>
Date: Mon, 15 Nov 2010 10:54:33 +0000
Accept-language: en-US
Acceptlanguage: en-US
Cc:
Delivery-date: Mon, 15 Nov 2010 02:55:17 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <000001cb8261$11460070$33d20150$@cariani@xigroup.it>
List-help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-post: <mailto:xen-api@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
References: <000001cb8261$11460070$33d20150$@cariani@xigroup.it>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcuCYRDWi9AoncUGQMyghpBamsHKuwCUNLzA
Thread-topic: [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

 

From: xen-api-bounces@xxxxxxxxxxxxxxxxxxx [mailto:xen-api-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Simone Cariani
Sent: 12 November 2010 12:00
To: xen-api@xxxxxxxxxxxxxxxxxxx; xen-users@xxxxxxxxxxxxxxxxxxx
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@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api
<Prev in Thread] Current Thread [Next in Thread>