linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Robin Hill <robin@robinhill.me.uk>
To: hanguozhong <hanguozhong@meganovo.com>
Cc: linux-raid <linux-raid@vger.kernel.org>
Subject: Re: a question about how to repair raid5
Date: Mon, 26 Nov 2012 12:50:55 +0000	[thread overview]
Message-ID: <20121126125055.GA29049@cthulhu.home.robinhill.me.uk> (raw)
In-Reply-To: <201211262032343900581@meganovo.com>

[-- Attachment #1: Type: text/plain, Size: 1574 bytes --]

On Mon Nov 26, 2012 at 08:32:38 +0800, hanguozhong wrote:

> Hi, every one:
> I have a question about how to repair raid5.
> Days ago, I received a email from the monitor of mdadm. 
> The email told me that there were lots of mismatch_cnt in the array. 
> Then I tried to find the solution of this problem on Google. Most solutions were as the following:
> 
> #echo repair /sys/block/md0/md/sync_action
> #echo "check" > /sys/block/md0/md/sync_action
> #cat /sys/block/md0/md/mismatch_cnt
> 
> I did repair the array like the above. 
> But I found that it took lots of time to "repair" and "check" the array. 
> Why there was a "check" after "repair"I did not know. And it spent as much time as "repair".
> Is it redundant? Anyone can help me?

That's the correct process, yes. The "check" will verify whether the
parity block for each stripe is correct, whereas the "repair" will also
rewrite any parity blocks which don't match. You rerun the "check" after
the "repair" to ensure that everything has been repaired correctly (if
there's still mismatches then it would point towards a problem with your
setup somewhere). Both are doing a full read of all disks, so will take
about the same time (the number of additional writes that the "repair"
needs to do should not impact on the time significantly).

HTH,
    Robin

-- 
     ___        
    ( ' }     |       Robin Hill        <robin@robinhill.me.uk> |
   / / )      | Little Jim says ....                            |
  // !!       |      "He fallen in de water !!"                 |

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2012-11-26 12:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-26 12:32 a question about how to repair raid5 hanguozhong
2012-11-26 12:50 ` Robin Hill [this message]
2012-11-27  2:20   ` hanguozhong
2012-11-27  8:58     ` Robin Hill

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121126125055.GA29049@cthulhu.home.robinhill.me.uk \
    --to=robin@robinhill.me.uk \
    --cc=hanguozhong@meganovo.com \
    --cc=linux-raid@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).