Software Raid And Lvm - HP xw4400 Mini White Paper

Software raid in linux workstations
Hide thumbs Also See for xw4400:
Table of Contents

Advertisement

Software RAID and LVM

Software RAID can be used with the Linux LVM, or Logical Volume Manager, to provide a greater
degree of flexibility with regard to the setup of the filesystem. The LVM provides a level of abstraction
of the physical disks in a filesystem, making it easier to manage. It works by grouping physical disks
into a volume group, which can then be partitioned into logical volumes. These logical volumes
behave much like ordinary disk block devices, except that logical volumes can be dynamically grown,
shrunk, and/or moved without rebooting the system or entering into maintenance/standalone mode.
In general, it adds a layer of abstraction between filesystem mount points such as / or /usr, and hard
disk devices such as /dev/hda1 or /dev/sdb2.
The benefit of using LVM is the flexibility of being able to add or remove physical hard drives or move
data between existing drives without disrupting the filesystem or users. LVM cannot be used to
dynamically resize RAID devices, nor can physical drives be simply added and removed from a RAID
array as they could while using LVM without RAID. There are still benefits to using software RAID with
LVM, which can be implemented using the following steps:
Set up RAID partitions using Disk Druid, fdisk, or whatever partition manager you prefer.
1.
Create the RAID array, either during installation using the Anaconda installer, or manually after
2.
installation. Any supported RAID level can be used with LVM, since neither software RAID nor LVM
knows about the other.
Use LVM to create a physical volume on the RAID device. For example, if the RAID array is
3.
/dev/md0, then use the following command to create a physical volume:
pvcreate /dev/md0
Create a volume group from the physical volume you just set up. For example, create the volume
4.
group using the command:
vgcreate lvm-raid /dev/md0
In this case, a volume group called lvm-raid is created from the device /dev/md0.
Logical volumes can now be created using the following command:
5.
lvcreate ñl 57235 lvm-raid ñn lvm0
This creates a logical volume called lvm0 of size 57235 from the lvm-raid volume group. As many
partitions as necessary can be created in this way. The lvdisplay command can be used to check the
status of logical volumes; the vgdisplay command provides status about the volume group as a whole.
The available space can be seen using the vgdisplay command.
Setup of the filesystem can now continue as normal.
© 2006 Hewlett-Packard Development Company, L.P. The information contained
herein is subject to change without notice. The only warranties for HP products and
services are set forth in the express warranty statements accompanying such
products and services. Nothing herein should be construed as constituting an
additional warranty. HP shall not be liable for technical or editorial errors or
omissions contained herein.
439278-001, October 2006
19

Advertisement

Table of Contents
loading

Table of Contents