RAID SOFTWARE MANAGEMENT #http://www.mrgcorner.it/howto-linux/raid1-with-linux-and-mdadm/ # add and resync spare disk mdadm --add /dev/mdx /dev/sdx # auto-read-only mdadm mdadm --readwrite /dev/mdx This means that the minimum guaranteed speed of the rebuild of the array is approx 200MB/s cat /proc/sys/dev/raid/speed_limit_max 200000 This means that the minimum guaranteed speed of the rebuild of the array is approx 1MB/s cat /proc/sys/dev/raid/speed_limit_min 1000 echo 50000 > /proc/sys/dev/raid/speed_limit_min or fix setting in /etc/sysctl.conf dev.raid.speed_limit_min=value dev.raid.speed_limit_max=value cat /proc/mdstat watch -n1 cat /proc/mdstat grub-install /dev/sdx # pause resync echo "idle" > /sys/block/md0/md/sync_action echo 0 > /proc/sys/dev/raid/speed_limit_max #http://guide.debianizzati.org/index.php/Software_Raid_1:_configurazione_e_verifiche#Avaria_di_uno_dei_due_dischi_in_raid. #simulazione avaria disco # mdadm --set-faulty /dev/md0 /dev/hda1 ( --> "/" ) # mdadm --remove /dev/md1 /dev/hda1 # mdadm --set-faulty /dev/md1 /dev/hda2 ( --> "swap" ) # mdadm --remove /dev/md1 /dev/hda1 #azzerare superblocchi raid sul disco mdadm --zero-superblock /dev/hda1 #CLONE DISK PARTITION (mbr) #Salvare in un file per le "emergenze" la struttura del disco raid completo di mbr sfdisk -d /dev/hda > /root/mbr_hda.txt #Restore dal file sfdisk /dev/hdb < /root/mbr_hda.txt #mandare disco fuori linea via software mdadm --manage --set-faulty /dev/md1 /dev/sdc2 #dettagli sul raid mdadm --detail /dev/md1 #CLONE DISK PARTITION (gpt) #Salvare in un file per le "emergenze" la struttura del disco raid completo di mbr sgdisk -b gpt_sda.txt /dev/sda #Restore dal file sgdisk -l gpt_sda.txt /dev/sdb #replicare tabella disco a caldo (replico su sda, la tabella di sdb) sgdisk -R /dev/sda /dev/sdb sgdisk -G /dev/sda sgdisk -G -e /dev/sda mdadm --zero-superblock /dev/hda1 #dettagli sul raid mdadm --detail /dev/md1