[mdlug] Linux VMs - virtual disk best practices

Dan Pritts danno at dogcheese.net
Thu Mar 21 10:48:55 EDT 2013


On Mar 20, 2013, at 11:54 PM, Michael ORourke <mrorourke at earthlink.net> wrote:

I'm curious what other admins do when provisioning VM's with Centos/Redhat or similar.

In a vmware environment for several years, I created an individual virtual disk for each filesystem, and did not use LVM.  

You don't need to have a partition table on a disk to put a filesystem on it.  I used to say "put a partition table on each vdisk" anyway, because that fits with the principle of least surprise for future admins.  I am leaning away from that because it requires repartitioning the vdisk when you expand it.  

Since I'm not using LVM I do not need a separate /boot.  

Using LVM would indeed make it a little simpler to add space on-the-fly.  Adding a new scsi device on the fly always works in my experience; i'm less sure about expanding an in-use scsi device.  

regarding putting a swap file on the / partition, the minus is that it has to go through the filesystem layer on your guest.  But it's a good point.  

I have been thinking about overprovisioning memory in the VMs, and not putting any swap partition in the guest at all, and letting the hypervisor handle the required virtual memory.  As long as you have good resource limit support in your hypervisor this should work well.  I haven't thought this through very hard, there may be issues I am not considering.

danno


More information about the mdlug mailing list