HP Xw9300 Software RAID in Linux Workstations - Page 12

Manual Configuration Examples, RAID-0

Page 12 highlights

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 nr-raid-disks nr-spare-disks persistent-superblock chunk-size device raid-disk device raid-disk 0 2 0 1 4 /dev/hda1 0 /dev/hdb1 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 nr-raid-disks nr-spare-disks persistent-superblock chunk-size device raid-disk device raid-disk 1 2 0 1 4 /dev/sda1 0 /dev/sdb1 1 Command: mdadm -Cv /dev/md0 --level=1 --raid-devices=2 /dev/sda1 /dev/sdb1 12

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

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