mdadm --create /dev/md0 --level=5 --raid-devices=3 /dev/sda1 /dev/sdb1 /dev/sdc1 --spare-devices=1 /dev/sdd1
watch -n 1 'cat /proc/mdstat' mdadm --detail /dev/md0 mdadm -E /dev/sdb2
mdadm --manage /dev/md1 --fail /dev/sdb2 mdadm --manage /dev/md1 --remove /dev/sdb2 mdadm --manage /dev/md1 --add /dev/sdb2 mdadm --grow /dev/md0 --raid-devices=4 // add drive mdadm --grow /dev/md0 --size=max // change drive size
mdadm --manage --set-faulty /dev/md1 /dev/sdc2
echo "check" > /sys/block/md0/md/sync_action echo "repair" > /sys/block/md0/md/sync_action cat /sys/block/md0/md/mismatch_cnt
MAILADDR mail@example.com,root@localhost PROGRAM /root/script.sh
mdadm --detail --scan >>/etc/mdadm/mdadm.conf update-initramfs -u
start_smartd=yes
On last disk by default
sfdisk -d /dev/sda > sda_partition.txt sfdisk --force /dev/sdb < sda_partition.txt
iostat -m echo 20000 > /proc/sys/dev/raid/speed_limit_min echo 90000 > /proc/sys/dev/raid/speed_limit_max
20000K/sec
smartctl -l scterc,70,70 /dev/sda