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@xxxxxxxxx> 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
?韬{.n?????%??檩??w?{.n???{炳盯w???塄}?财??j:+v??????2??璀??摺?囤??z夸z罐?+?????w棹f
[ATA RAID]
[Linux SCSI Target Infrastructure]
[Managing RAID on Linux]
[Linux IDE]
[Linux SCSI]
[Linux Hams]
[Device-Mapper]
[Kernel]
[Linux Books]
[Linux Admin]
[Linux Net]
[GFS]
[RPM]
[git]
[Photos]
[Yosemite Photos]
[Yosemite News]
[AMD 64]
[Linux Networking]