Hi all, Recently I realize the filesystem became Read-only and there is "media error" message in the system log. It has passed several days without notice. I'm thinking of setting up a script to grep that "media error" and send email. Is there more elegant way of doing this?
Thank you.
On Fri, Feb 25, 2011 at 4:11 AM, Fajar Priyanto fajarpri@arinet.org wrote:
Hi all, Recently I realize the filesystem became Read-only and there is "media error" message in the system log. It has passed several days without notice. I'm thinking of setting up a script to grep that "media error" and send email. Is there more elegant way of doing this?
Thank you. _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Actions needed to be done:
Buy new disk Remove old disk Install OS on new disk Migrate data from old disk
done.
elegant way? but two new disks. configure mdadm to mail you if the array fails.
On Fri, Feb 25, 2011 at 07:12:59AM +0200, yonatan pingle wrote:
On Fri, Feb 25, 2011 at 4:11 AM, Fajar Priyanto fajarpri@arinet.org wrote:
Hi all, Recently I realize the filesystem became Read-only and there is "media error" message in the system log. It has passed several days without notice. I'm thinking of setting up a script to grep that "media error" and send email. Is there more elegant way of doing this?
Thank you. _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Actions needed to be done:
Buy new disk Remove old disk Install OS on new disk Migrate data from old disk
done.
elegant way? but two new disks. configure mdadm to mail you if the array fails.
It's better to configure smartd. With it you can get mails informing you about relocations, errors, etc from a single disk. Probably it would be lot of such mails before array corruption. So you'll have some time for schedule downtime and swap faulty disk.
Recently I realize the filesystem became Read-only and there is "media error" message in the system log. It has passed several days without notice. I'm thinking of setting up a script to grep that "media error" and send
email.
Is there more elegant way of doing this?
This doesn't really answer your question, but if you issue the command "smartctl -a /dev/sdx" and see either a Reallocated sectors count, or a Current Pending sector count that's greater than 0, then you need to keep an eye on the drive. It could be failing. (replace /dev/sdx in the command with your drive's actual device)
Reallocated sectors count is for failed write attempts, and that number tends to grow after the count gets larger than 0.
Current pending sector count is for failed read attempts, which could be a fluke and might correct itself later. It's not as serious as Reallocated sectors.