[Pkg-nagios-devel] Bug#575382: Bug#575382: nagios-plugins-standard: check_linux_raid does not warn if resync is in process

Christoph Martin martin at uni-mainz.de
Sun Mar 28 21:06:10 UTC 2010


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: martin.vcf
Type: text/x-vcard
Size: 370 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-nagios-devel/attachments/20100328/6e611ecc/attachment.vcf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-nagios-devel/attachments/20100328/6e611ecc/attachment.pgp>


More information about the Pkg-nagios-devel mailing list