[CentOS] Disc layout advice

Tue Oct 6 18:59:16 UTC 2009
Steve Bonds <05s0pq602 at sneakemail.com>

On Tue, Oct 6, 2009 at 10:59 AM, Joseph L. Casale
JCasale-at-activenetwerx.com wrote:

> Yea I guess I was rather vague. I do plan to carve up the md device w/ lvm
> once it's up. Historically I run pvcreate on lvm partitions for various reasons.
>
> Should I create an pvm partition on the md0 device? I was not even sure I could...

I don't usually partition md devices, though I think it's possible.  I
can't really see why you would want to if you're using LVM.  Which you
should, since it makes resizing or adding filesystems so much more
convenient.

I *do* usually partition the underlying disk devices, mostly just to
record what each partition is for should that disk get swapped around.
 As someone else noted, when using MD and/or LVM it's not technically
required.  Should you ever accidentally put one of those disks in a
Windows host, you'll be glad you had a partition table, though...

Here's the generic-ish process I use:
1) Create the RAID "md" devices (e.g. /dev/md0)
2) pvcreate the whole md device
3) add the physical volume you just created (e.g. /dev/md0) to a
volume group (vgcreate or vgextend)
4) extend your logical volume(s) as desired
5) extend the filesystem on each logical volume

  -- Steve