How can I be notified immediately when a drive on my Linux server fails?
You can configure RAID to notify you immediately when a there is a problem with a drive on your Linux dedicated server. How you do this depends on which RAID driver your server has.
To Determine Your Server's RAID Driver
- Connect to your Linux dedicated server using SSH.
- Use the following command:
lspci
The command returns one of the following:
- Highpoint returns
07:04.0 SCSI storage controller: HighPoint Technologies, Inc. RocketRAID 1720 (2x SATA II RAID Controller) (rev 02)
.NOTE: Older Highpoint drivers return a similar value.
- IMSM (Intel Matrix Storage Manager) returns
00:1f.2 RAID bus controller: Intel Corporation 82801 SATA Controller [RAID mode] (rev 05)
.
NOTE: RAID automatically sends server notifications to our Dedicated Hosting support team. We recommend that you continue to use this configuration and simply add yourself to the notification list. Any other changes to your RAID configuration could result in a hard drive failure going undetected.
Highpoints
To Add Your Email to the RAID Notification List
- Connect to your Linux dedicated server using SSH.
- From the command prompt, type
su
. - Enter the password you created when you set up your dedicated server.
- At the command prompt, type:
hptraidconf
- For your user name, type
RAID
. For your password, typehpt
. - From the Highpoint CLI prompt, type:
- To confirm that you were added to the notification list, type:
Where "name" is your name, "email@coolexample.com" is your email address, and "options" are either "Inf" (Information), "War" (Warning), or "Err" (Error) — depending on the type of problems you want to be notified about.
Your name and email address should display in the mail recipient list along with the name and email address for your dedicated support team. If you have any problems adding yourself to your RAID notification list, please contact Customer Support.
IMSM
To Add Your Email to the RAID Notification List
- Connect to your Linux dedicated server using SSH.
- Use
su
to become the root user. - Modify the MAILADDR line of the
/etc/mdam.conf
file to contain your email address. Alternatively, use the following command:sed -ie 's/^MAILADDR.*/MAILADDR myemailaddress@coolexample.com/' /etc/mdadm.confWheremyemailaddress@coolexample.com
is your email address.
You can verify the edit by using grep to search /etc/mdam.conf
for MAILADDR:
If the change did not successfully save, it returns the following:
If the change did successfully save, it returns the following: