linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Johnson Yan" <johnson_yan@usish.com>
To: 'NeilBrown' <neilb@suse.de>
Cc: 'Jack Wang' <jack.wang.usish@gmail.com>, linux-raid@vger.kernel.org
Subject: RE: RAID0 DeviceDisappeared event happen when restart mdmonitor service
Date: Wed, 24 Oct 2012 12:29:11 +0800	[thread overview]
Message-ID: <000301cdb1a0$20996560$61cc3020$@com> (raw)
In-Reply-To: <20121024131040.406ff1b9@notabene.brown>

Hi Neil,
Got it, thank you for the patch.

Best Regards
Johnson


> -----Original Message-----
> From: NeilBrown [mailto:neilb@suse.de]
> Sent: Wednesday, October 24, 2012 10:11 AM
> To: Johnson Yan
> Cc: 'Jack Wang'; linux-raid@vger.kernel.org
> Subject: Re: RAID0 DeviceDisappeared event happen when restart mdmonitor
> service
> 
> On Mon, 17 Sep 2012 11:23:40 +0800 "Johnson Yan"
> <johnson_yan@usish.com>
> wrote:
> 
> > Hi Neil,
> > Thank you for the clarification.
> > I can remove the RAID0 MD's information from /etc/mdadm.conf to omit the
> monitor for RAID0, then so such event occurred when restart mdmonitor
> service, but the system won't re-assemble these RAID0 MD after every
system
> reboot.
> > Do you have any good advice?
> 
> I do now...
> I've just committed the following patch which should suppress the message.
> It will be in mdadm-3.2.6 to be released soon.
> 
> NeilBrown
> 
> 
> 
> 
> 
> From f1661bd71bec6a8ae1919dc32a227c6fb37843f2 Mon Sep 17 00:00:00
> 2001
> From: NeilBrown <neilb@suse.de>
> Date: Wed, 24 Oct 2012 13:09:09 +1100
> Subject: [PATCH] Monitor: don't complain about non-monitorable arrays in
> mdadm.conf
> 
> If we are asked to monitor a RAID0 or Linear - which cannot be monitored -
we
> complain with "Device Disappeared .... Wrong-Level".
> 
> However if the RAID0 or Linear is being requested because it is in
mdadm.conf
> then the message is inappropriate and confusing.
> 
> So track which arrays are added from the config file, and suppress that
> message in that case.
> 
> Reported-by: "Johnson Yan" <johnson_yan@usish.com>
> Signed-off-by: NeilBrown <neilb@suse.de>
> 
> diff --git a/Monitor.c b/Monitor.c
> index 69cd8e0..c4d57c3 100644
> --- a/Monitor.c
> +++ b/Monitor.c
> @@ -37,6 +37,7 @@ struct state {
>  	int err;
>  	char *spare_group;
>  	int active, working, failed, spare, raid;
> +	int from_config;
>  	int expected_spares;
>  	int devstate[MAX_DISKS];
>  	dev_t devid[MAX_DISKS];
> @@ -178,6 +179,7 @@ int Monitor(struct mddev_dev *devlist,
>  			st->next = statelist;
>  			st->devnum = INT_MAX;
>  			st->percent = RESYNC_UNKNOWN;
> +			st->from_config = 1;
>  			st->expected_spares = mdlist->spare_disks;
>  			if (mdlist->spare_group)
>  				st->spare_group =
xstrdup(mdlist->spare_group); @@
> -475,7 +477,7 @@ static int check_array(struct state *st, struct
mdstat_ent
> *mdstat,
>  	 * have a device disappear than all of them that can
>  	 */
>  	if (array.level == 0 || array.level == -1) {
> -		if (!st->err)
> +		if (!st->err && !st->from_config)
>  			alert("DeviceDisappeared", dev, "Wrong-Level",
ainfo);
>  		st->err = 1;
>  		close(fd);
> 



      reply	other threads:[~2012-10-24  4:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-14 10:02 RAID0 DeviceDisappeared event happen when restart mdmonitor service Johnson Yan
2012-09-17  2:30 ` Jack Wang
2012-09-17  2:44   ` Johnson Yan
2012-09-17  2:48   ` NeilBrown
2012-09-17  3:03     ` Jack Wang
2012-09-17  3:23       ` Johnson Yan
2012-10-24  2:10         ` NeilBrown
2012-10-24  4:29           ` Johnson Yan [this message]

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='000301cdb1a0$20996560$61cc3020$@com' \
    --to=johnson_yan@usish.com \
    --cc=jack.wang.usish@gmail.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=neilb@suse.de \
    /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).