60

I have a very old 2.5" IDE drive inside a USB enclosure that gives some buffer I/O error. I tried to use smartctl to see what SMART says about it, but I can't manage to make it work. Being root, if I just write:

#> smartctl --all /dev/sde

smartctl answers:

/dev/sde: Unknown USB bridge [0x14cd:0x6600 (0x201)]
Smartctl: please specify device type with the -d option.

So I've tried every -d TYPE available in the help summary, and the best result is achieved with:

#> smartctl --all -d scsi /dev/sde

that outputs:

Vendor:               IC25N030
Product:              ATMR04-0
User Capacity:        30,005,821,440 bytes [30,0 GB]
Logical block size:   512 bytes
scsiModePageOffset: response length too short, resp_len=4 offset=4 bd_len=0
>> Terminate command early due to bad response to IEC mode page
A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options.

If I also add -T permissive the last line is replaced with:

Error Counter logging not supported
Device does not support Self Test logging

It seems that just a few models of USB enclosures are officially supported by smartmontools. Is there something that I'm missing or simply the device implements an archaic version of SMART without any counters (and hence almost useless)?

1
  • 10
    For those arriving from Google: Check out the -d options, specifically -d sat, and look at the list of supported devices. Quite a lot of USB adapters will work with SMART.
    – Zaz
    Jul 19, 2014 at 17:46

5 Answers 5

68

There is a vendor independent SAT (SCSI/ATA transfer) standard, but AFAIK this is not widely supported on (cheaper) bridges.

There are several vendor specific ATA pass-through commands that you can select with smartctl with the -d option:

-d TYPE, --device=TYPE
    Specify device type to one of: ata, scsi, sat[,N][+TYPE], 
    usbcypress[,X], usbjmicron[,x][,N], usbsunplus, marvell, 
    areca,N, 3ware,N, hpt,L/M/N, megaraid,N, cciss,N, auto, test

where -d sat is for SAT compatible devices.

The USB Device Support lists devices and their command line options, so if you get a USB controller with one of the devices listed as supported, you have a better chance of getting things to work.

0
12

SMART over USB is generally either not possible, or is done with (bridge) vendor-specific commands, so there's no one way to get things done. smartctl knows about a few specific bridge chips. Check the manpage for a list.

This is horrible, but the only 100% reliable way to access SMART on a disk is to unplug it from the bridge and stick it on a proper host adaptor (like an on-board SATA controller or eSATA port).

With modern OS abstraction it's so easy to forget just how different these storage buses are internally.

2
8

There isn't an appropriate value of -d.

The problem is that you're using a SATA↔USB mass storage bridge, and USB mass storage doesn't have a standard way to request ATA/SATA SMART data. So instead the controller has either no way or some vendor-specific way to get the data. smartctl knows a few of these; examples include usbjmicron and usbsubplus.

So, if your USB bridge isn't one of the ones it knows about (and doesn't use exactly the same vendor-specific commands), smartctl just can't read the data.

3
  • Curious. Then what external casing (or other solution) could I then use to be able to read SMART data? I can't just plug a Mac OS X disk onto my HP laptop. And I have no place for the 2.5" disk in my desktop computer.
    – landroni
    Jan 17, 2014 at 0:11
  • 3
    @landroni You can use a 2.5" to 3.5" adapter to put it in your desktop computer. Or if your computer has eSATA, use that (with an eSATA enclosure + adapter) Or you can look for an enclosure that uses one of the USB chips that smartctl supports. AFAIK, there aren't any better answers :-( ... but feel free to wait and hope someone else on the site knows a better one.
    – derobert
    Jan 17, 2014 at 0:37
  • Thanks! Very useful. I'll be waiting for further input before accepting your answer, but this already puts me on the right track (specifically the 2.5" to 3.5" adapter).
    – landroni
    Jan 17, 2014 at 2:04
2

