biolocal:Linux raid
From Wiki CEINGE
RAID Management
Verify raid status:
mdadm --detail /dev/md0
Examine disks:
mdadm -E /dev/sdd1
Stopping a raid disk:
mdadm -S /dev/md0
Assemble a already configured raid disk:
mdadm -A /dev/md0 /dev/sda1 /dev/sdb1 /dev/sdc1 mdadm -Af /dev/md0 /dev/sda1 /dev/sdb1 /dev/sdc1 (force)
RAID creation
Create new "Linux raid autodetect" partitions (type code fd in fdisk) on each disk:
fdisk /dev/sda
Create the array
mdadm --create /dev/md0 --level=5 --raid-devices=4 /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1
Add the device list string into the file /etc/mdadm.conf:
DEVICE /dev/sda* /dev/sdb* /dev/sdc* /dev/sdd*
Automatically complete the configuration appending the raid device information:
mdadm --detail --scan >> /etc/mdadm.conf