LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-23-2011, 02:09 PM   #1
homerwsmith
LQ Newbie
 
Registered: Aug 2010
Posts: 14

Rep: Reputation: 0
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
 
Old 10-24-2011, 07:11 AM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
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.
 
1 members found this post helpful.
Old 12-01-2011, 10:41 PM   #3
homerwsmith
LQ Newbie
 
Registered: Aug 2010
Posts: 14

Original Poster
Rep: Reputation: 0
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 View Post
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.
 
Old 12-01-2011, 11:59 PM   #4
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
Quote:
Originally Posted by homerwsmith View Post
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?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How long does hardware Raid card (raid 1) take to mirror 1 TB drive (500gb used)? abefroman Linux - Server 1 03-23-2011 11:41 AM
LXer: This week at LWN: Ext3 and RAID: silent data killers? LXer Syndicated Linux News 0 09-13-2009 03:40 PM
www.aarnet.edu.au Centos5.3 mirror ISO corruption? mazinoz Linux - Security 9 04-22-2009 04:18 PM
How can I verify Raid 1 functionality? l_long_island Linux - Newbie 4 02-26-2008 05:32 PM
How to verify Raid 0 array? fclifton Linux - Newbie 2 05-03-2004 03:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration