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] expanding Xen guest disk size

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] expanding Xen guest disk size
From: Simon Hobson <linux@xxxxxxxxxxxxxxxx>
Date: Sun, 12 Jun 2011 22:49:27 +0100
Delivery-date: Sun, 12 Jun 2011 14:51:43 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <0016e64986a661b6cd04a58983f5@xxxxxxxxxx>
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/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <0016e64986a661b6cd04a58983f5@xxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
sylvan.dcunha@xxxxxxxxx wrote:

I have been using Xen on centos and its been working grt..
I have 3 VM guest OS running on Xen under Centos 5.5
 ...
Now I recently ran into a problem that my centos guest VM and windows 2003 and slowly running out of space.

You don't state what type of storage you use for the guest volumes, but the process is very similar for all of the options.

1) Enlarge the (virtual) block device. If it's a file based volume then you need to extend the file, if it's a partition then it's going to be hard, if it's on LVM then just do an lvextend on it.

2) Signal the guest to notice the change in block size. I understand that there is a process whereby you can tell the guest to re-read this, but I've never done it. A sure way is to stop it and restart it - just restarting isn't enough.

3) Resize the filesystem using the appropriate tools.

There are quite a few variations, which is right for you depends on you you have things set up. It may well be easier to just stop the guest, and resize the filesystem in Dom0 - this has the advantage that you don't need to persuade the guest to unmount the filesystem if online expand isn't supported.

Also, if you have partitioned the virtual device in the guest then you'll need to fiddle with the partitions on the resized virtual device - that is more work than just expanding a filesystem built straight on the device.

For me, it's a case of :
1) Expand the virtual device with lvm
2) Shutdown the guest
3) fsck -f the filesystem
4) resize2fs the silesystem (I use Ext3)
5) Start the guest - it will now have the larger disk(s)

--
Simon Hobson

Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
author Gladys Hobson. Novels - poetry - short stories - ideal as
Christmas stocking fillers. Some available as e-books.

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