linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RAID0 DeviceDisappeared event happen when restart mdmonitor service
@ 2012-09-14 10:02 Johnson Yan
  2012-09-17  2:30 ` Jack Wang
  0 siblings, 1 reply; 8+ messages in thread
From: Johnson Yan @ 2012-09-14 10:02 UTC (permalink / raw)
  To: linux-raid

Hi All,
When I restart mdmonitor service, a notify email will be received, which
indicate DeviceDisappeared event happened for RAID0, is this phenomenon
reasonable? Could anyone explain this? 


The email info as below
......
Host            : host3.com
Event           : DeviceDisappeared
MD Device       : /dev/md1
......

[root@host3 ~]# service mdmonitor restart
Killing mdmonitor:                                         [  OK  ]
Starting mdmonitor:                                        [  OK  ]
[root@host3 ~]#
[root@host3 ~]# cat /proc/mdstat
Personalities : [raid1] [raid0] 
md1 : active raid0 sda1[1] sdb1[0]
      927933312 blocks super 1.2 64k chunks
      
md2 : active raid1 sdc1[1] sde1[0]
      292836160 blocks super 1.2 [2/2] [UU]
      bitmap: 0/2 pages [0KB], 131072KB chunk

md0 : active raid1 sdf1[0] sdg1[1]
      488254272 blocks super 1.2 [2/2] [UU]
      bitmap: 0/2 pages [0KB], 131072KB chunk

unused devices: <none>
[root@host3 ~]# 
[root@host3 ~]# uname -r
3.2.28-11.el6.x86_64
[root@host3 ~]# 
[root@host3 ~]# mdadm -V
mdadm - v3.2.5 - 18th May 2012
[root@host3 ~]# 


Thanks in advance.
Johnson Yan



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: RAID0 DeviceDisappeared event happen when restart mdmonitor service
  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
  0 siblings, 2 replies; 8+ messages in thread
From: Jack Wang @ 2012-09-17  2:30 UTC (permalink / raw)
  To: Johnson Yan; +Cc: linux-raid

I check into code in mdmonitor.c in function check_array:

	fd = open(dev, O_RDONLY);
	if (fd < 0) {
		if (!st->err)
			alert("DeviceDisappeared", dev, NULL, ainfo);
		st->err=1;
		return 0;
	}
	fcntl(fd, F_SETFD, FD_CLOEXEC);
	if (ioctl(fd, GET_ARRAY_INFO, &array)<0) {
		if (!st->err)
			alert("DeviceDisappeared", dev, NULL, ainfo);
		st->err=1;
		close(fd);
		return 0;
	}
	/* It's much easier to list what array levels can't
	 * have a device disappear than all of them that can
	 */
	if (array.level == 0 || array.level == -1) {
		if (!st->err)
			alert("DeviceDisappeared", dev, "Wrong-Level", ainfo);
		st->err = 1;
		close(fd);
		return 0;
	}

I suspect above code lead to the DeviceDisapeared event you see, not
sure why this get GET_ARRAY_INFO return array.level == 0 means Device
Disappeared?

Anyone who more familiar with the logic may gave a comment?


Best regards!

Jack

2012/9/14 Johnson Yan <johnson_yan@usish.com>:
> Hi All,
> When I restart mdmonitor service, a notify email will be received, which
> indicate DeviceDisappeared event happened for RAID0, is this phenomenon
> reasonable? Could anyone explain this?
>
>
> The email info as below
> ......
> Host            : host3.com
> Event           : DeviceDisappeared
> MD Device       : /dev/md1
> ......
>
> [root@host3 ~]# service mdmonitor restart
> Killing mdmonitor:                                         [  OK  ]
> Starting mdmonitor:                                        [  OK  ]
> [root@host3 ~]#
> [root@host3 ~]# cat /proc/mdstat
> Personalities : [raid1] [raid0]
> md1 : active raid0 sda1[1] sdb1[0]
>       927933312 blocks super 1.2 64k chunks
>
> md2 : active raid1 sdc1[1] sde1[0]
>       292836160 blocks super 1.2 [2/2] [UU]
>       bitmap: 0/2 pages [0KB], 131072KB chunk
>
> md0 : active raid1 sdf1[0] sdg1[1]
>       488254272 blocks super 1.2 [2/2] [UU]
>       bitmap: 0/2 pages [0KB], 131072KB chunk
>
> unused devices: <none>
> [root@host3 ~]#
> [root@host3 ~]# uname -r
> 3.2.28-11.el6.x86_64
> [root@host3 ~]#
> [root@host3 ~]# mdadm -V
> mdadm - v3.2.5 - 18th May 2012
> [root@host3 ~]#
>
>
> Thanks in advance.
> Johnson Yan
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: RAID0 DeviceDisappeared event happen when restart mdmonitor service
  2012-09-17  2:30 ` Jack Wang
@ 2012-09-17  2:44   ` Johnson Yan
  2012-09-17  2:48   ` NeilBrown
  1 sibling, 0 replies; 8+ messages in thread
From: Johnson Yan @ 2012-09-17  2:44 UTC (permalink / raw)
  To: 'Jack Wang'; +Cc: linux-raid

Hi Jack,
Thanks for your feedback.

This event should be caused by following code, due to the field "Wrong-Level" can be found in the notify email.

	/* It's much easier to list what array levels can't
	 * have a device disappear than all of them that can
	 */
	if (array.level == 0 || array.level == -1) {
		if (!st->err)
			alert("DeviceDisappeared", dev, "Wrong-Level", ainfo);
		st->err = 1;
		close(fd);
		return 0;
	}

Best Regards,
Johnson

-----Original Message-----
From: Jack Wang [mailto:jack.wang.usish@gmail.com] 
Sent: Monday, September 17, 2012 10:31 AM
To: Johnson Yan
Cc: linux-raid@vger.kernel.org
Subject: Re: RAID0 DeviceDisappeared event happen when restart mdmonitor service

I check into code in mdmonitor.c in function check_array:

	fd = open(dev, O_RDONLY);
	if (fd < 0) {
		if (!st->err)
			alert("DeviceDisappeared", dev, NULL, ainfo);
		st->err=1;
		return 0;
	}
	fcntl(fd, F_SETFD, FD_CLOEXEC);
	if (ioctl(fd, GET_ARRAY_INFO, &array)<0) {
		if (!st->err)
			alert("DeviceDisappeared", dev, NULL, ainfo);
		st->err=1;
		close(fd);
		return 0;
	}
	/* It's much easier to list what array levels can't
	 * have a device disappear than all of them that can
	 */
	if (array.level == 0 || array.level == -1) {
		if (!st->err)
			alert("DeviceDisappeared", dev, "Wrong-Level", ainfo);
		st->err = 1;
		close(fd);
		return 0;
	}

I suspect above code lead to the DeviceDisapeared event you see, not sure why this get GET_ARRAY_INFO return array.level == 0 means Device Disappeared?

Anyone who more familiar with the logic may gave a comment?


Best regards!

Jack

2012/9/14 Johnson Yan <johnson_yan@usish.com>:
> Hi All,
> When I restart mdmonitor service, a notify email will be received, 
> which indicate DeviceDisappeared event happened for RAID0, is this 
> phenomenon reasonable? Could anyone explain this?
>
>
> The email info as below
> ......
> Host            : host3.com
> Event           : DeviceDisappeared
> MD Device       : /dev/md1
> ......
>
> [root@host3 ~]# service mdmonitor restart
> Killing mdmonitor:                                         [  OK  ]
> Starting mdmonitor:                                        [  OK  ]
> [root@host3 ~]#
> [root@host3 ~]# cat /proc/mdstat
> Personalities : [raid1] [raid0]
> md1 : active raid0 sda1[1] sdb1[0]
>       927933312 blocks super 1.2 64k chunks
>
> md2 : active raid1 sdc1[1] sde1[0]
>       292836160 blocks super 1.2 [2/2] [UU]
>       bitmap: 0/2 pages [0KB], 131072KB chunk
>
> md0 : active raid1 sdf1[0] sdg1[1]
>       488254272 blocks super 1.2 [2/2] [UU]
>       bitmap: 0/2 pages [0KB], 131072KB chunk
>
> unused devices: <none>
> [root@host3 ~]#
> [root@host3 ~]# uname -r
> 3.2.28-11.el6.x86_64
> [root@host3 ~]#
> [root@host3 ~]# mdadm -V
> mdadm - v3.2.5 - 18th May 2012
> [root@host3 ~]#
>
>
> Thanks in advance.
> Johnson Yan
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-raid" 
> in the body of a message to majordomo@vger.kernel.org More majordomo 
> info at  http://vger.kernel.org/majordomo-info.html


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: RAID0 DeviceDisappeared event happen when restart mdmonitor service
  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
  1 sibling, 1 reply; 8+ messages in thread
From: NeilBrown @ 2012-09-17  2:48 UTC (permalink / raw)
  To: Jack Wang; +Cc: Johnson Yan, linux-raid

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

On Mon, 17 Sep 2012 10:30:49 +0800 Jack Wang <jack.wang.usish@gmail.com>
wrote:

> I check into code in mdmonitor.c in function check_array:
> 
> 	fd = open(dev, O_RDONLY);
> 	if (fd < 0) {
> 		if (!st->err)
> 			alert("DeviceDisappeared", dev, NULL, ainfo);
> 		st->err=1;
> 		return 0;
> 	}
> 	fcntl(fd, F_SETFD, FD_CLOEXEC);
> 	if (ioctl(fd, GET_ARRAY_INFO, &array)<0) {
> 		if (!st->err)
> 			alert("DeviceDisappeared", dev, NULL, ainfo);
> 		st->err=1;
> 		close(fd);
> 		return 0;
> 	}
> 	/* It's much easier to list what array levels can't
> 	 * have a device disappear than all of them that can
> 	 */
> 	if (array.level == 0 || array.level == -1) {
> 		if (!st->err)
> 			alert("DeviceDisappeared", dev, "Wrong-Level", ainfo);
> 		st->err = 1;
> 		close(fd);
> 		return 0;
> 	}
> 
> I suspect above code lead to the DeviceDisapeared event you see, not
> sure why this get GET_ARRAY_INFO return array.level == 0 means Device
> Disappeared?
> 
> Anyone who more familiar with the logic may gave a comment?


It isn't possible or meaningful to monitor RAID0 devices - there is nothing
to see, nothing that can happen, nothing to report.

mdadm will normally completely ignore RAID0 devices.

If you run
  mdadm --monitor /dev/md1

when md1 is a RAID0 device, then it will be required to actively forget about
it, so it reports that the device has disappeared (because it was on the
list, but now isn't).

This shouldn't happen if you run "mdadm --monitor --scan" which is the
standard usage.  It that what is happening?

NeilBrown



> 
> 
> Best regards!
> 
> Jack
> 
> 2012/9/14 Johnson Yan <johnson_yan@usish.com>:
> > Hi All,
> > When I restart mdmonitor service, a notify email will be received, which
> > indicate DeviceDisappeared event happened for RAID0, is this phenomenon
> > reasonable? Could anyone explain this?
> >
> >
> > The email info as below
> > ......
> > Host            : host3.com
> > Event           : DeviceDisappeared
> > MD Device       : /dev/md1
> > ......
> >
> > [root@host3 ~]# service mdmonitor restart
> > Killing mdmonitor:                                         [  OK  ]
> > Starting mdmonitor:                                        [  OK  ]
> > [root@host3 ~]#
> > [root@host3 ~]# cat /proc/mdstat
> > Personalities : [raid1] [raid0]
> > md1 : active raid0 sda1[1] sdb1[0]
> >       927933312 blocks super 1.2 64k chunks
> >
> > md2 : active raid1 sdc1[1] sde1[0]
> >       292836160 blocks super 1.2 [2/2] [UU]
> >       bitmap: 0/2 pages [0KB], 131072KB chunk
> >
> > md0 : active raid1 sdf1[0] sdg1[1]
> >       488254272 blocks super 1.2 [2/2] [UU]
> >       bitmap: 0/2 pages [0KB], 131072KB chunk
> >
> > unused devices: <none>
> > [root@host3 ~]#
> > [root@host3 ~]# uname -r
> > 3.2.28-11.el6.x86_64
> > [root@host3 ~]#
> > [root@host3 ~]# mdadm -V
> > mdadm - v3.2.5 - 18th May 2012
> > [root@host3 ~]#
> >
> >
> > Thanks in advance.
> > Johnson Yan
> >
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> --
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: RAID0 DeviceDisappeared event happen when restart mdmonitor service
  2012-09-17  2:48   ` NeilBrown
@ 2012-09-17  3:03     ` Jack Wang
  2012-09-17  3:23       ` Johnson Yan
  0 siblings, 1 reply; 8+ messages in thread
From: Jack Wang @ 2012-09-17  3:03 UTC (permalink / raw)
  To: NeilBrown; +Cc: Johnson Yan, linux-raid

2012/9/17 NeilBrown <neilb@suse.de>:
> On Mon, 17 Sep 2012 10:30:49 +0800 Jack Wang <jack.wang.usish@gmail.com>
> wrote:
>
>> I check into code in mdmonitor.c in function check_array:
>>
>>       fd = open(dev, O_RDONLY);
>>       if (fd < 0) {
>>               if (!st->err)
>>                       alert("DeviceDisappeared", dev, NULL, ainfo);
>>               st->err=1;
>>               return 0;
>>       }
>>       fcntl(fd, F_SETFD, FD_CLOEXEC);
>>       if (ioctl(fd, GET_ARRAY_INFO, &array)<0) {
>>               if (!st->err)
>>                       alert("DeviceDisappeared", dev, NULL, ainfo);
>>               st->err=1;
>>               close(fd);
>>               return 0;
>>       }
>>       /* It's much easier to list what array levels can't
>>        * have a device disappear than all of them that can
>>        */
>>       if (array.level == 0 || array.level == -1) {
>>               if (!st->err)
>>                       alert("DeviceDisappeared", dev, "Wrong-Level", ainfo);
>>               st->err = 1;
>>               close(fd);
>>               return 0;
>>       }
>>
>> I suspect above code lead to the DeviceDisapeared event you see, not
>> sure why this get GET_ARRAY_INFO return array.level == 0 means Device
>> Disappeared?
>>
>> Anyone who more familiar with the logic may gave a comment?
>
>
> It isn't possible or meaningful to monitor RAID0 devices - there is nothing
> to see, nothing that can happen, nothing to report.
>
> mdadm will normally completely ignore RAID0 devices.
>
> If you run
>   mdadm --monitor /dev/md1
>
> when md1 is a RAID0 device, then it will be required to actively forget about
> it, so it reports that the device has disappeared (because it was on the
> list, but now isn't).
>
> This shouldn't happen if you run "mdadm --monitor --scan" which is the
> standard usage.  It that what is happening?
>
> NeilBrown
>
Thanks Neil for always kindly help.
The device disappeared event report when restart mdmonitor service,
which will mdadm with options PIDFILE=/var/run/mdadm/mdadm.pid
PATH=/sbin:/usr/sbin:$PATH
RETVAL=0
OPTIONS="-F -y -f -s -i $PIDFILE"

And I checked man page of mdadm which clear claimed :


 DeviceDisappeared
                  An  md  array  which previously was configured appears to no
                  longer be configured. (syslog priority: Critical)

                  If mdadm was told to monitor an array which is RAID0 or Lin-
                  ear,  then  it  will report DeviceDisappeared with the extra
                  information Wrong-Level.  This is because RAID0  and  Linear
                  do not support the device-failed, hot-spare and resync oper-
                  ations which are monitored.

Thanks again for your time.

Jack

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: RAID0 DeviceDisappeared event happen when restart mdmonitor service
  2012-09-17  3:03     ` Jack Wang
@ 2012-09-17  3:23       ` Johnson Yan
  2012-10-24  2:10         ` NeilBrown
  0 siblings, 1 reply; 8+ messages in thread
From: Johnson Yan @ 2012-09-17  3:23 UTC (permalink / raw)
  To: 'Jack Wang', 'NeilBrown'; +Cc: linux-raid

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?

Best Regards,
Johnson

> Thanks Neil for always kindly help.
> The device disappeared event report when restart mdmonitor service, which
> will mdadm with options PIDFILE=/var/run/mdadm/mdadm.pid
> PATH=/sbin:/usr/sbin:$PATH
> RETVAL=0
> OPTIONS="-F -y -f -s -i $PIDFILE"
> 
> And I checked man page of mdadm which clear claimed :
> 
> 
>  DeviceDisappeared
>                   An  md  array  which previously was configured
> appears to no
>                   longer be configured. (syslog priority: Critical)
> 
>                   If mdadm was told to monitor an array which is RAID0 or
> Lin-
>                   ear,  then  it  will report DeviceDisappeared with the
> extra
>                   information Wrong-Level.  This is because RAID0  and
> Linear
>                   do not support the device-failed, hot-spare and resync
> oper-
>                   ations which are monitored.
> 
> Thanks again for your time.
> 
> Jack




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: RAID0 DeviceDisappeared event happen when restart mdmonitor service
  2012-09-17  3:23       ` Johnson Yan
@ 2012-10-24  2:10         ` NeilBrown
  2012-10-24  4:29           ` Johnson Yan
  0 siblings, 1 reply; 8+ messages in thread
From: NeilBrown @ 2012-10-24  2:10 UTC (permalink / raw)
  To: Johnson Yan; +Cc: 'Jack Wang', linux-raid

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

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);



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

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* RE: RAID0 DeviceDisappeared event happen when restart mdmonitor service
  2012-10-24  2:10         ` NeilBrown
@ 2012-10-24  4:29           ` Johnson Yan
  0 siblings, 0 replies; 8+ messages in thread
From: Johnson Yan @ 2012-10-24  4:29 UTC (permalink / raw)
  To: 'NeilBrown'; +Cc: 'Jack Wang', linux-raid

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);
> 



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-10-24  4:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).