[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] Using lvm for domUs


  • To: "john maclean" <jayeola@xxxxxxxxx>
  • 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
  • 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=
  • List-id: Xen user discussion <xen-users.lists.xensource.com>

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.