Hi Jan,

Jan Wagner schrieb am 28.03.2010 22:19:
> Hi Martin,

s/Martin/Christoph/

> 
> On Thursday 25 March 2010, Christoph Martin wrote:
>> Thanks for the last patch. There is another one:
>>
>> check_linux_raid should also warn if a md device is in resync mode
>> and not only if in recovory mode.
>>
>> *** /usr/lib/nagios/plugins/check_linux_raid.pl~        Fri Mar 19 12:06:24
>> 2010 --- /usr/lib/nagios/plugins/check_linux_raid.pl Wed Mar 24 00:21:04
>> 2010 ***************
>> *** 61,67 ****
>>                 if (defined $device) {
>>                         if (/(\[[_U]+\])/) {
>>                                 $status{$device} = $1;
>> !                       } elsif (/recovery = (.*?)\s/) {
>>                                 $recovery{$device} = $1;
>>                                 ($finish{$device}) = /finish=(.*?min)/;
>>                                 $device=undef;
>> --- 61,67 ----
>>                 if (defined $device) {
>>                         if (/(\[[_U]+\])/) {
>>                                 $status{$device} = $1;
>> !                       } elsif (/(recovery|resync) = (.*?)\s/) {
>>                                 $recovery{$device} = $1;
>>                                 ($finish{$device}) = /finish=(.*?min)/;
>>                                 $device=undef;
> 
> I'm not very familiar with mdadm, but how does you patch help here? Once a 
> month /etc/cron.d/mdadm is doing a resync.
> 
> # cat /proc/mdstat 
> Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] 
> [raid10] 
> md1 : active raid1 sda3[0] sdb3[1]
>       133821376 blocks [2/2] [UU]
>       [=====>...............]  check = 29.6% (39666624/133821376) 
> finish=24.1min speed=64932K/sec
> 
> unused devices: <none>
> 
> check_linux_raid is reporting "OK md1 status=[UU]." with and without of your 
> patch.
> Under which conditions matches your regex? Do you have an example and when 
> will this happen?

If with raid6 a disk fails, a automatic recovery is done with one
missing disk. With raid6 two disk may fail and the raid can be
recovered. If you add a good disk, after the recovery a resync is done
with state UUU_. Only after this resync it will get into state UUUU
again. This resync should generate a warning.

Christoph

<<attachment: martin.vcf>>

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to