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-users] Recover disk space after deletion files in Citrix Xenser

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] Recover disk space after deletion files in Citrix Xenserver
From: Mark Williamson <mark.williamson@xxxxxxxxxxxx>
Date: Wed, 18 Jun 2008 22:41:38 +0100
Cc: Luciano Mazaira / Costas Galicia <lmazaira@xxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 18 Jun 2008 14:42:14 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <48579FF2.8040100@xxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <48579FF2.8040100@xxxxxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.9
Hi there,

> I have a Citrix Xenserver host with a CentOS5.1 virtual guest.
>
> The original vm's disk space is 40 Gigabytes and the filesystem is ext3.
>
> When I delete 35 G, the CentOS operating system see 5 G, but the host
> still see 40 G. When I try export the virtual machine, it takes too much
> time and the image has 40 G, not 5 G.
>
> Can anyone help me to recover the disk space?

The amount of storage in the guest is not visible to the host, so it's not 
generally straightforward to get the host to recognise when space has been 
freed in a guest and take action accordingly.

With sparse files, it is possible to create a virtual disk which starts off 
small and then gradually grows as the guest allocates more space, however the 
reverse operation is harder.  Sparse files also have the downside that if you 
run out of space for VBDs and they cannot grow, it will cause crashes and / 
or corruption for the virtual machine(s) affected.

I'm not an expert on XenServer so I'm not sure what to suggest.  If you can 
access the VBD file itself there are things you could try to save space 
(creating a proper sparse copy of the file), however this would only work if 
the empty space in the guest is already set to zero.  If you've used the 
space and then freed it, this will not generally be the case, making it 
harder to free up the space.

A strategy which ought to work but which is more invasive would be to tar up 
the contents of your VBD and then create a new virtual machine from those 
contents.

The best strategy will depend on what you're trying to do.  Whatever strategy 
you try, you should back up your original VM first in case you damage it and 
keep that backup until you're sure that what you've done has worked.

I'll also note that you can get more specific help on the Citrix software at 
http://forums.xensource.com.  This xen-users mailing list is mainly aimed at 
users of the open source Xen project and we're not all that familiar with the 
commercial products!

Cheers,
Mark

-- 
Push Me Pull You - Distributed SCM tool (http://www.cl.cam.ac.uk/~maw48/pmpu/)

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users

<Prev in Thread] Current Thread [Next in Thread>