[CentOS] Disc layout advice

Tue Oct 6 18:37:21 UTC 2009
Stephen Harris <lists at spuddy.org>

On Tue, Oct 06, 2009 at 05:59:37PM +0000, Joseph L. Casale wrote:
> >pvcreate is the first step of creating LVM areas.   If you're not going
> >to use LVM then you don't need to pvcreate.   However I recommend
> >that you _do_.
> 
> 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...

You don't run pvcreate on lvm partitions.  You run pvcreate on the block
devices that will be added to the volume groups.  This puts the required
headers on the device so that they can be identified by lvm.

Now these block devices could be a hard disk partition, a complete raw
hard disk (/dev/sda, for example)... or a raid metadisk (/dev/md0).  Could
even be a flash drive if you wanted.  Doesn't matter.  It's just a block
device.

As per my previous email,
  pvcreate /dev/md0
  vgcreate MyVolumeGroup /dev/md0
  lvcreate -L 1T MyVolumeGroup MyLVol1
  lvcreate -L 1T MyVolumeGroup MyLVol2
  lvcreate -L 1T MyVolumeGroup MyLVol3
would create 3 1Terabyte logical volumes which could be accessed as
/dev/MyVolumeGroup/MyLVol1 etc etc.  They're what you could run mke2fs
on and mount.

(commands off the top of my head, so might be slightly wrong!)

-- 

rgds
Stephen