SoftRAID
Sources
Show details of a RAID partition
List the details of a RAID parition. Replace ''/dev/md0'' by the right device:
/sbin/mdadm --detail /dev/md0
Simulate drive failure
This command simulates a drive failure. Replace the devices with the required ones:
/sbin/mdadm /dev/md0 -f /dev/hdb1
and check the new status:
/sbin/mdadm --detail /dev/md0
Replace disk in RAID
When a drive has crashed, replace it with a new one. Partition it correctly with at least a Software RAID partition and then issue a command like this:
/sbin/mdadm /dev/md0 -a /dev/hdb1
Use this command to see the rebuild progess:
/sbin/mdadm --detail /dev/md0
Repeat the first command on case the disk had multiple Software RAID paritions.
Add extra disk to RAID
First add a new partition to the RAID
mdadm --add /dev/md1 /dev/sdf1
then grow the RAID
mdadm --grow /dev/md1 --raid-devices=4
- 1917 reads
