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/
Home Products Support Community News


Re: [Xen-users] Creation of additional image within a domU

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] Creation of additional image within a domU
From: "john maclean" <jayeola@xxxxxxxxx>
Date: Mon, 26 Feb 2007 21:48:24 +0000
Delivery-date: Mon, 26 Feb 2007 13:47:44 -0800
Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=DwVElayCgDVOXW2VSll1Pv3vKxPVA8RYb9OB2cnr6WYYjAzIT2o/+Yyx9eJXJfdfSfKfPZ91u1HX/qwv8315mzWuBH0BPH2qbvji244/PmTLkNwBz4UWBa6VqP8w6U+qtKfqqNrz6fa6SkiSBsR/y4BBqAcljLEMRvWbVn5od1o=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=sht9i73rsGpBxHVBwQ+pfS6xGVuPxYjO7RIiRR4KREtcugYgtA3ynSQd2GU7CuNdH4YdXou3pmrV9IXpiG5RV+UKmutH6JV7Ty5NsJG/HRLmbEqDQYSmhKlyohUtdxOFisFy5M/xAUZvIDzBlrpmJARSmWAbOU0k406ByN6MpaE=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <200702261735.27501.mark.williamson@xxxxxxxxxxxx>
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: <4170c1720702240346o453c7c2ay4208df5ab3a4ccae@xxxxxxxxxxxxxx> <1172319613.15528.605.camel@xxxxxxxxxxxxxxxxxxxxx> <200702261735.27501.mark.williamson@xxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx

`xm block-attach <name> etc etc` worked OK. However 'lomount foo` gave
me a " file too big" error. Over to lvm land. I hear that you can
resize LVM stuff on the fly. Would've been very interesting to see how
it would've turned out though.

On 26/02/07, Mark Williamson <mark.williamson@xxxxxxxxxxxx> wrote:
> John, sorry I forgot to mention something to you. If you do slice up a
> virtual block device into partitions, you will need to use one of the
> quemu tools known as 'lomount' to mount them from dom-0.

This is also shipped with the Xen source distribution because it's so useful.

> You should probably get familiar with it before putting anything serious
> on the drive.

You can possibly also xm block-attach the VBD into dom0 and then access it.
*however* I'm not sure this is guaranteed to be safe when using blktap.  It
might be OK using the loop device based file-VBDs, but I'm not 100%.

> I have also never attempted to fsck a sliced lv or file backed vbd image
> from dom-0, I'm not quite sure how you would go about doing that if
> necessary.

The kpartx tools may be useful here, they create device maps from partition

Otherwise, you can read out the partition tables using (s)disk, then create
device maps (or bind /dev/loop devices) yourself to correspond to the
partitions you're interested in.

So many options :-)  Sorry if it's a bit confusing!


> Best,
> --Tim
> 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.
> _______________________________________________
> Xen-users mailing list
> Xen-users@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-users

Dave: Just a question. What use is a unicyle with no seat?  And no pedals!
Mark: To answer a question with a question: What use is a skateboard?
Dave: Skateboards have wheels.
Mark: My wheel has a wheel!

John Maclean  - 07739 171 531

Xen-users mailing list