From: Bernd Schubert <bernd.schubert@fastmail.fm>
To: joystick <joystick@shiftmail.org>,
Justin Piszcz <jpiszcz@lucidpixels.com>
Cc: linux-raid <linux-raid@vger.kernel.org>
Subject: Re: 3.12: raid-1 mismatch_cnt question
Date: Tue, 12 Nov 2013 11:29:01 +0100 [thread overview]
Message-ID: <528202ED.1040307@fastmail.fm> (raw)
In-Reply-To: <5281F53D.4060703@shiftmail.org>
On 11/12/2013 10:30 AM, joystick wrote:
> On 11/11/2013 19:52, Justin Piszcz wrote:
> Wait so that mismatches grow again a couple of thousands, then I suggest
> you really do what I wrote in my previous email.
> If you can afford to bring the system offline then it's really easy
> because you can find all mismatching files in one shot
>
> - wait for mismatch_cnt reach 2000 at least (the more, the better), then
> reboot machine with a livecd
> - mount RAID
> - mount the filesystem readonly
> - (very important or it will resync) activate bitmap for raid1,
> preferably with small chunksize
> - fail 1 drive so to degrade raid1
> - drop caches with blockdev --flushbufs on the md device such as
> /dev/md2, on the two underlying partitions such as /dev/sd[ab]2, and
> maybe even on the two disk holding then such as /dev/sd[ab] (I'm not
> really sure what is the minimum needed) ; and also echo 3 >
> /proc/sys/vm/drop_caches
> - recursive md5sum for all files of the filesystem (something like find
> -type f -print0 | xargs -0 md5sum (untested)) > redirect stdout to a
> file on another filesystem
> - reattach drive with --re-add, let it resync the differences using the
> bitmap (there shouldn't be any, should complete immediately)
> - fail the other drive
> - drop all caches again
> - again find | md5sum , redirected to another file on another filesystem
> - reattach drive with --re-add
>
> now analyze differences between md5sums. Those are the files which are
> different in the two legs of the RAID, and they shouldn't be (aka
> corruption).
> Find preferably humanly readable text files which are sequentially
> written, such as log files. It is more difficult to understand what's
> wrong for files changed in the middle such as database files, or binary
> files.
>
If you have available disk space, you might run ql-fstest (possibly in
combination) with the above method.
https://bitbucket.org/aakef/ql-fstest
Right now it does not support yet to restart it and to verify existing
files, but I'm going to add this, either this evening or on Thursday.
Cheers,
Bernd
next prev parent reply other threads:[~2013-11-12 10:29 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-04 10:25 3.12: raid-1 mismatch_cnt question Justin Piszcz
2013-11-07 10:54 ` Justin Piszcz
2013-11-12 0:39 ` Brad Campbell
2013-11-12 9:14 ` Justin Piszcz
[not found] ` <527E8B74.70301@shiftmail.org>
2013-11-09 22:49 ` Justin Piszcz
2013-11-10 12:45 ` joystick
2013-11-11 9:26 ` Justin Piszcz
2013-11-11 11:06 ` joystick
2013-11-11 18:52 ` Justin Piszcz
2013-11-11 21:23 ` John Stoffel
2013-11-11 21:55 ` NeilBrown
2013-11-12 2:49 ` John Stoffel
2013-11-11 21:58 ` NeilBrown
2013-11-11 22:18 ` Justin Piszcz
2013-11-12 9:30 ` joystick
2013-11-12 10:29 ` Bernd Schubert [this message]
2013-11-13 22:10 ` Justin Piszcz
2013-11-14 8:44 ` joystick
2013-11-14 10:43 ` Justin Piszcz
2013-11-14 16:09 ` joystick
2013-11-14 17:22 ` Justin Piszcz
2013-11-15 8:51 ` joystick
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=528202ED.1040307@fastmail.fm \
--to=bernd.schubert@fastmail.fm \
--cc=joystick@shiftmail.org \
--cc=jpiszcz@lucidpixels.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).