Dec 27
Most common tools for handling linux software RAID would be mdadm and raidtools.
Check raidstatus:
# cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid5] [multipath] [raid6] [raid10] [faulty] md1 : active raid1 hdb2[1] hda2[0] 38073984 blocks [2/2] [UU] md0 : active raid1 hdb1[1] hda1[0] 1003904 blocks [2/2] [UU]
I am too lazy to show what it will show when broken, you will know when you see it. Also check dmesg for errors.
So after reboot if you have identical disk you can just copy partition table:
sfdisk -d /dev/hda | sed s/hda/hdb/ > /tmp/hdb sfdisk -f /dev/hdb < /tmp/hdb
I think that everyone can figure out what just happened. No add the fresh disk to degraded array:
raidtools
raidhotadd /dev/md0 /dev/hdb1 raidhotadd /dev/md1 /dev/hdb2
mdadm
mdadm /dev/md0 -a /dev/hdb1 mdadm /dev/md1 -a /dev/hdb2
After that if the reconstruction speed is low, you can speed it up by raising the speed_limit_min under /proc/sys/dev/raid
echo 10000 > /proc/sys/dev/raid/speed_limit_min
Leave a Reply
You must be logged in to post a comment.