linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.com>
To: Eyal Lebedinsky <eyal@eyal.emu.id.au>,
	list linux-raid <linux-raid@vger.kernel.org>
Subject: Re: using the raid6check report
Date: Mon, 09 Jan 2017 12:56:03 +1100	[thread overview]
Message-ID: <87h959j8ss.fsf@notabene.neil.brown.name> (raw)
In-Reply-To: <62f5d174-0aef-5a70-68c3-26f7763b5e61@eyal.emu.id.au>

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

On Mon, Jan 09 2017, Eyal Lebedinsky wrote:

>
> I am aware of that discussion and agree with the sentiment (fix in user space).

(I primarily provided for the information of others)

> What I miss is a message from md when a 'check' mismatch is found. Not having
> this means I have to run 'raid6check', then after looking at the situation
> run 'raid6check autorepair' in the small sections reported as bad. This is time
> consuming and risky.

Something like this?

diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 69b0a169e43d..f19c38baf2b2 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -2738,6 +2738,8 @@ static void handle_parity_checks5(raid5_conf_t *conf, struct stripe_head *sh,
 			conf->mddev->resync_mismatches += STRIPE_SECTORS;
 			if (test_bit(MD_RECOVERY_CHECK, &conf->mddev->recovery))
 				/* don't try to repair!! */
+				pr_debug("%s: \"check\" found inconsistency near sector %llu\n",
+					 md_name(conf->mddev), sh->sector);
 				set_bit(STRIPE_INSYNC, &sh->state);
 			else {
 				sh->check_state = check_state_compute_run;


I chose pr_debug() because I didn't want to flood the logs if there are
lots of inconsistencies.
You can selectively enable pr_debug() messages by writing to
/sys/kernel/debug/dynamic_debug/control
providing you have dynamic debugging compiled in.

Maybe use pr_info_ratelimited() instead??

NeilBrown

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  reply	other threads:[~2017-01-09  1:56 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-23  0:56 using the raid6check report Eyal Lebedinsky
2017-01-08 17:40 ` Piergiorgio Sartor
2017-01-08 20:36   ` Eyal Lebedinsky
2017-01-08 20:46     ` Piergiorgio Sartor
2017-01-08 21:06       ` Wols Lists
2017-01-08 21:20         ` Eyal Lebedinsky
2017-01-08 21:43         ` Piergiorgio Sartor
2017-01-08 20:52   ` Wols Lists
2017-01-08 21:41     ` Piergiorgio Sartor
2017-01-08 22:39       ` NeilBrown
2017-01-09  0:32         ` Eyal Lebedinsky
2017-01-09  1:56           ` NeilBrown [this message]
2017-01-09  2:13             ` Eyal Lebedinsky

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=87h959j8ss.fsf@notabene.neil.brown.name \
    --to=neilb@suse.com \
    --cc=eyal@eyal.emu.id.au \
    --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).