Software RAID Configuration in Linux

Software RAID can be configured during the graphical installation of Red Hat Linux or during a kickstart installation. This chapter discusses how to configure software RAID during installation, using the Disk Druid interface.

Before you can create a RAID device, you must first create RAID partitions, using the following step-by-step instructions:

  • On the Disk Partitioning Setup screen, select Manually partition with Disk Druid.
  • In Disk Druid, choose New to create a new partition.
  • You will not be able to enter a mount point (you will be able to do that once you have created your RAID device).
  • Choose software RAID from the File System Type pulldown menu as shown in Figure 10-1.

Figure 10-1. Creating a New RAID Partition

  • For Allowable Drives, select the drive(s) on which RAID will be created. If you have multiple drives, all drives will be selected here and you must deselect those drives which will not have the RAID array on them.
  • Enter the size that you want the partition to be.
  • Select Fixed size to make the partition the specified size, select Fill all space up to (MB) and enter a size in MBs to give range for the partition size, or select Fill to maximum allowable size to make it grow to fill all available space on the hard disk. If you make more than one partition growable, they will share the available free space on the disk.
  • Select Force to be a primary partition if you want the partition to be a primary partition.
  • Select Check for bad blocks if you want the installation program to check for bad blocks on the hard drive before formatting it.
  • Click OK to return to the main screen.

Repeat these steps to create as many partitions as needed for your RAID setup. Notice that all the partitions do not have to be RAID partitions. For example, you can configure only the /home partition as a software RAID device.

Once you have all of your partitions created as software RAID partitions, follow these steps:

  • Select the RAID button on the Disk Druid main partitioning screen (see Figure 10-3).
  • Next, Figure 10-2 will appear, where you can make a RAID device.

Figure 10-2. Making a RAID Device

  • Enter a mount point.
  • Choose the file system type for the partition.
  • Select a device name such as md0 for the RAID device.
  • Choose your RAID level. You can choose from RAID 0, RAID 1, and RAID 5.

Note

Note

 

If you are making a RAID partition of /boot, you must choose RAID level 1, and it must use one of the first two drives (IDE first, SCSI second). If you are not creating a RAID partition of /boot, and you are making a RAID partition of /, it must be RAID level 1 and it must use one of the first two drives (IDE first, SCSI second).

  • The RAID partitions you just created appear in the RAID Members list. Select which partitions of these partitions should be used to create the RAID device.
  • If configuring RAID 1 or RAID 5, specify the number of spare partitions. If a software RAID partition fails, the spare will automatically be used as a replacement. For each spare you want to specify, you must create an additional software RAID partition (in addition to the partitions for the RAID device). In the previous step, select the partitions for the RAID device and the partition(s) for the spare(s).
  • After clicking OK, the RAID device will appear in the Drive Summary list as shown in Figure 10-3. At this point, you can continue with your installation process. Refer to the Red Hat Linux Installation Guide for further instructions.

Figure 10-3. RAID Array Created

LVM Configuration

LVM can be configured during the graphical installation of Red Hat Linux or during a kickstart installation. You can use the utilities from the lvm package to create your LVM configuration, but these instructions will focus on using Disk Druid during the Red Hat Linux installation to complete this task.

Read Chapter 4 Logical Volume Manager (LVM) first to learn about LVM. An overview of the steps required to configure LVM:

  • Create physical volumes from the hard drives.
  • Create volume groups from the physical volumes.
  • Create logical volumes from the volume groups and assign the logical volumes mount points.

To create a logical volume group with logical volumes during the Red Hat Linux installation:

  • On the Disk Partitioning Setup screen, select Manually partition with Disk Druid.
  • Select New.
  • You will not be able to enter a mount point (you will be able to do that once you have created your volume group).
  • Select physical volume (LVM) from the Filesystem Type pulldown menu as shown in Figure 11-1.

Figure 11-1. Creating a Physical Volume

  • A physical volume must be constrained to one drive. For Allowable Drives, select the drive on which the physical volume will be created. If you have multiple drives, all drives will be selected here, and you must deselect all but one drive.
  • Enter the size that you want the physical volume to be.
  • Select Fixed size to make the physical volume the specified size, select Fill all space up to (MB) and enter a size in MBs to give range for the physical volume size, or select Fill to maximum allowable size to make it grow to fill all available space on the hard disk. If you make more than one growable, they will share the available free space on the disk.
  • Select Force to be a primary partition if you want the partition to be a primary partition.
  • Select Check for bad blocks if you want the installation program to check for bad blocks on the hard drive before formatting it.
  • Click OK to return to the main screen.

Repeat these step to create as many physical volumes as needed for your LVM setup. For example, if you want the volume group to span over more than one drive, create a physical volume on each of the drives.

Warning

Warning

 

The /boot partition can not be on a volume group because the boot loader can not read it. If you want to have your root partition on a logical volume, you will need to create a separate /boot partition which is not a part of a volume group.

Once all the physical volumes are created, follow these steps:

  • Click the LVM button to collect the physical volumes into volume groups. A volume group is basically a collection of physical volumes. You can have multiple logical volume groups, but a physical volume can only be in one volume group.

Note

Note

 

There is overhead disk space reserved in the logical volume group. The summation of the physical volumes may not equal the size of the volume group; however, the size of the logical volumes shown is correct.

Figure 11-2. Creating an LVM Device

  • Change the Volume Group Name if desired.
  • All logical volumes inside the volume group must be allocated in physical extent units. By default, the physical extent is set to 4 MB; thus, logical volume sizes must be divisible by 4 MBs. If you enter a size that is not a unit of 4 MBs, the installation program will automatically select the closest size in units of 4 MBs. It is not recommended that you change this setting.
  • Select which physical volumes to use for the volume group.
  • Create logical volumes with mount points such as /home. Remember that /boot can not be a logical volume. To add a logical volume, click the Add button in the Logical Volumes section. A dialog window as shown in Figure 11-3 will appear.

 

 

 

 

 

 

 

Figure 11-3. Creating a Logical Volume

Repeat these steps for each volume group you want to create.

Figure 11-4. Logical Volumes Created

 

Login

New User?Register

Headlines

Headline full story...

Headline full story...

Headline full story...

Headline full story...

Headline full story...

Headline full story...

 
All Rights Reserved ©2007-08 DOEACC Forum Group