Install this kernel driver so OS X can monitor the S.M.A.R.T. diagnostic data for external drives

EDIT: Sorry to say that it appears this no longer works in MacOS. Every time Apple upgrades MacOS, things that formerly worked perfectly seem to break, and this program is one of those things that apparently no longer works. The code is available on GitHub, so if you care and if you are a programmer, maybe you can fork and fix it.

If you use OS X and have ever gone into Disk Utility, you may have noticed that OS X cannot monitor the S.M.A.R.T. status of external drives connected via USB or Firewire. To fix that, all you need do is install this kernel driver:

S.M.A.R.T. for USB and FireWire Drives (MacUpdate)

S.M.A.R.T. Status - VerifiedAt the time we are writing this article, there are two versions available, “Stable” version 0.8 and “Beta” version 0.9. We went ahead and installed the 0.9 beta on a system running OS X Mavericks. At first, when we fired up Disk Utility and looked at our external drives, it didn’t appear that the driver had worked — it still showed “S.M.A.R.T. Status : Not Supported” for each of the drives. But then we discovered the secret — after installing the driver, you must unmount each of your external drives, then power cycle them. That is, actually disconnect the power to each drive for a few seconds, then reconnect it. When it powers back up, OS X should automatically detect and remount it, and then if your drive is supported, you should see “S.M.A.R.T. Status : Verified” for that drive in Disk Utility.  It is NOT sufficient to unmount and remount the drive, you must power cycle it. Alternately, a full system reboot would likely also work.

Unfortunately, this driver will not work with all external drives. The project page (where the source code is available) notes:

This is a kernel driver for Mac OS X external USB or FireWire drives. It extends the standard driver behaviour by providing access to drive SMART data. The interface to SMART data is same as with ATA family driver, so most existing applications should work.

The driver requires a SAT (SCSI ATA Translation) capable external drive enclosure. The driver should work with Snow Leopard and Lion and Mountain Lion. People have reported problems with Lion and Encrypted volumes. Some enclosures are reported to work with FireWire but not with USB. The driver is not compatible to WD Drive Manager, or enclosures with custom kernel extensions.

As noted above, we installed the 0.9 beta version on a system running Mavericks, and it appears to be working great, so they probably should add that to the list. We have three Western Digital external drives connected, and the driver is working for all three. We suspect it will work with most consumer-grade external USB drives. However, if you buy your own external drive enclosure and mount an internal drive in it, then the chances that it will work are probably a bit lower. If it doesn’t work for you, or for some other reason you want to remove it from your system, simply enter the following two commands from a terminal window:

sudo rm -r /System/Library/Extensions/SATSMARTDriver.kext
sudo rm -r /System/Library/Extensions/SATSMARTLib.plugin

and then reboot your system.

It’s great to be able to check the S.M.A.R.T. status of your external drives right from the OS X disk utility. Apple should purchase the code from the author of this project, make any necessary tweaks to ensure that it is stable, and include it by default in upgrades and future versions of OS X!

Link: Monit: Disk space monitoring

 

Important
This is an edited version of a post that originally appeared on a blog called The Michigan Telephone Blog, which was written by a friend before he decided to stop blogging. It is reposted with his permission. Comments dated before the year 2013 were originally posted to his blog.

This article was originally posted in February, 2011 and may be out of date. You may also wish to read Link: How to Install and Setup Monit (Linux Process and Services Monitoring) Program.

A hard disk drive with the platters and motor ...
Image via Wikipedia

Here’s an article that will be helpful to may of you who are running PBX servers under CentOS, especially (but not limited to) those running on virtual machines with low disk storage space.  Note that if you installed from an “all-in-one” distribution ISO, this possibly might already be installed, but may still need to be configured.

One thing you definitely don’t want to happen to your server is for it to run out of disk space, especially the root partition.

There are lots of pieces of open source monitoring software, a popular one being monit.

Below is a quick guide to installing monit and generating alert e-mails for disk space and cpu/memory usage. The installation was done on a SysAdminMan VPS running CentOS 5.5

Full article here (SysAdminMan)

The instructions should work for any system running CentOS 5.5.  You might be tempted to take a shortcut and just do “yum install monit” but please be aware that (at least as of the day I’m writing this) it will get you a much older version of the software, so I suggest you stick with the instructions in the article.  I have just now installed this on one system and have not fully tested it, but it did send an e-mail confirming that it had started.

This is just another tool you can use to make your life a little easier and help you avoid a problem before it becomes a major headache!