[CentOS] Some basic LVM questions

Mon Nov 9 01:03:17 UTC 2009
Kwan Lowe <kwan.lowe at gmail.com>

On Sun, Nov 8, 2009 at 1:22 AM, Monte Milanuk <memilanuk at gmail.com> wrote:
[...]
>
> What I have currently is an older PC that I'm hoping to use as a home server
> / occasional 'workstation'.  One 13GB main drive, and a 500GB drive for
> network storage.  The default install in CentOS 5.4 seems to want to just
> lump everything together in one big volume.  I was thinking perhaps it'd be
> better to have two volumes (or pools, like I said - still learning and not
> entirely confident of the lingo involved)... one for the main or 'system'
> drive (the 13GB one with / mounted on it), and another one for the 500GB
> sata drive on it - so if I want to add another big drive for more storage,
> it'd go under that group, ready to serve up storage to the WLAN.
>
> Is there anything particularly 'wrong' with that layout, as compared to the
> default 'everything in one logical volume' approach that the installer
> utilized?

Nothing wrong with it and I would certainly recommend that you
separate the data volumes from the OS volumes.  In the very least it
will allow you to move the data drive to another system and bring it
online. And yes, if you lose a single drive in a non-RAIDed LVM group,
you can lose the whole volume. If there's data that is absolutely
critical, you can put it on an LVM RAID or at least mirror it.  This
said, having even a single drive in an LVM VG can be beneficial.  For
example:

1) Adding space is as simple as adding another drive to the VG.

2) If you later want to mirror the drive, just add another drive and
mirror the LV.

3) If you run out of space, you can add a larger drive then migrate
the PVs from the original drive to the new, larger drive. This also
works if the original drive is starting to fail.

4) You can create LV snapshots easily which is very useful for backups.