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] Creation of additional image within a domU

To: john maclean <jayeola@xxxxxxxxx>
Subject: Re: [Xen-users] Creation of additional image within a domU
From: Tim Post <tim.post@xxxxxxxxxxxxxxx>
Date: Sat, 24 Feb 2007 20:11:52 +0800
Cc: Xen Users <xen-users@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Sat, 24 Feb 2007 04:11:31 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <4170c1720702240346o453c7c2ay4208df5ab3a4ccae@xxxxxxxxxxxxxx>
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>
Organization: Net Kinetics
References: <4170c1720702240346o453c7c2ay4208df5ab3a4ccae@xxxxxxxxxxxxxx>
Reply-to: tim.post@xxxxxxxxxxxxxxx
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
On Sat, 2007-02-24 at 11:46 +0000, john maclean wrote:
> Chaps,
> 
> Perhaps this question is a little basic for this list but I'm not
> really sure of the simplest method or best tool for the job.
> 
> I've created some images with `dd=/dev/zero ....` and I'm using them
> for the domUs now. Some of them have been running for a few months
> with no probs. Trouble is that I'd like to create a separate partition
> within the domU. Options:-
> 1 - use fdisk? Not sure if that's possible for a file-based image.
> Can't run it within the domU
> 2 - run dd to create another partiton? Not sure how that would work
> 3 - create the new image from scratch and create the new partition as
> required and tell /etc/fstab about it.
> 

You can do this pretty easily. For the path of least resistance I'd :

Create new images the size of the partition you want to create

Do. Not. Format. Them.

use xm block-attach to add them , then update the xen config file.

Then use fdisk from within the dom-u as you wish. If you do this, be
sure to name the block device "sdc" or whatever the next letter would
be, not sdc1 , as you will be making sdc1 in the dom-u.

Format them from within the dom-u

Update fstab as needed

fsck

mount.

Otherwise, do the above, but make the device big enough to partition as
you want the primary drive to be. Then simply roast it, format it, cp
-dpR everything over that you need then block-detach it after unmounting
it.

After that, update the xen config files to reflect the new backing for
the boot device, and update the boot parameter accordingly.

If using an initrd in the dom-u, think for a moment if you need to
update any hard coded paths that may have been added in linuxrc.

I really recommend just doing the first option. More time to goof off
that way.

Best,
--Tim



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