[ale] LVM, Software RAID
Keith Hopkins
hne at hopnet.net
Tue Oct 1 06:30:07 EDT 2002
Yeah Denny! Nice diag....let me see if I can add a little to it....
Denny Chambers wrote:
> ********************************************
> **------- Files and Directories ----------**
> ********************************************
> **----------- File System ----------------**
> ********************************************
> **----------- Logical Volumes ------------**
> ********************************************
> **------------ Volume Groups -------------**
> ********************************************
> **---------- Physical Volumes ------------**
> ********************************************
> **------------ Raid Layer ----------------**
> ********************************************
> * disk | disk | disk | disk | disk | disk **
> ********************************************
1) Build your disks into a RAID.
2) pvcreate on your RAID device (/dev/md?)
pvcreate PhysicalVolume
pvcreate /dev/md0
If pvcreate complains about the partition type on /dev/md?, then your LVM tools are too old. Download/compile a newer set from sistina.com.
3) vgcreate a Volume Group
vgcreate VolumeGroupName PhysicalVolume
vgcreate vg00 /dev/md0
This creates the directory /dev/vg00 and a "group" file under that directory.
4) lvcreate Logical Volumes as needed. I split up my disk's opt,var,usr,tmp (/home is off on a NFS server). It is probably a bad idea to try and put /boot or / (slash) on LVM....that would be one more layer of complexity you don't need should bad things ever happen.
HP-UX defaults to names like lvol1, lvol2, but I like more descriptive names, lvvar, lvusr, lv....
lvcreate --size LogicalVolumeSize[kKmMgGtT] --name LogicalVolumeName VolumeGroupName
lvcreate --size 1.5G --name lvusr vg00
5) mkfs/mkreiserfs/mk.xfs your favorite file systems on the Logical Volume.
mkreiserfs device
mkreiserfs /dev/vg00/lvtmp
6) mk mount points, mount the puppies, put the entries in your fstab, done.
Since you are building LVM on top of RAID, I'd suggest you ignore any references to striping in the LVM commands and let RAID do the striping for you.
Check out the resizing abilities of Logical Volumes, Volume Groups and the ability to do Snapshots for backups.
vgimport and vgexport are handy for portable disk drives.
--
Lost in Tokyo,
Keith
---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be
sent to listmaster at ale dot org.
More information about the Ale
mailing list