Skip to content

Max OS X kernel driver for providing access to external drive SMART data

Notifications You must be signed in to change notification settings

elvey/OS-X-SAT-SMART-Driver

 
 

Repository files navigation

OS X SAT SMART Driver
#####################

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. Check smartmontools list for supported devices:
http://smartmontools.org/wiki/Supported_USB-Devices 
If the Option column contains sat or jmicron, the driver should work.
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.

The code is based on Apple opensource files and is therefore published
under Apple Public Source License. For details see
http://www.opensource.apple.com/license/apsl/

Install
=======
 
 * Unmount external drives
 * Use the dmg image and the installer
 * Check DiskUtility. The disks should have "S.M.A.R.T. Status: Verified"


Uninstall
=========

 * Remove driver and plugin
    sudo rm -r /System/Library/Extensions/SATSMARTDriver.kext
    sudo rm -r /System/Library/Extensions/SATSMARTLib.plugin
 * Reboot


Compile
=======

 * Compile all targets
    make package

 * Unmount all existing external drives.

 * Load the kernel extension.
    sudo tail -f /private/var/log/kernel.log &
    sudo make install

 * The external drives should mount automatically.

 * Test
    cd SATSMARTDriver/build/Debug/
    ./smart_status
    ./smart_sample -a

 * Check DiskUtility. The disk should have "S.M.A.R.T. Status: Verified"

 * Install the driver to system permanently
    sudo make realinstall

 * Reboot

 * If you want to limit the driver for certain hardware add product 
   and vendor identification to SATSMARTDriver/Info.plist. For example:
			<key>Product Identification</key>
			<string>External</string>
			<key>Vendor Identification</key>
			<string>Generic</string>
   You can find out the identification string from io registry:
       ioreg -r -c IOSCSIPeripheralDeviceNub
..
+-o IOSCSIPeripheralDeviceNub  <class IOSCSIPeripheralDeviceNub, id 0x100000256$
  | {
  |   "IOProviderClass" = "IOSCSIProtocolServices"
  |   "Protocol Characteristics" = {"Physical Interconnect"="USB","Physical Int$
  |   "IOMatchCategory" = "SCSITaskUserClientIniter"
  |   "Product Revision Level" = "2.02"
  |   "IOProbeScore" = 0
  |   "Product Identification" = "External"
  |   "CFBundleIdentifier" = "com.apple.iokit.IOSCSIArchitectureModelFamily"
  |   "Vendor Identification" = "Generic"
  |   "IOClass" = "IOSCSIPeripheralDeviceNub"
  |   "Peripheral Device Type" = 0
  | }
..

About

Max OS X kernel driver for providing access to external drive SMART data

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 85.6%
  • C 12.9%
  • Shell 1.5%