#25 closed enhancement (worksforme)
SCSI pass through for SMART via USB on MacOSX smartmontools? 3rd party code available!
Reported by: | putzfetzenorg | Owned by: | cooties |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | all | Version: | 5.39 |
Keywords: | macosx | Cc: | kvs |
Description
Dear smartmontools developers!
Until the very recent version of smartmontools (5.39), SMART through USB was not possible on Mac OS X, because the Mac OS X kernel does not support SCSI pass through (reasoning of Christian Franke).
Meanwhile I googled for:
http://www.google.com/search?q=mac+osx+scsi+passthrough+usb
And found a person, who wrote a SCSI pass through driver for Mac OS X:
http://tinyco.de/2009/02/04/writing-a-mac-osx-usb-device-driver-with-scsi-pass-through.html
In the site's comment section I asked as Stefan Nowak whether this code could be used for passing through SMART:
http://tinyco.de/2009/02/04/writing-a-mac-osx-usb-device-driver-with-scsi-pass-through.html#comment-24129787
And the developer answered within the site's comment section as wagerlabs, that it should work:
http://tinyco.de/2009/02/04/writing-a-mac-osx-usb-device-driver-with-scsi-pass-through.html#comment-24130057
I don't know low-level coding, otherwise I would offer my help. Please, dear Darwin related smartmontools developers: Could you built SMART through USB support into the Mac version of smartmontools?
Regards, Stefan Nowak
Change History (30)
comment:1 by , 15 years ago
Summary: | SCSI pass through for SMART via USB on MacOSX Rsync? 3rd party code available! → SCSI pass through for SMART via USB on MacOSX smartmontools? 3rd party code available! |
---|
comment:2 by , 15 years ago
Version: | → 5.39 |
---|
comment:3 by , 14 years ago
Owner: | changed from | to
---|---|
Status: | new → accepted |
comment:4 by , 14 years ago
comment:5 by , 14 years ago
Keywords: | macosx added; mac usb scsi-pass-through removed |
---|
comment:7 by , 14 years ago
Cc: | added |
---|
Would http://www.makemkv.com/download/daspi/ be of any help? It's described as a SCSI passthrough driver, but only for CD/DVDs. I don't know if that's an artificial limitation, but maybe it'd be a starting point?
comment:8 by , 14 years ago
@kvs: I can't tell. I started the request. But eventually only some low level savvy programmers can implement it.
@Dear pro folk: Can the "tinyco" or "daspi" drivers be integrated to achieve SCSI pass through?
comment:9 by , 13 years ago
Would you try this out: https://github.com/kasbert/OS-X-SAT-SMART-Driver ?
I use Snow Leopard (OS X 10.6.8), but it should work with other versions, too.
follow-up: 11 comment:10 by , 13 years ago
I've had to tweak kasperx's driver a little bit, but now smartmontools can indeed access the SMART data on compatible devices, over USB and FW800 (MBP 13" under OS X 10.6.8; 64bit mode).
comment:11 by , 13 years ago
Replying to rjvbertin:
... but now smartmontools can indeed access the SMART data on compatible devices, over USB and FW800 ...
Does this require any enhancements to os_darwin.cpp ? If yes, please provide the patch as an attachment.
comment:12 by , 13 years ago
No, apparently the claim in the kext documentation is correct that it functions transparently. From what I understand it looks like it only does the equivalent of -d sat,12 though (maybe that's why I've gotten my enclosure to work by accepting a CHECK_CONDITION status return when trying to read SMART data?).
It also looks like I'd have to contact the developer to get my tweaks committed.
comment:13 by , 13 years ago
I'd like to beta-test this, if it is of help.
Could you please provide a source-code or binary package?
Thanks!
comment:14 by , 13 years ago
With pleasure: check the DMG at https://github.com/RJVB/OS-X-SAT-SMART-Driver .
comment:15 by , 13 years ago
Thanks. Now before I go into hours of trial'n'error, could you please give instructions on how to use this driver extension in conjunction with smartctl. Thanks.
As far as I understand now:
1) Install the driver extension. (Description says this does not affect USB/Firewire transfer, but only extend the driver to support the pass-through)
2) Attach USB/Firewire drive.
3) smartmontools <which-options-?> <which-addressing-?>
follow-up: 17 comment:16 by , 13 years ago
Indeed. Unmount any external drives you may have mounted before installing the driver extension. Then install, attach/mount the external, and execute smartctl -a /dev/diskN where N is the number attributed to your external. (You'd obtain the appropriate device by executing mount or df in a shell.)
From what I've seen there's no need to use smartctl's -d option - I guess the driver presents all supported hardware as ATA drives even if it's SATA inside.
BTW: neither SAT-SMART-DRIVER nor smartmontools@linux recognise my OWC ATA enclosure, while it is recognised by SpeedFan under MS Windows. Sadly, my desktop enclosure (a DMI/Storeva SilverDrive) doesn't appear to support SMART at all, and it's the oldest disk I currently use...
follow-up: 20 comment:17 by , 13 years ago
ATA and SATA SMART commands are the same.
The OWC enclosure (USB ID?) likely supports some vendor specific pass-through command which may or may not be supported by smartmontools. Please try smartctl -d usbcypress
or usbjmicron
or usbsunplus
under Linux or Windows (This won't work on Mac OS X because this driver does not provide real SCSI pass-through functionality).
follow-up: 22 comment:18 by , 13 years ago
I report: Total success with all my USB + Firewire drives!
Test results in detail:
Remarks:
- USB IDs were obtained from Mac OS X System Profiler.
- Model family + device model was autodetected by smartctl!
Raidsonic Icy Box USB PATA 2.5 inch enclosure
USB-Product-ID: 0x2329
USB-Producer-ID: 0x152d (JMicron Technology Corp.)
Device Model: TOSHIBA MK5055GSX
Western Digital My Book (Interfaces: USB2, Firewire 800, eSATA)
USB-Product-ID: 0x1103
USB-Producer-ID: 0x1058 (Western Digital Technologies, Inc.)
Model Family: Western Digital Caviar Green family
Device Model: WDC WD10EACS-00ZJB0
Remark: Passthrough worked through both USB as well as Firewire.
follow-up: 21 comment:19 by , 13 years ago
Wow! This is a major improvement for smartmontools on the Macintosh platform!
So how to proceed?
Include this driver as an optional package within the smartmontools Mac package?
If not, please at least add the info about this passthrough driver into the readme and changelog.
follow-up: 23 comment:20 by , 13 years ago
Replying to chrfranke:
The OWC enclosure (USB ID?) likely supports some vendor specific pass-through command which may or may not be supported by smartmontools. Please try
smartctl -d usbcypress
orusbjmicron
orusbsunplus
under Linux or Windows (This won't work on Mac OS X because this driver does not provide real SCSI pass-through functionality).
The OWC is a ProductID 0x0072, VendorID 0x0dc4 . It (or the disk) requires more power than my MBP provides on the USB ports so I need to power it via FW if I want to access it from Linux or MSWin VM guests. One day ...
In the meantime, if ATA and SATA SMART commands are the same, something must be different enough (the way to issue them?) that under Linux, -d ata works and -d sat,N doesn't, for one of my enclosures (which has SATA inside).
comment:21 by , 13 years ago
Replying to porg:
Include this driver as an optional package within the smartmontools Mac package?
We don't provide Mac packages, please request this from your favorite package provider.
If not, please at least add the info about this passthrough driver into the readme and changelog.
I added a news entry to the homepage. If possible, please provide some more detailed info that we could add to section 1.G of the INSTALL file.
follow-up: 27 comment:22 by , 13 years ago
Replying to porg:
I report: Total success with all my USB + Firewire drives!
...
Raidsonic Icy Box USB PATA 2.5 inch enclosure
USB-Product-ID: 0x2329
USB-Producer-ID: 0x152d (JMicron Technology Corp.)
Are you sure that this device actually supports SAT? AFAIK the (older) JMicron bridges only support the JMicron specific pass-through command which is not supported by the SAT-SMART-Driver.
comment:23 by , 13 years ago
Replying to rjvbertin:
In the meantime, if ATA and SATA SMART commands are the same, something must be different enough (the way to issue them?) that under Linux, -d ata works and -d sat,N doesn't, for one of my enclosures (which has SATA inside).
On Linux, -d ata issues ATA commands using HDIO_DRIVE_TASKFILE ioctl, -d sat,N issues same ATA commands via SCSI command SAT PASS-THROUGH(N) using SG_IO ioctl.
comment:24 by , 13 years ago
I guess the fact that I'm running Linux in a VM (VirtualBox) on a host which doesn't have SCSI pass through may matter here...
comment:25 by , 13 years ago
Could you try using SniffUSB in Windows to analyze OWC enclosure protocol ?
comment:26 by , 13 years ago
Ok, what should I do exactly? Just mounting the drive gave me a logfile that seemed to grow without bounds - is that normal?
comment:27 by , 13 years ago
Replying to chrfranke:
Replying to porg:
I report: Total success with all my USB + Firewire drives!
...
Raidsonic Icy Box USB PATA 2.5 inch enclosure
USB-Product-ID: 0x2329
USB-Producer-ID: 0x152d (JMicron Technology Corp.)
Are you sure that this device actually supports SAT? AFAIK the (older) JMicron bridges only support the JMicron specific pass-through command which is not supported by the SAT-SMART-Driver.
I am certain that it works, because I saved the previous output (from the Windows machine) into a text file, and compared it with the current Macintosh output, and the values such as Power_on_hours have increased accordingly. So yes: It definitely worked.
comment:28 by , 13 years ago
comment:29 by , 13 years ago
Resolution: | → worksforme |
---|---|
Status: | accepted → closed |
SMART support for SAT capable USB and Firewire devices is now available through the OS X SAT SMART Driver. A note was added to smartmontools documentation in r3555.
SCSI/SAS disks, non-SMART ATA/SATA commands and non-SAT USB bridges are still unsupported. Please create a new ticket if full fledged ATA or SCSI pass-through support is available for Mac OS.
@cooties: You took ownership and accepted the feature request. So can I hope that this feature will be realised? Are you already working on it? Curious...