I am performing some configuration testing on a kvm host. When installing a guest operating system is it advisable to place each instance in a separate lv or better to accept the default and store them on the root file system?
Respecting lvm, does one configure lvs in a virtual server to take space from the main vg or does one allocate lv space from inside that allocated to the virtual instance? Is it even considered advisable to use lvs with virtual guests?
To give an example, if I were to configure an smtp server on bare metal I might use the following disk layout:
vg_bare 500Gb
/ lv_root 8Gb /boot lv_boot 1Gb /tmp lv_tmp 8Gb /var/log lv_log 8Gb /var/spool/mail lv_mail 16Gb
In a kvm setup, if I wish to do this, would I first create an lv just to host the virtual image and then assign lv s from the space allocated to that image file?
vg_bare 500Gb
/ lv_root 8Gb /boot lv_boot 1Gb /tmp lv_tmp 8Gb /var/log lv_log 8G
/var/lib/libvirt/images/lv_virt01 32Gb /var/lib/libvirt/images/lv_virt02 32Gb . . .
and so forth? Or is it worth the bother to have lv s in a virtual host?
On Mon, 2011-08-15 at 15:54 -0400, James B. Byrne wrote:
I am performing some configuration testing on a kvm host. When installing a guest operating system is it advisable to place each instance in a separate lv or better to accept the default and store them on the root file system?
I think you are asking LV based or file based guest storage. I vote for LV on the host.
Respecting lvm, does one configure lvs in a virtual server to take space from the main vg or does one allocate lv space from inside that allocated to the virtual instance? Is it even considered advisable to use lvs with virtual guests? ...
It seems that you are asking whether to use (1) multiple host LV's to keep different partitions on different virtual disks, (2) a single host LV with nested LVM or (3) a single host LV with traditional partitioning...
I use Xen, but if we treat this as a philosophical discussion, that probably doesn't matter.
I like option 1 (multiple host LVs) for the flexibility it gives, but I don't like the large number of LVs on the host.
I don't like option 2 (nested LVM) due to the difficulties of resizing guest PV.
Option 3 (single host LV, raw guest partitions) keeps the number of host LVs lower, but only the last guest partition is easily resized.
If you can accept the number of LVs or you need to resize your partitions frequently, I'd recommend option 1.
I have gravitated to option 3 because I find I don't need to resize my guest virtual disks very often. MS Windows uses a single partition, so those VMs are simple. On my Linux VMs, I normally only need to resize either the var partition or the home partition depending on the machine's function, but not both, so I put that partition last.
I recommend against using LVM within a VM.
Hello, typically my kvm guest disk is
/dev/sda1 /boot /dev/sda2 logical volume group
inside sda2 are two LV partitions / swap
Don't know if that answered your question. Remember that to enlarge a LV group, you need another device like /dev/sda3 to merge with that volume.
----------------------------------------------------
Charles T. Dillard 703 399 0876
----------------------------------------------------
Date: Mon, 15 Aug 2011 15:54:51 -0400 From: byrnejb@harte-lyne.ca To: centos-virt@centos.org Subject: [CentOS-virt] lvm and kvm
I am performing some configuration testing on a kvm host. When installing a guest operating system is it advisable to place each instance in a separate lv or better to accept the default and store them on the root file system?
Respecting lvm, does one configure lvs in a virtual server to take space from the main vg or does one allocate lv space from inside that allocated to the virtual instance? Is it even considered advisable to use lvs with virtual guests?
To give an example, if I were to configure an smtp server on bare metal I might use the following disk layout:
vg_bare 500Gb
/ lv_root 8Gb /boot lv_boot 1Gb /tmp lv_tmp 8Gb /var/log lv_log 8Gb /var/spool/mail lv_mail 16Gb
In a kvm setup, if I wish to do this, would I first create an lv just to host the virtual image and then assign lv s from the space allocated to that image file?
vg_bare 500Gb
/ lv_root 8Gb /boot lv_boot 1Gb /tmp lv_tmp 8Gb /var/log lv_log 8G
/var/lib/libvirt/images/lv_virt01 32Gb /var/lib/libvirt/images/lv_virt02 32Gb . . .
and so forth? Or is it worth the bother to have lv s in a virtual host?
-- *** E-Mail is NOT a SECURE channel *** James B. Byrne mailto:ByrneJB@Harte-Lyne.ca Harte & Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3
CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt