[plug] to LVM2 or not to LVM2...

Daniel Pittman daniel at rimspace.net
Fri Oct 9 12:47:32 WST 2009


Denis Brown <dsbrown at cyllene.uwa.edu.au> writes:

> About to set up a new server with RHEL5 or Centos5
>
> Default install uses LVM2 for the system disk.  For the data array however,
> which is a separate RAID5 array, I have a choice including whether to use
> LVM2 or not.
>
> An attraction with LVM2 is the ability to re-size partitions painlessly and
> this can be important for a production database application which this is.
> For example in the past I have opted for ext3 and manual partitioning.
> After a while assumptions that seemed good at the time can turn out to be
> less than ideal and re-partitioning can be a pain.
>
> The main question I have is "Where is the metadata stored, that defines a
> logical group and its logical volumes?"  On the system drive?  On the LVM
> itself?

Yes.  LVM writes a metadata header to the physical volumes that identify their
role in life.  It also maintains a backup of that metadata, elsewhere, so you
can recover in the (pretty unlikely) event that it gets damaged.

> Another way of looking at that is "What do I need to pay special attention
> to, in backing up, in order not to lose this valuable metadata?"

No more than you do for the partition table or MD software raid meta-data.
(Which is to say, yes, your disaster recovery plan /should/ take that into
 account, but you probably don't need to deal with this like you would, say,
 the files under /etc.)

> TNSTAAFL and this ability to shrink and grow logical volumes will have a
> small performance penalty.  I can live with that in favour of the potential
> flexibility.  But is this flexibility going to have a high price down the
> track?

No, not really.
        Daniel

-- 
✣ Daniel Pittman            ✉ daniel at rimspace.net            ☎ +61 401 155 707
               ♽ made with 100 percent post-consumer electrons
   Looking for work?  Love Perl?  In Melbourne, Australia?  We are hiring.



More information about the plug mailing list