I'm running a simple 1 TB RAID 1 array with mdadm on Ubuntu Server 10.10. I would like to simply check the status of each hard drive to make sure their both functional before it is too late. How could I easily do this?
|
Typically, what you wan is a package called smartmontools. It can query the SMART interface on your disks, which is in most modern disks. There is a daemon called smartd which can help you with continuous monitoring. However, if your system is a home server, just checking manually is often better. Like so: smartctl -a /dev/sda A lot of data spews forth. The stuff that most interest me are the following:
This gives you a way to measure the drive health subjectively. When the error rate starts going up, its time to look for a replacement. Also, you can check that they are not running hot. |
|||
|
|
|
Something like "mdadm --query --detail /dev/md0" should work, but when the drive actually fail, the root will receive an e-mail (it's the standard config on Centos and i believe on other distros as well). Just check that notification by failing (like: mdadm --manage /dev/md0 --fail /dev/sda1), and You will be 100% sure. |
|||
|
|
|
You are going to want to install smartd and look at your configuration options for it. For me I have it specifically monitoring my RAID disks:
This gives me drive monitoring for what I need. You can also setup smartd to do full drive tests at specified times. |
||||
|