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] adding logical volumes to be used by domU

To: "Vasko Cacanoski" <Vasko.Cacanoski@xxxxxxxxxxxxxxx>
Subject: Re: [Xen-users] adding logical volumes to be used by domU
From: "Emre Erenoglu" <erenoglu@xxxxxxxxx>
Date: Thu, 23 Aug 2007 12:02:19 +0200
Cc: xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 23 Aug 2007 03:02:59 -0700
Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=Mo1HvdLecBIIUUGQdmL/LRQqYoP+cTD/bM1wnwO2QbVM6dHx5Q6rqjn2ufkjm2quhntoCqRckAKAOC6ns9c1IbnUhDsSwVURCxM+TTUKQt5zMI5YhFTpNKru2XNVQr6BKH69w0XyQQJV+5I4LDIyJ2O1Aa9p7A+TaHEZGRT/YV8=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=G49LSZiNR7yViwIu6VU236x07m/ovLh72P6cEkRMEsk4/EkNHKDwdvo1/kcE6vLBQ7FaNkaKJ+kd+K5mgwLDWz2+ONJ0n3cZ+XAPVvvOYh4Oh55JjoyGujgSyCfrhWEKAgEUjTfLOe8MT1qOb0+KFSawPTiUfI69kbP/AS50VM8=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <6D0D00FC20B5C84AB64578C143CC97C6014BC16F@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: <fe9771a80708220727o62df9f3cs475da4aa2cad781d@xxxxxxxxxxxxxx> <6D0D00FC20B5C84AB64578C143CC97C6014BC16F@xxxxxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
Hi Vasko,
 
no I accidentally sent it only to you as gmail sends to the user only when you click reply. Anyway, I'm adding back the user-list.
Anyway, it's true that you'll destroy partitions if you create a guest OS. However, you can:
 
1) copy this logical volume to a file (let's say file1), using dd
2) create partitions in this volume by fdisk or other tool
3) Resize the filesystem (make it smaller) inside your file1 so that it's exactly the same lenght as the partition that you've created, and copy it back to the partition inside the image.
 
This seemed a bit complex to me, so another way can be:
4) Do as as step 1 and 2
5) format the partition in the volume, then mount it. (see http://tuxinarow.com/2006/12/27/loopback_mountin_a_specific_partition_inside_a_disk_image  but i'm not sure if you can mount a partition inside a volume with this method)
6) loopback mount your file1 and copy the contents from file1 to the partition of the volume with cp -r
 
One question, why do you want to have a partitions inside your volume? Just create other volumes and export them also to the DomU as other partitions.
 
Br,
 
Emre
 
 


 
On 8/23/07, Vasko Cacanoski <Vasko.Cacanoski@xxxxxxxxxxxxxxx> wrote:

Hi Emre,

Thanks for replying.  

If I try to create partitions in /dev/xvda, I will destroy the guest OS installed there! There is one partition on xvda where the OS is installed. That's why I am wondering why it doesn't appear with fdisk.  

Did you delibertly answer my question only to me, not to the mailing list? I am asking because I am new to this group and I wanted to send a reply to a post, but I didn't know how.   

Thanks again.

Regards,

Vasko

 


From: Emre Erenoglu [mailto:erenoglu@xxxxxxxxx]
Sent: Wednesday, August 22, 2007 4:28 PM
To: Vasko Cacanoski
Subject: Re: [Xen-users] adding logical volumes to be used by domU

 

Hi Vasko, 

I can't answer your first question, but for this one:

Additional question, why, when logged on domU, with "fdisk /dev/xvda" I see no partitions at all?

In my setup, I have the disk directive as 

disk = [ 'phy:/dev/mapper/os-pardus,hda1,w' , 'phy:/dev/md1,hda2,w' ]   

This /dev/mapper/os-pardus is a Logical volume with an "image" of a partition inside, therefore it's perfectly normal to export it as /dev/hda1   

In your setup, you may try to create "partitions" inside this volume and try to see them with fdisk afterwards. I don't know if this is possible either with Xen and LVM.   

Best regards, 

Emre


 

On 8/22/07, Vasko Cacanoski < Vasko.Cacanoski@xxxxxxxxxxxxxxx > wrote:

Hi xen-community, 

My domU is installed on logical volume on dom0. I followed the instructuions from:

http://www.redhat.com/archives/fedora-xen/2006-November/msg00257.html 

In the configuration file in /etc/xen I have the following:  

disk = [ 'phy:/dev/volgr_temp/data_temp,xvda,w','phy:/dev/volgr_temp/swap_temp,xvdb,w']   

The second LV is swap partition that is used by domU, and the OS is installed as single partition of the other LV. This configuration is working fine.

I am testing scenario when more disk space will be needed by domU. My idea was to create third LV and to add it as third disk to the domU. That's why I use:   

disk = [ 'phy:/dev/volgr_temp/data_temp,xvda,w','phy:/dev/volgr_temp/swap_temp,xvdb,w', 'phy:/dev/volgr_temp/data_temp_part2,xvdc,w']

 The domU won't start reporting:

Error: destroyDevice() takes exactly 3 arguments (2 given)

 In the xen log files I can not find anything useful.

 Additional question, why, when logged on domU, with "fdisk /dev/xvda" I see no partitions at all?

 Regards,

Vasko Cacanoski

 

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