linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: joystick <joystick@shiftmail.org>
To: Justin Piszcz <jpiszcz@lucidpixels.com>
Cc: 'Bernd Schubert' <bernd.schubert@fastmail.fm>,
	'linux-raid' <linux-raid@vger.kernel.org>
Subject: Re: 3.12: raid-1 mismatch_cnt question
Date: Thu, 14 Nov 2013 09:44:12 +0100	[thread overview]
Message-ID: <52848D5C.7020701@shiftmail.org> (raw)
In-Reply-To: <000001cee0bd$1979da60$4c6d8f20$@lucidpixels.com>

On 13/11/2013 23:10, Justin Piszcz wrote:
> I attempted to test both here:
> http://home.comcast.net/~jpiszcz/20131113/joystick_cmds.txt
>
> The --re-add did not work btw.
>

Unfortunately the --re-add HAD to work for the test to be of any value.

Like you did, with just -a (--add), it resynced completely when you 
added the old device back in, similarly to when you run repair.
After that you had two exactly identical devices on the RAID, so, no 
wonder the two md5sums of the two legs resulted to be identical.
Also mismatch_cnt went to zero again, and will need to grow again to 
some significant value before you can repeat the test.

The reason for which --re-add failed seems to be (I did a test on our 
machines) that you need to also --remove the device after --fail, so it's:

when removing:
     mdadm /dev/md1 --fail /dev/sda2
mdadm: set /dev/sdb2 faulty in /dev/md1
     mdadm /dev/md1 --remove /dev/sda2
         mdadm: hot removed /dev/sdb2 from /dev/md1

.... compute md5sums ...

when re-adding:
     mdadm /dev/md1 --re-add /dev/sda2
         mdadm: re-added /dev/sda2

you actually did remove the drive, but after that you did not retry with 
--re-add, you went straight to --add which fully replicated the content 
of sda2 on sdb2

Also: does the array already have a bitmap? It's not clear from the log. 
If it does not have a bitmap, even --re-add will replicate all content, 
so you really need a bitmap for this test
To add a bitmap you can do:
mdadm /dev/md1 --grow --bitmap=internal
at the beginning of the test.

What kernel version is yours?

Regards
J.

  reply	other threads:[~2013-11-14  8:44 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
2013-11-13 22:10                 ` Justin Piszcz
2013-11-14  8:44                   ` joystick [this message]
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=52848D5C.7020701@shiftmail.org \
    --to=joystick@shiftmail.org \
    --cc=bernd.schubert@fastmail.fm \
    --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).