in Planet Linux OpenSource Vserver ~ read.

Thoughts about LVM

Since I started playing around with vserver there is the problem left restricting the capacity of the disk usage of the guests.

One solution may be to use one partition per vserver guest. But what to do if there is more (or less) space needed on the systems? Shutting them down and copying to bigger or smaller partition may not acceptable in any cases.

An other path can be LVM and (online-)resizeable filesystems.

There are some pitfalls:

  • /boot - If you use an initrd ramdisc, you shouldn't setup /boot on the LV, cause you need the ramdisc to access the logical volume, which is on the LV in this case. :)
  • swap on the LV - you dont want this! The performance will be bad cause normally the data is written near together. But with LV your data will be written across multiple zones and your swap will slow down.
  • Rescue System - needs LVM support. Take care on choosing your rescue cd. For example Gentoo 2006.0 LiveCD should work well.
  • Wrong filesystem - You did choose to use LV to be flexible, but is your filesystem flexible enought too? With Ext3 you can online and offline expand and reduce, the latter with kernel patch. Reiser-FS is able to online expand but only to reduce offline. XFS and JFS can be expanded online but not reduced neither online nor offline.
  • Check if your (backup-) restore scenario supports LV and the filesystem you choosed