Beberapa provider dedicated server memberikan kita opsi untuk menggunakan Software RAID dalam menggunakan dedicated server yang mereka tawarkan. Yang jadi masalah, sering juga dalam menggunakan dedicated server itu hanya RAID 1 saja yang disetup tapi tidak disediakan fitur monitoring kondisi disk yang sedang berjalan. RAID hanya berguna kalau kita tahu salah satu disk ada yang rusak, kalau tidak tahu ya percuma juga. Nah bagaimana cara setting supaya kondisi kesehatan harddisk termonitor sehingga kita bisa melakukan RAID dengan baik dan benar?
Berikut kami quote dari website ioflood:
Easy instructions for setting up mdadm / software raid email alerts for failed drives in Centos, Ubuntu, and Debian:
First off, start by editing the following file.
On Centos:
nano /etc/mdadm.confOn Debian / Ubuntu:
nano /etc/mdadm/mdadm.confMake sure the configuration file it has the following line in it. If it doesn’t, copy and paste it in there:
DEVICE partitionsAlso add to this file the email address you’d like to have receive notifications:
MAILADDR bill@ted.comAnd then save the file and exit.
Next we run the process and make sure it runs without error.
/sbin/mdadm --monitor --scan --daemonizeIf this works correctly, we will want to make sure that this command runs at boot time. Edit the following file:
nano /etc/rc.localAnd copy and paste the line near the end of the file:
/sbin/mdadm --monitor --scan --daemonizeWARNING: The last line in /etc/rc.local for Debian (and possibly Ubuntu installs) is “exit 0” so you need to make sure that the command above goes BEFORE that line otherwise it will never run.
Finally, if you’d like to test that emails are being sent properly, you can run the following command:
/sbin/mdadm --monitor --scan --testThis will send you an email regarding the current status of your raid arrays. Be sure to whitelist these emails so that when a real raid alert comes in, your email provider doesn’t send it to your spam box!
Mengatasi Masalah Saat Testing
Setelah kami menjalankan langkah demi langkah setting madm di atas, saat kami mencoba menjalankan test, muncul peringatan sebagai berikut di server kami;
[root@s2 ~]# /sbin/mdadm –monitor –scan –test
mdadm: Only one autorebuild process allowed in scan mode, aborting
Ini dikarenakan hanya boleh ada satu process mdadm berjalan, jadi kita matikan dulu semua proses mdadm yg berjalan, dengan command killall mdadm. Setelah itu kita lakukan command untuk test di atas.
Mengecek Status SSD
This command lists the status of the SSD:
smartctl -ax /dev/sda smartctl -ax /dev/sdb
This command performs a short test of the SSD:
smartctl -t short /dev/sda
Referensi:
http://www.linuxquestions.org/questions/linux-newbie-8/mdadm-email-notification-4175468772/
Leave a Reply