LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   RAID 1, how to verify mirror , silent corruption (https://www.linuxquestions.org/questions/linux-newbie-8/raid-1-how-to-verify-mirror-silent-corruption-909688/)

homerwsmith 10-23-2011 02:09 PM

RAID 1, how to verify mirror , silent corruption
 
Dear Gentle Folk,

Running CentOS 5.x with mdadm for raid 1.

Is there any way to verify a raid 1 array of
two disks to verify that they are exact copies?

Need to do this on the fly while the array is
running and in service.

Being paranoid, in the past bad data has gotten
on one disk and not the other due to bad motherboard
or whatever.

Pointers to RTFM welcome,

Thanks in advance to all who read this.

Homer W Smith
Lightlink Internet

macemoneta 10-24-2011 07:11 AM

Yes, you can check and correct the array with:
Code:

echo check > /sys/block/md0/md/sync_action
Wait for the check to complete:
Code:

cat /sys/block/md0/md/sync_action
idle

Check for any block mismatches:
Code:

cat /sys/block/md0/md/mismatch_cnt
0

If you get a non-zero value, run:
Code:

echo repair > /sys/block/md0/md/sync_action
The above can be performed while the array is in use.

homerwsmith 12-01-2011 10:41 PM

Thanks for the below.

As far as I know CentOS5.x does not have /sys or /proc/sys or any /proc/*/block/*

Any other suggestions?

Thanks in advance.

Homer



Quote:

Originally Posted by macemoneta (Post 4506447)
Yes, you can check and correct the array with:
Code:

echo check > /sys/block/md0/md/sync_action
Wait for the check to complete:
Code:

cat /sys/block/md0/md/sync_action
idle

Check for any block mismatches:
Code:

cat /sys/block/md0/md/mismatch_cnt
0

If you get a non-zero value, run:
Code:

echo repair > /sys/block/md0/md/sync_action
The above can be performed while the array is in use.


macemoneta 12-01-2011 11:59 PM

Quote:

Originally Posted by homerwsmith (Post 4539794)
Thanks for the below.

As far as I know CentOS5.x does not have /sys or /proc/sys or any /proc/*/block/*

Any other suggestions?

Thanks in advance.

Homer

CentOS 5 does have /sys. Have you mounted it in /etc/fstab?


All times are GMT -5. The time now is 08:08 PM.