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] SAN / LVM backend and partitions

To: Mark Williamson <mark.williamson@xxxxxxxxxxxx>
Subject: Re: [Xen-users] SAN / LVM backend and partitions
From: Nico Kadel-Garcia <nkadel@xxxxxxxxx>
Date: Wed, 24 Jan 2007 23:44:08 +0000
Cc: Reinhard Brandstaedter <Reinhard.Brandstaedter@xxxxxx>, xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 24 Jan 2007 15:44:01 -0800
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; b=YqSrVuSgl+ELsNdL/o/TWVCjoPMAS0o02BBuWGSsyS9Ru5R1QL88BoBEBCfPbOgRuVCy1LSbohMwA2XRk15TP9fJUdO0wn6bgnRP90RgA2xMrOZxGs9nl0cOH7q0+Exq4V0Sfne3+WZcOKMKRqYtxAnpUj8eaRJYAs9GlN6FG0Y=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <200701241858.19922.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: <45B0C2560200004200007765@xxxxxxxxxxxxxxxxxxxxxxxxx> <200701241858.19922.mark.williamson@xxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.9 (Windows/20061207)
Mark Williamson wrote:
I'm playing around with Xen using LVM2 based on a SAN storage for VBDs.
Unfortunately I'm not very familiar with LVM2 but so far I get DomUs up
and running with using a logical volume as disk.

Well, that's good progress.  I'm not very familiar with LVM either ;-)

>From the XEN User Manual I see this procedure:

- create logical volume
- create filesystem on LV
- copy system files (the LV is mountable in dom0)

Basically if you want multiple disks (or partitions for /usr,/var, ...)
in the DomU you specify them in the vm config file and need to have
multiple logical volumes on the Dom0 for that, like:
/dev/vg0/vm-root
/dev/vg0/vm-var
/dev/vg0/vm-usr

This is handy because it makes them appear in a nice separate way in dom0, convenient to mount, extend, etc, etc.

It won't look quite like a "normal" block device to guest users though, and they won't be able to adjust the partitioning themselves. Also, it won't work nicely in HVM guests - meaning that if you ever want to deploy HVM guests (or convert existing ones to HVM) you'll have to convert to the other approach.

However I can also only specify only one logical volume in the config
file and do the partitioning in the DomU then. (e.g. if I use
virt-install on RedHat). So the one logical volume would get a partition
table?
Calling fdisk on this volume would print something like that:
# fdisk -l /dev/vg0/vm-root

Disk /dev/vg/vm-root: 6442 MB, 6442450944 bytes
255 heads, 63 sectors/track, 783 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device             Boot  Start  End  Blocks    Id  System
/dev/vg0/vm-root1  *     1      13   104391    83  Linux
/dev/vg0/vm-root2        14     78   522112+   82  Linux swap
/dev/vg0/vm-root3        79     783  5662912+  83  Linux

Maybe this is much more a LVM issue, but which way is the better one for
use with Xen?
If I use partitions in a logical volume can they be mounted in the Dom0
system as well? (e.g. for changing files while DomU is not running)
Are there any considerations for these two aproaches when using
live-migration?

You can use the lomount tool (or others) to mount partions within the LV from dom0 (again, whilst the domU isn't running). It's not *quite* as convenient to work with from dom0's PoV but it looks more "normal" to the guests. I've moved over to this configuration now, primarily because it makes it easy to convert to / from fully virtualised guests, and to perform initial installs in Qemu.
I'm doing this with files in /var/lib/xen/images right now, to keep resizing easy and allocate space out of a large, mounted /var/lib/xen partition as needed. I'm debating switching to LVM partitions to get snapshots for backup.

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

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