Reasoning behind RHEL's use of LVM even on a single disk install

Solution 1:

My personal opinion is that all modern operating systems should have volume management of some kind. Like you said, one purpose is to ensure you can increase the data in the future beyond physical limitations of the disk. Including (althoguh quickly becoming irrelevent) DOS partition limitations.

Another good reason is in the case of imminent disk failure (S.M.A.R.T starts to indicate failure), you can plug in another disk, add it to the volume group, then pvmove all your data over to that disk -- in theory its possible to do this on a live system however I probably wouldn't do this! This greatly simplifies these kinds of operations.

Other than that, LVM can be useful for backups, the snapshot feature lets you do some pretty smart things with, say a database to ensure consistent backups. So you can in MySQL for example..

  • Flush all tables with a read lock and get master binlog position.
  • Create an LVM snapshot.
  • Unlock the tables.
  • Backup the contents of the MySQL data directory you just snapshotted, along with your master binlog position.
  • Destroy the snapshot.

Low-impact consistent MySQL point in time backups with little effort on your part.

Much of what LVM can do though is going to be being superceded by btrfs which has in-built volume management anyway, but as it stands now I think the possibilities you get with LVM make it a no-brainer for enabling by default.

The downside to this is it can be a little more trickier to rescue from, but its one of those things you figure out once and remember. More importantly though you lower consistency of your data. Not all LVM implementations support filesystem barriers for example and that might be worth something to you depending on what your doing with your system.