Here are the lines I added to my drivers/md/md.c , function md_seq_show,
to let /proc/mdstat show read errors on devices, if any:
} else if (rdev->raid_disk < 0)
seq_printf(seq, "(S)"); /* spare */
+ if (atomic_read(&rdev->read_errors) ||
+ atomic_read(&rdev->corrected_errors) )
+ seq_printf(seq, "(R:%u:%u)",
+ (unsigned int) atomic_read(&rdev->read_errors),
+ (unsigned int) atomic_read(&rdev->corrected_errors));
sectors += rdev->sectors;
}
Into md.h i see:
atomic_t read_errors;
/* number of consecutive read errors that we have tried to ignore. */
atomic_t corrected_errors;
/* number of corrected read errors, for reporting to userspace and
storing in superblock. */
Ok for the second.. but I'm not sure about the meaning of the first
one... and seems it's not reported by /sys/block/mdXX/dev-YY .. can it
just be ignored?
Sample output:
md0 : active raid5 sdb1[1](R:0:36) sda1[0] sdc1[2]
4192768 blocks level 5, 64k chunk, algorithm 2 [3/3] [UUU]
Regards
Giovanni
--
Yours faithfully.
Giovanni Tessore
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html