What is lvm?

What is a web server installation? how will it help me?

Would you recommend using it?

Best Answer


Benefits

You can think of LVM as "dynamic partitions", meaning that you can create/resize/delete LVM "partitions" (they're called "Logical Volumes" in LVM-speak) from the command line while your Linux system is running: no need to reboot the system to make the kernel aware of the newly-created or resized partitions.

Other nice features that lvm logical volumes provide are

  1. If you have more than one hard-disk, Logical Volumes can extend over more than one disk: i.e., they are not limited by the size of one single disk, rather by the total aggregate size.

  2. You can set up "striped" LVs, so that I/O can be distributed to all disks hosting the LV in parallel. (Similar to RAID-0, but a bit easier to set-up.)

  3. You can create a (read-only) snapshot of any LV. You can revert the original LV to the snapshot at a later time, or delete the snapshot if you no longer need it. This is handy for server backups for instance (you cannot stop all your applications from writing, so you create a snapshot and backup the snapshot LV), but can also be used to provide a "safety net" before a critical system upgrade (clone the root partition, upgrade, revert if something went wrong).

While being most useful on server systems, I think that features 1. and 3., combined with LVM's ability to create/resize/delete LVs on the fly, are quite handy on desktop systems as well. (Especially if you experiment a lot with the system.)

Downsides

Of course, all of this comes at a price: the initial setup of LVM is more complex than just partitioning a disk, and you will definitely need to understand the LVM terminology and model (Logical Volumes, Physical Volumes, Volume Groups) before you can start using it. (Once it is set up, using it is much easier, though.)

If you use lvm across hard drives you may lose all your data if only one drive fails

Recommended reading