mkdir /raid
mount /dev/md0 /raid
where /raid is wherever the filesystem you created in step 5 will reside.
7. Edit your /etc/fstab file. You will need to comment out the lines containing the partitions that
are now in the RAID array, such as /dev/sda1 and /dev/sdb2, by adding a # at the
beginning of the line. Add a line for the RAID array filesystem:
/dev/md0 /raid ext3 defaults 0 1
Manual Configuration Examples
Most of the work in manual configuration of a software RAID array comes from the creation of the
appropriate /etc/raidtab file. The following are examples of /etc/raidtab files and the
corresponding mdadm commands needed to set up each of the basic RAID configurations supported
by HP.
RAID-0
/etc/raidtab file:
raiddev /dev/md0
raid-level 0
nr-raid-disks 2
nr-spare-disks 0
persistent-superblock 1
chunk-size 4
device /dev/hda1
raid-disk 0
device /dev/hdb1
raid-disk 1
Command:
mdadm -Cv /dev/md0 --level=0 --raid-devices=2 /dev/hda1 /dev/hdb1
RAID-1
/etc/raidtab file:
raiddev /dev/md0
raid-level 1
nr-raid-disks 2
nr-spare-disks 0
persistent-superblock 1
chunk-size 4
device /dev/sda1
raid-disk 0
device /dev/sdb1
raid-disk 1
Command:
mdadm -Cv /dev/md0 --level=1 --raid-devices=2 /dev/sda1 /dev/sdb1
12