| I just wrote the enclosed.
| open(IN,"</proc/mdstat");
| while (<IN>) {
|   if ( $_ =~ /\s+active\s+/ ) {
|     $_ =~ /\[(\d+)\/(\d+)\]/;
|     $count = $1;
|     $active = $2;
|     if ( "$active" ne "$count" ) {
|       @F = split(/\s+/);
|       print "Warning: /dev/$F[0] has a dead partition!\n";
|       print "$_";
|     }
|   }
| }

this is what I was wondering about ...  From looking at a number of different lines in 
mdstat for different array types, etc, there doesn't necessarily need to be that 
"[#/#]" section.  (for instance, raid0 & lvm stats don't have it)

I ended up using the previously posted "diff" script (check to see that current mdstat 
looks like previous "good" mdstat).  Simple, but it works to let me know if something 
changed.

thanks to all btw. 8)

-- 
Randomly Generated Tagline:
"... although it's better if you call it an osculating circle because nobody 
knows what it means.  Except those smarty-pants math professors..."
                                                        - Prof. Farr


Reply via email to