Your hardware "VID: 14CD, PID: 6600 Moai M110E / Super Top USB 2.0 to IDE" is not capable of doing the USB pass through of the ATA commands that enable SMART disk health enquiry by eg smartctl (or in this link hdsentinel, http://www.hdsentinel.com/compatibility_usbharddisks.php which gives a list of compatible and incapable hardware).

"Not possible means that the required function is missing from the chip, that's why no further information can be displayed about the disk controlled by this chip." (ibid)

1

Similar issue, smartctl fails to determine device type for HP Proliant G8 scsi hard disks on CentOS 7. Somewhat misleading hint /dev/sda: requires option '-d cciss,N'

DOH DUH #1:

root$ smartctl -i /dev/sda

/dev/sda: requires option '-d cciss,N'
Please specify device type with the -d option.

DOH DUH #2:

root$ smartctl -i /dev/sda -d cciss,N   # oops
/dev/sda: Option -d cciss,N requires N to be a non-negative integer

=======> VALID ARGUMENTS ARE: ata, scsi[+TYPE], nvme[,NSID], sat[,auto][,N][+TYPE], usbcypress[,X], usbjmicron[,p][,x][,N], usbprolific, usbsunplus, sntjmicron[,NSID], intelliprop,N[+TYPE], marvell, areca,N/E, 3ware,N, hpt,L/M/N, megaraid,N, aacraid,H,L,ID, cciss,N, auto, test <=======

'-d csiss,N' where N is a number. Not sure why just csiss is suggested, maybe it is just the last item in the list when it is trying to automatically figure out type of device.

List device files under /dev to see disk devices. The N is the last number in the name of the device. e.g. for /dev/sda5 N is 5

$ ls -alstr /dev/sd*
0 brw-rw----. 1 root disk 8, 48 Jan 22  2020 /dev/sdd
0 brw-rw----. 1 root disk 8, 32 Jan 22  2020 /dev/sdc
0 brw-rw----. 1 root disk 8, 16 Jan 22  2020 /dev/sdb
0 brw-rw----. 1 root disk 8, 17 Jan 22  2020 /dev/sdb1
0 brw-rw----. 1 root disk 8, 33 Jan 22  2020 /dev/sdc1
0 brw-rw----. 1 root disk 8, 49 Jan 22  2020 /dev/sdd1
0 brw-rw----. 1 root disk 8,  0 Feb 10 10:56 /dev/sda
0 brw-rw----. 1 root disk 8,  4 Feb 10 10:56 /dev/sda4
0 brw-rw----. 1 root disk 8,  5 Feb 10 10:56 /dev/sda5
0 brw-rw----. 1 root disk 8,  3 Feb 10 10:56 /dev/sda3
0 brw-rw----. 1 root disk 8,  2 Feb 10 10:56 /dev/sda2
0 brw-rw----. 1 root disk 8,  6 Feb 10 10:56 /dev/sda6
0 brw-rw----. 1 root disk 8,  1 Feb 10 10:56 /dev/sda1

e.g. for /dev/sda0 N is 0

$ smartctl -i /dev/sda -d cciss,0
smartctl 6.2 2017-02-27 r4394 [x86_64-linux-3.10.0-693.21.1.el7.x86_64] (local build)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org

/dev/sda [cciss_disk_00] [SCSI]: Device open changed type from 'sat,auto+cciss' to 'cciss'
=== START OF INFORMATION SECTION ===
Vendor:               HP
Product:              EH0146FBQDC
Revision:             HPD3
User Capacity:        146,815,737,856 bytes [146 GB]
Logical block size:   512 bytes
Rotation Rate:        15000 rpm
Form Factor:          2.5 inches
Logical Unit id:      0x5000c5005ab90277
Serial number:        6XM1WH6J0000B320CK84
Device type:          disk
Transport protocol:   SAS
Local Time is:        Wed Feb 10 10:57:34 2021 GMT
SMART support is:     Available - device has SMART capability.
SMART support is:     Enabled
Temperature Warning:  Enabled

e.g. for /dev/sda5 N is 5

The same info shows as for /dev/sda0 except Logical Unit id and Serial Number are different.

 smartctl -i /dev/sda -d cciss,5
smartctl 6.2 2017-02-27 r4394 [x86_64-linux-3.10.0-693.21.1.el7.x86_64] (local build)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org

/dev/sda [cciss_disk_05] [SCSI]: Device open changed type from 'sat,auto+cciss' to 'cciss'
=== START OF INFORMATION SECTION ===
Vendor:               HP
Product:              EH0146FBQDC
Revision:             HPD3
User Capacity:        146,815,737,856 bytes [146 GB]
Logical block size:   512 bytes
Rotation Rate:        15000 rpm
Form Factor:          2.5 inches
Logical Unit id:      0x5000c5005abf9f07
Serial number:        6XM1WKTN0000B320ED0R
Device type:          disk
Transport protocol:   SAS
Local Time is:        Fri Feb 19 18:46:59 2021 GMT
SMART support is:     Available - device has SMART capability.
SMART support is:     Enabled
Temperature Warning:  Enabled

Specifying '-d scsi' shows quite believable info also, but ...

root$ sudo smartctl -i /dev/sda -d scsi
smartctl 7.0 2018-12-30 r4883 [x86_64-linux-3.10.0-1062.9.1.el7.x86_64] (local build)
Copyright (C) 2002-18, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Vendor:               HP
Product:              LOGICAL VOLUME
Revision:             6.34
Compliance:           SPC-3
User Capacity:        146,778,685,440 bytes [146 GB]
Logical block size:   512 bytes
Logical Unit id:      0x600508b1001c3aa4f41858962741ed49
Serial number:        00143802281D760
Device type:          disk
Local Time is:        Fri Jan 24 16:11:48 2020 GMT
SMART support is:     Available - device has SMART capability.
SMART support is:     Enabled
Temperature Warning:  Disabled or Not Supported

root$ cat /etc/redhat-release 
CentOS Linux release 7.7.1908 (Core)
1
  • 1
    N means a number ie. 0 or 1 or 2 or 3 - as it states in the message "a non negative integer"
    – Dagelf
    Feb 8, 2021 at 13:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .