* about:conf->recovery_disabled and mddev->recovery_disabled
@ 2012-04-07 9:13 majianpeng
2012-04-09 0:03 ` NeilBrown
2012-04-10 5:37 ` majianpeng
0 siblings, 2 replies; 3+ messages in thread
From: majianpeng @ 2012-04-07 9:13 UTC (permalink / raw)
To: Neil Brown; +Cc: linux-raid
Hi all:
I confused the recovery_disabled.
what's the mean when conf->recovery_disabled = mddev->recovery_disabled?
If equal,so not to add disk and not to recovery?
Thanks!
--------------
majianpeng
2012-04-07
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: about:conf->recovery_disabled and mddev->recovery_disabled
2012-04-07 9:13 about:conf->recovery_disabled and mddev->recovery_disabled majianpeng
@ 2012-04-09 0:03 ` NeilBrown
2012-04-10 5:37 ` majianpeng
1 sibling, 0 replies; 3+ messages in thread
From: NeilBrown @ 2012-04-09 0:03 UTC (permalink / raw)
To: majianpeng; +Cc: linux-raid
[-- Attachment #1: Type: text/plain, Size: 694 bytes --]
On Sat, 7 Apr 2012 17:13:22 +0800 "majianpeng" <majianpeng@gmail.com> wrote:
> Hi all:
> I confused the recovery_disabled.
> what's the mean when conf->recovery_disabled = mddev->recovery_disabled?
> If equal,so not to add disk and not to recovery?
Yes, exactly.
in an attempt to recover a device fails we don't want to immediately retry as
that would cause a loop.
So whenever a recovery fails, we set conf->recovery_disabled to match
mddev->recovery_disable. And whenever something changes which might make
recovery possible, we increment mddev->recovery_disabled, so that it tries
again.
With raid10, the 'recovery_disabled' is per-disk, not per-array.
NeilBrown
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Re: about:conf->recovery_disabled and mddev->recovery_disabled
2012-04-07 9:13 about:conf->recovery_disabled and mddev->recovery_disabled majianpeng
2012-04-09 0:03 ` NeilBrown
@ 2012-04-10 5:37 ` majianpeng
1 sibling, 0 replies; 3+ messages in thread
From: majianpeng @ 2012-04-10 5:37 UTC (permalink / raw)
To: NeilBrown; +Cc: linux-raid
I readed the raid1:error(),I can't understand this code:
/*
* If it is not operational, then we have already marked it as dead
* else if it is the last working disks, ignore the error, let the
* next level up know.
* else mark the drive as failed
*/
if (test_bit(In_sync, &rdev->flags)
&& (conf->raid_disks - mddev->degraded) == 1) {
/*
* Don't fail the drive, act as though we were just a
* normal single drive.
* However don't try a recovery from this drive as
* it is very likely to fail.
*/
conf->recovery_disabled = mddev->recovery_disabled;
return;
}
question 1:
If error occur and the raid1 is recoveying,but the error did not occur because recovery operation.The recovery will continue.
question 2:
when error occur,The disk may have to many error.so the code is :
conf->recovery_disabled = mddev->recovery_disabled;
But I can add a spare disk and recovery.
Is it correctly?
Thanks!
------------------
majianpeng
2012-04-10
-------------------------------------------------------------
发件人:NeilBrown
发送日期:2012-04-09 08:03:38
收件人:majianpeng
抄送:linux-raid
主题:Re: about:conf->recovery_disabled and mddev->recovery_disabled
On Sat, 7 Apr 2012 17:13:22 +0800 "majianpeng" <majianpeng@gmail.com> wrote:
> Hi all:
> I confused the recovery_disabled.
> what's the mean when conf->recovery_disabled = mddev->recovery_disabled?
> If equal,so not to add disk and not to recovery?
Yes, exactly.
in an attempt to recover a device fails we don't want to immediately retry as
that would cause a loop.
So whenever a recovery fails, we set conf->recovery_disabled to match
mddev->recovery_disable. And whenever something changes which might make
recovery possible, we increment mddev->recovery_disabled, so that it tries
again.
With raid10, the 'recovery_disabled' is per-disk, not per-array.
NeilBrown
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-04-10 5:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-07 9:13 about:conf->recovery_disabled and mddev->recovery_disabled majianpeng
2012-04-09 0:03 ` NeilBrown
2012-04-10 5:37 ` majianpeng
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).