SMART to USB/sata dock in 2.6.27-rc5 doesn't work
Hi
I just bought a usb/sata adapter like this:
http://www.thinkgeek.com/computing/drives/a7ea/?cpg=ab
lsusb -v is below
Works OK as a hot-plug SATA disk so I can check what's on that old disk in the corner; but smartctl doesn't work so I can't see if it has any errors, run selftests etc.
Kernel is 2.6.27-rc5 (I've also tried older kernels)
I plugged a previously zeroed drive in and...
root@ash:~ # smartctl -a /dev/sde
smartctl version 5.38 [i686-pc-linux-gnu] Copyright (C) 2002-8 Bruce Allen Home page is http://smartmontools.sourceforge.net/
Device: ST332062 0AS Version:
Device type: disk
Local Time is: Thu Oct 9 21:38:16 2008 BST
Device supports SMART and is Enabled
Temperature Warning Disabled or Not Supported
SMART Health Status: OK
Error Counter logging not supported
Device does not support Self Test logging
I've tried -dscsi and -dsat but they don't work.
More info below.
David
dmesg tail:
Initializing USB Mass Storage driver...
scsi8 : SCSI emulation for USB Mass Storage devices
usbcore: registered new interface driver usb-storage USB Mass Storage support registered.
usb-storage: device found at 2
usb-storage: waiting for device to settle before scanning
scsi 8:0:0:0: Direct-Access ST332062 0AS PQ: 0 ANSI: 2
sd 8:0:0:0: [sde] 625134827 512-byte hardware sectors (320069 MB) sd 8:0:0:0: [sde] Write Protect is off
sd 8:0:0:0: [sde] Mode Sense: 38 00 00 00
sd 8:0:0:0: [sde] Assuming drive cache: write through sd 8:0:0:0: [sde] 625134827 512-byte hardware sectors (320069 MB) sd 8:0:0:0: [sde] Write Protect is off
sd 8:0:0:0: [sde] Mode Sense: 38 00 00 00
sd 8:0:0:0: [sde] Assuming drive cache: write through
sde: unknown partition table
sd 8:0:0:0: [sde] Attached SCSI disk
sd 8:0:0:0: Attached scsi generic sg6 type 0
root@ash:~ # lsusb -v -s3:3
Bus 003 Device 003: ID 04fc:0c25 Sunplus Technology Co., Ltd Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 idVendor 0x04fc Sunplus Technology Co., Ltd idProduct 0x0c25 bcdDevice 1.03 iManufacturer 2 Sunplus Technology Inc. iProduct 3 USB to Serial-ATA bridge iSerial 1 SAMSUNG HD472712CQ696126 bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 32
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 4 Bulk Only Configuration
bmAttributes 0xc0
Self Powered
MaxPower 2mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 8 Mass Storage
bInterfaceSubClass 6 SCSI
bInterfaceProtocol 80 Bulk (Zip)
iInterface 5 Bulk Only Interface
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0
bMaxPacketSize0 64
bNumConfigurations 1
Device Status: 0x0001
Self Powered
Signature · 1 line
"Don't worry, you'll be fine; I saw it work in a cartoon once..."
Re: SMART to USB/sata dock in 2.6.27-rc5 doesn't work : hardware limitation
Quoted 9 lines · David Greaves
Hi
I just bought a usb/sata adapter like this:
http://www.thinkgeek.com/computing/drives/a7ea/?cpg=ab
lsusb -v is belowWorks OK as a hot-plug SATA disk so I can check what's on that old disk in the corner; but smartctl doesn't work so I can't see if it has any errors, run selftests etc.
So, for the record since I had no luck on google, I had an off-list reply that pointed here: Smartmontools for FireWire, USB, and SATA disks/systems
http://smartmontools.sourceforge.net/faq.html#testinghelp
It's an odd URL target - it's actually about the fact that the usb/sata bridges built into the docks don't fully support the scsi command set in their hardware; so my SMART doesn't work and has no chance of being fixed by software. Future chipsets (and some current cypress ones) may have various developments in hardware to fix this.
HTH someone else.
David
Signature · 1 line
"Don't worry, you'll be fine; I saw it work in a cartoon once..."
Quoted 23 lines · David Greaves
I just bought a usb/sata adapter like this:
http://www.thinkgeek.com/computing/drives/a7ea/?cpg=ab
lsusb -v is belowWorks OK as a hot-plug SATA disk so I can check what's on that old disk in the corner; but smartctl doesn't work so I can't see if it has any errors, run selftests etc.
Kernel is 2.6.27-rc5 (I've also tried older kernels)
I plugged a previously zeroed drive in and...
root@ash:~ # smartctl -a
/dev/sde
smartctl version 5.38 [i686-pc-linux-gnu] Copyright (C) 2002-8 Bruce Allen Home page is http://smartmontools.sourceforge.net/Device: ST332062 0AS Version:
Device type: disk
Local Time is: Thu Oct 9 21:38:16 2008 BST
Device supports SMART and is Enabled
Temperature Warning Disabled or Not Supported
SMART Health Status: OK
Quoted 2 lines
Error Counter logging not supported
Device does not support Self Test logging
The USB bridge should support SAT (SCSI-ATA translation) and many don't. Nothing much can be done about it. The hardware just don't know how to do it.
Signature · 1 line
tejun
Hi,
Quoted 8 lines · Tejun Heo
Quoted 2 lines · David Greaves
Error Counter logging not supported
Device does not support Self Test loggingThe USB bridge should support SAT (SCSI-ATA translation) and many don't. Nothing much can be done about it. The hardware just don't know how to do it.
That true that the hardware should support SAT, but even if it support it, linux need some patches to support SAT over USB. See http://thread.gmane.org/gmane.linux.scsi/43688 and the patch mentioned in the thread.
Unfortunately I am a bit busy to try to resubmit it. But I won't care if somebody improve it/resubmit it ;)
Matthieu
PS : there also http://thread.gmane.org/gmane.linux.usb.general/7145 that is pending.
Quoted 4 lines · matthieu castet
Hi,
Quoted 1 line · Tejun Heo
David Greaves wrote:
Quoted 8 lines
Quoted 7 lines
Quoted 2 lines
Error Counter logging not supported
Device does not support Self Test loggingThe USB bridge should support SAT (SCSI-ATA translation) and many don't. Nothing much can be done about it. The hardware just don't know how to do it.
That true that the hardware should support SAT, but even if it support it, linux need some patches to support SAT over USB. See http://thread.gmane.org/gmane.linux.scsi/43688 and the patch mentioned in the thread.
...
Ahh.. Great! This mostly fixes smartctl operation on at least two of my USB drive enclosures here:
1. a recent rev. 2.5" NexStar-3 SATA enclosure.
2. a 250GB 2.5" WD "Passport" external USB drive/enclosure.
With the patch, this command line works for me:
smartctl -a -dsat -T permissive /dev/sdb
And hdparm just works regardless, with or without the patch.
Quoted 12 lines
Unfortunately I am a bit busy to try to resubmit it. But I won't care if somebody improve it/resubmit it ;)
Matthieu
PS : there also http://thread.gmane.org/gmane.linux.usb.general/7145 that is pending.
Signature · 3 lines
To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 18 lines · Mark Lord
Quoted 4 lines · matthieu castet
Hi,
Quoted 1 line · Tejun Heo
David Greaves wrote:
Quoted 8 lines
Quoted 7 lines
Quoted 2 lines
Error Counter logging not supported
Device does not support Self Test loggingThe USB bridge should support SAT (SCSI-ATA translation) and many don't. Nothing much can be done about it. The hardware just don't know how to do it.
That true that the hardware should support SAT, but even if it support it, linux need some patches to support SAT over USB. See http://thread.gmane.org/gmane.linux.scsi/43688 and the patch mentioned in the thread.
...
Ahh.. Great! This mostly fixes smartctl operation on at least two of my USB drive enclosures here:
Quoted 9 lines
1. a recent rev. 2.5" NexStar-3 SATA enclosure.
2. a 250GB 2.5" WD "Passport" external USB drive/enclosure.With the patch, this command line works for me:
smartctl -a -dsat -T permissive
/dev/sdb
And hdparm just works regardless, with or without the patch.
It should work without permissive, permissive was need without the patch.
You said hdparm works without the patch. I wonder how it work. IRRC it asks check condition stuff for every command. I am interested to see the hdparm --verbose output without the patch.
BTW somebody is trying to push a patch similar to this one to usb-storage driver : https://lists.one-eyed-alien.net/pipermail/usb-storage/2008-October/004096.html
Matthieu
Quoted 24 lines · matthieu castet
Quoted 23 lines · Mark Lord
Quoted 4 lines · matthieu castet
Hi,
Quoted 1 line · Tejun Heo
David Greaves wrote:
Quoted 8 lines
Quoted 7 lines
Quoted 2 lines
Error Counter logging not supported
Device does not support Self Test loggingThe USB bridge should support SAT (SCSI-ATA translation) and many don't. Nothing much can be done about it. The hardware just don't know how to do it.
That true that the hardware should support SAT, but even if it support it, linux need some patches to support SAT over USB. See http://thread.gmane.org/gmane.linux.scsi/43688 and the patch mentioned in the thread.
...
Ahh.. Great! This mostly fixes smartctl operation on at least two of my USB drive enclosures here:
1. a recent rev. 2.5" NexStar-3 SATA enclosure.
2. a 250GB 2.5" WD "Passport" external USB drive/enclosure.With the patch, this command line works for me:
Quoted 7 lines
Quoted 4 lines
smartctl -a -dsat -T permissive
/dev/sdb
And hdparm just works regardless, with or without the patch.It should work without permissive, permissive was need without the patch.
You said hdparm works without the patch. I wonder how it work. IRRC it asks check condition stuff for every command. I am interested to see the hdparm --verbose output without the patch.
..
Mmm... actually, the "-dsat" flag seems to make smartctl mostly work with and without the patch. This is on 2.6.25.6 on my notebook here. Some month I'll update the kernel and fix VMware and wireless again for a newer kernel, but for now that's what it runs.
Here's hdparm --verbose, sans patch:
hdparm --verbose -I /dev/sdb
/dev/sdb:
outgoing cdb: 85 08 2e 00 00 00 00 00 00 00 00 00 00 40 ec 00SG_IO: ATA_16 status=0x2, host_status=0x0, driver_status=0x8SG_IO: sb[] = {72 00 00 00 00 00 00 0e}SG_IO: desc[] = {09 0c .. }
ATA_16 tf->status=0x00 tf->error=0x00
ATA device, with non-removable media
Model Number: Hitachi HTS541612J9SA00
Serial Number: SB2D11E4GESWAB
Firmware Revision: SBDOC74P...
And here is smartctl -a -dsat, without the -T permissive flag:
smartctl -a -dsat /dev/sdb
smartctl version 5.38 [i686-pc-linux-gnu] Copyright (C) 2002-8 Bruce Allen Home page is http://smartmontools.sourceforge.net/
=== START OF INFORMATION SECTION ===
Model Family: Hitachi Travelstar 5K160 series Device Model: Hitachi HTS541612J9SA00 Serial Number: SB2D11E4GESWAB Firmware Version: SBDOC74P User Capacity: 120,034,123,776 bytes Device is: In smartctl database [for details use: -P show] ATA Version is: 7 ATA Standard is: ATA/ATAPI-7 T13 1532D revision 1 Local Time is: Thu Oct 23 16:21:45 2008 EDT SMART support is: Available - device has SMART capability. SMART support is: Enabled
Error SMART Status command failed
Please get assistance from http://smartmontools.sourceforge.net/
Values from ATA Return Descriptor are:
00 09 0c 00 00 50 00 00 00 c2 4f 00 00 00 00
A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options.
Cheers
Quoted 48 lines · Mark Lord
Quoted 24 lines · matthieu castet
Quoted 23 lines · Mark Lord
Quoted 4 lines · matthieu castet
Hi,
Quoted 1 line · Tejun Heo
David Greaves wrote:
Quoted 8 lines
Quoted 7 lines
Quoted 2 lines
Error Counter logging not supported
Device does not support Self Test loggingThe USB bridge should support SAT (SCSI-ATA translation) and many don't. Nothing much can be done about it. The hardware just don't know how to do it.
That true that the hardware should support SAT, but even if it support it, linux need some patches to support SAT over USB. See http://thread.gmane.org/gmane.linux.scsi/43688 and the patch mentioned in the thread.
...
Ahh.. Great! This mostly fixes smartctl operation on at least two of my USB drive enclosures here:
1. a recent rev. 2.5" NexStar-3 SATA enclosure.
2. a 250GB 2.5" WD "Passport" external USB drive/enclosure.With the patch, this command line works for me:
Quoted 7 lines
Quoted 4 lines
smartctl -a -dsat -T permissive
/dev/sdb
And hdparm just works regardless, with or without the patch.It should work without permissive, permissive was need without the patch.
You said hdparm works without the patch. I wonder how it work. IRRC it asks check condition stuff for every command. I am interested to see the hdparm --verbose output without the patch.
..
Mmm... actually, the "-dsat" flag seems to make smartctl mostly work with and without the patch. This is on 2.6.25.6 on my notebook here. Some month I'll update the kernel and fix VMware and wireless again for a newer kernel, but for now that's what it runs.
Here's hdparm --verbose, sans patch:
hdparm --verbose -I
/dev/sdb
/dev/sdb:
outgoing cdb: 85 08 2e 00 00 00 00 00 00 00 00 00 00 40 ec 00SG_IO:ATA_16status=0x2, host_status=0x0, driver_status=0x8SG_IO: sb[] = {72 00 00 00 00 00 00 0e}SG_IO: desc[] = {09 0c .. }
Quoted 6 lines
ATA_16 tf->status=0x00 tf->error=0x00ATA device, with non-removable media
Model Number: Hitachi HTS541612J9SA00 Serial Number: SB2D11E4GESWAB Firmware Revision: SBDOC74P
..
Here it is again, with the entire returned sense data shown:
hdparm --verbose -I /dev/sdb
/dev/sdb:
outgoing cdb: 85 08 2e 00 00 00 00 00 00 00 00 00 00 40 ec 00SG_IO: ATA_16 status=0x2, host_status=0x0, driver_status=0x8SG_IO: sb[] = {72 00 00 00 00 00 00 0e}SG_IO: desc[] = {09 0c 00 00 50 01 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00}
ATA_16 tf->status=0x00 tf->error=0x00
ATA device, with non-removable media
Model Number: Hitachi HTS541612J9SA00
Serial Number: SB2D11E4GESWAB
Firmware Revision: SBDOC74P...
I guess it "works" by accident, since the 00 device status doesn't have the ATA error bit set. But I suppose this also means that a failed ATA command would not be noticed either.. At least not without the patch.
Cheers
Quoted 5 lines · Mark Lord
Mark Lord wrote:
I guess it "works" by accident, since the 00 device status doesn't have the ATA error bit set. But I suppose this also means that a failed ATA command would not be noticed either.. At least not without the patch.
Yes that seem to case.
I wonder with the patch doesn't make smartctl work without permisive. May be your usb id wasn't in the patch.
Matthieu
matthieu castet wrote:
..
Quoted 1 line
I wonder with the patch doesn't make smartctl work without permisive. May be your usb id wasn't in the patch.
..
Heh.. I didn't even look at the patch itself. But if it is relying upon a whitelist to work, then it's broken by design.
Most new USB drives will be supporting SAT, and requiring a kernel patch/update (or some other whitelist in userspace) is a silly way to support them.
Cheers
Quoted 24 lines · Tejun Heo
Quoted 23 lines · David Greaves
I just bought a usb/sata adapter like this:
http://www.thinkgeek.com/computing/drives/a7ea/?cpg=ab
lsusb -v is belowWorks OK as a hot-plug SATA disk so I can check what's on that old disk in the corner; but smartctl doesn't work so I can't see if it has any errors, run selftests etc.
Kernel is 2.6.27-rc5 (I've also tried older kernels)
I plugged a previously zeroed drive in and...
root@ash:~ # smartctl -a
/dev/sde
smartctl version 5.38 [i686-pc-linux-gnu] Copyright (C) 2002-8 Bruce Allen Home page is http://smartmontools.sourceforge.net/Device: ST332062 0AS Version:
Device type: disk
Local Time is: Thu Oct 9 21:38:16 2008 BST
Device supports SMART and is Enabled
Temperature Warning Disabled or Not Supported
SMART Health Status: OK
Quoted 6 lines
Quoted 2 lines
Error Counter logging not supported
Device does not support Self Test loggingThe USB bridge should support SAT (SCSI-ATA translation) and many don't. Nothing much can be done about it. The hardware just don't know how to do it.
..
That may be true, or not. Try "hdparm -I /dev/sde" on it. If that *works*, then the USB interface *does* support SAT!
Many, many new USB enclosures now have the modern InitIO bridge chips with SAT.
Cheers