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] Using lvm for domUs

To: "john maclean" <jayeola@xxxxxxxxx>
Subject: Re: [Xen-users] Using lvm for domUs
From: "Lars Roland" <lroland@xxxxxxxxx>
Date: Wed, 9 May 2007 11:42:53 +0200
Cc: Xen Users <xen-users@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 09 May 2007 02:41:21 -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:content-transfer-encoding:content-disposition:references; b=eePewGkn4ATS7yC2psdeWE2IUSE6m5+w1F546zXnC8Q1qIrTERyq5F8DLhlypX/kvnpUj7eLhxESPv8JWK9JXhqH3KOE4ClLF6Wz5owQJW/LdpQKG8Eedq3MMjXgk7h38jTZuqx5YTN1zz0VzmvCl6f9WZ+oGKyoGQaMoYaRhJo=
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:content-transfer-encoding:content-disposition:references; b=kx8xHnBqErcAuLoUBseudILHnYKg5Gw4zNFOgkb5Xekxqvq5QiHVLS+Z7r1yqWf67LmdSiC2xt8sRD2Z0cGdHjcIFQq29hOYy5Kvk2TnAXEZO7cC+1z3+Bj1c8jyO9KhsonzAGL7h0HjoSmEa3YDaenANQcRWPz7zfP5rjw8J+4=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <4170c1720704301129k4cc8eac3m32395ce16c7c20ec@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>
References: <4170c1720704301129k4cc8eac3m32395ce16c7c20ec@xxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
On 4/30/07, john maclean <jayeola@xxxxxxxxx> wrote:
Hey chaps. What's the best way to populate an lvm to get it ready for xen?

If you can live with not having the root partition of the guest as a
LVM then it is easy to get full LVM in the guest. Just install the
guest as usual then do somthing like this in dom0:
--
dd if=/dev/zero of=/var/xen/domains/guest/sdd.img bs=1M count=5120
--

add the disk image to the guests xen config file
--
disk    = [...,'file:/var/xen/domains/guest/sdd.img,sdd,w' ]
--

shutdown and start the guest, so it uses the new disk image
--
xm shutdown guest
xm create guest
--

Finally create volume group "vg" and logical volume "data", by
executing the following in the guest:
--
cfdisk /dev/sdd # create sdd1 and set its type to: "Linux LVM"
reboot
pvcreate /dev/sdd1
vgcreate vg /dev/sdd1
lvcreate -L 1G -n data vg
mkfs.xfs /dev/vg/data
mount /dev/mapper/vg-data /mnt/data
--

That should be it


--
Lars Roland

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

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