Software Raid 1 Array Failure - Detecting and Repairing
Greetings,
It seems that my Raid-1 array is malfunctioning on my server PC! I'm not sure if the drive has actually failed, or is just out of sync with the other. I'm using two identical 500 gigabyte hard drives in a Raid-1 software array. cat /prov/mdstat outputs the following: Code:
Personalities : [raid1] [raid6] [raid5] [raid4] Code:
/dev/md0: 463.87GiB raid1 2 devices, 0 spares. Use mdadm --detail for more detail. Code:
/dev/md0: First, is the drive actually faulty, as in broken? Or is it just out of sync with the other drive? If so, how do I go about fixing this? Thanks much! |
I would re-add it and see if it does it again:
mdadm --add /dev/md0 /dev/sda1 look into smartmontools and run a smartctl -a /dev/sda and see the drives smart logs say. |
Code:
[root@localhost ~]# mdadm --add /dev/md0 /dev/sda1 Code:
[root@localhost ~]# smartctl -a /dev/sda |
Quote:
more info: http://en.wikipedia.org/wiki/S.M.A.R.T http://smartmontools.sourceforge.net/BadBlockHowTo.txt You might want to do a full format of the disk so that the "Offline_Uncorrectable" blocks will be read/written and either automatically brought back into service or remapped by the drive firmware. After that build the partition table back up to the way it should be for the raid. You could probably use dd if=/dev/sourcedrive of=dev/targetdrive for that if they are the same model. Then you can re-add it and see if it continues to get bad blocks. Also you will need to run e2fsck -c /dev/sda# so that the ext3 filesystem can map out the bad blocks and keep from writing to them. See bad blocks are remapped to special reserved good blocks by the driver firmware. But this effectively causes performance loss because it breaks the consistency and is similar to fragmentation. OR you could just buy a new drive :) To add remove drives from raid fully: mdadm --fail /dev/md0 /dev/hdc1 mdadm --remove /dev/md0 /dev/hdc1 mdadm --add /dev/md0 /dev/hdc1 |
Alright, reformatted the ext3 partition on the faulty drive, and re-added it into the array. It rebuilt, and now everything seems alright!
Quote:
|
I would still keep an eye on it ;)
|
All times are GMT -5. The time now is 05:20 PM. |