HP Xw9300 Software RAID in Linux Workstations - Page 11

Manual Setup of Software RAID Data Partitions, Disk Druid

Page 11 highlights

HP only provides support for software RAID-0, -1, -5, and -10. Tip: The GRUB and LILO boot loaders only support booting to RAID-1, or no RAID at all. If you wish to use a RAID level other than RAID-1, you must put the /boot partition on a non-RAID part of the filesystem. Manual Setup of Software RAID Data Partitions While HP recommends using the above method to set up software RAID on your Linux workstations, it is possible to manually set up a software RAID partition on multiple disks after installation. 1. Create partitions for the RAID array on two or more disks. You can use Disk Druid, fdisk, sfdisk, or any number of other partitioning tools to do this. It helps if the partitions are of the same size and on the same type of disk. The type of the partitions will be "Linux raid auto," or 0xfd. A reboot may be required after writing the new partition table. Tip: If you are setting up a RAID-1 array, it is best to use the same partition number on each disk for elements in the array. When one disk fails, if it is not the last disk in the array, the other disk(s) will be renamed on restart. For example, if sdb fails but sdc is still functional, when your system is restarted, the old sdc is renamed sdb. If you use a consistent partition number, your configuration files will remain valid (e.g. sdb1 and sdc1 being RAID partitions), no matter how the devices are renamed. 2. These partitions will correspond to Linux block file devices, e.g. the second partition on the third SCSI disk will be /dev/sdc2; the first partition on the second IDE disk will be /dev/hdb1. 3. Create the /etc/raidtab file. Sample configuration files can usually be found in /usr/share/doc/raidtools-*. Tip: You can view the file named /proc/mdstat by running the command cat /proc/mdstat. This file should tell you that you have the right personality (RAID mode) registered, as well as what RAID devices are currently active. 4. Use mkraid to create the initial RAID configuration on the partitions you previously specified in /etc/raidtab by entering the following: mkraid /dev/md0 or if you are using mdadm, enter: mdadm ñcreate ñverbose /dev/md0 --level=raidlevel --raiddevices=n /dev/sda1 /dev/sdb2 where /dev/md0 is the name of the RAID device, raidlevel is the RAID level specified as a number (e.g. 0, 1), n is the number of disks in the RAID array, and /dev/sda1, /dev/sdb2, etc are the names of the drives in the RAID array. 5. Create a filesystem on your RAID device as follows: mkfs ñt ext3 /dev/md0 6. Mount the filesystem like a normal block file device: 11

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19

HP only provides support for software RAID-0, -1, -5, and -10.
Tip:
The GRUB and LILO boot loaders only support booting to RAID-1, or no
RAID at all. If you wish to use a RAID level other than RAID-1, you must put
the /boot partition on a non-RAID part of the filesystem.
Manual Setup of Software RAID Data Partitions
While HP recommends using the above method to set up software RAID on your Linux workstations, it
is possible to manually set up a software RAID partition on multiple disks after installation.
1.
Create partitions for the RAID array on two or more disks. You can use
Disk Druid
,
fdisk
,
sfdisk
, or any number of other partitioning tools to do this. It helps if the partitions are of the
same size and on the same type of disk. The type of the partitions will be “
Linux raid auto
,”
or
0xfd
. A reboot may be required after writing the new partition table.
Tip:
If you are setting up a RAID-1 array, it is best to use the same partition
number on each disk for elements in the array. When one disk fails, if it is
not the last disk in the array, the other disk(s) will be renamed on restart.
For example, if
sdb
fails but
sdc
is still functional, when your system is
restarted, the old
sdc
is renamed
sdb
. If you use a consistent partition
number, your configuration files will remain valid (e.g.
sdb1
and
sdc1
being RAID partitions), no matter how the devices are renamed.
2.
These partitions will correspond to Linux block file devices, e.g. the second partition on the third
SCSI disk will be
/dev/sdc2
; the first partition on the second IDE disk will be
/dev/hdb1
.
3.
Create the
/etc/raidtab
file. Sample configuration files can usually be found in
/usr/share/doc/raidtools-*
.
Tip:
You can view the file named
/proc/mdstat
by running the command
cat /proc/mdstat
.
This file should tell you that you have the right personality (RAID mode)
registered, as well as what RAID devices are currently active.
4.
Use
mkraid
to create the initial RAID configuration on the partitions you previously specified in
/etc/raidtab
by entering the following:
mkraid /dev/md0
or if you are using
mdadm
, enter:
mdadm ñcreate ñverbose /dev/md0 --level=
raidlevel
--raid-
devices=
n
/dev/sda1 /dev/sdb2
where /dev/md0 is the name of the RAID device,
raidlevel
is the RAID level specified as a
number (e.g. 0, 1),
n
is the number of disks in the RAID array, and /dev/sda1, /dev/sdb2,
etc are the names of the drives in the RAID array.
5.
Create a filesystem on your RAID device as follows:
mkfs ñt ext3 /dev/md0
6.
Mount the filesystem like a normal block file device:
11