|
|
|
|
|
|
|
|
|
|
xen-users
Re: [Xen-users] SAN / LVM backend and partitions
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
|
|
|
|
|