Opened 7 years ago

Closed 7 years ago

Last modified 2 weeks ago

#971 closed defect (invalid)

No SMART access to Seagate devices under Linux if UAS is used

Reported by: tgape Owned by:
Priority: minor Milestone:
Component: all Version: 6.6
Keywords: uas linux Cc:

Description (last modified by Christian Franke)

I have a 3 TB Seagate Expansion portable USB 3.0 hard disk:
https://usb-ids.gowdy.us/read/UD/0bc2/231a

, model should be STEA3000400 (as found in an XML file which came inside the hard disk when I bought it)
with the suffix SRD0NF1 I guess (from the sticker in the back of the hard disk)

With UAS enabled I can see info with -d scsi (-d sat{,12} doesn't work), but SMART info is not available:

 # smartctl -d scsi -i /dev/sdb
smartctl 6.6 2017-11-05 r4594 [x86_64-linux-4.14.15-1-ARCH] (local build)
Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Vendor:               Seagate
Product:              Expansion
Revision:             0708
Compliance:           SPC-4
User Capacity:        3,000,592,981,504 bytes [3.00 TB]
Logical block size:   512 bytes
Physical block size:  4096 bytes
LU is fully provisioned
Logical Unit id:      0xXXXXXXXX
Serial number:        XXXXXXXX
Device type:          disk
Local Time is:        Sun Jan 28 11:28:14 2018 WET
SMART support is:     Unavailable - device lacks SMART capability.

If I blacklist UAS, then I get from smartctl:

 # smartctl -i  /dev/sdb 
smartctl 6.6 2017-11-05 r4594 [x86_64-linux-4.14.15-1-ARCH] (local build)
Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Seagate Barracuda 2.5 5400
Device Model:     ST3000LM024-2AN17R
Serial Number:    XXXXXXXXX (Note from me: This serial number doesn't match the serial number retrieved with -d scsi and UAS enabled! The UAS enabled serial number is the correct one from the sticker.)
LU WWN Device Id: X XXXXXX XXXXXXXXXX
Firmware Version: 0001
User Capacity:    3,000,592,982,016 bytes [3.00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    5526 rpm
Form Factor:      2.5 inches
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ACS-3 T13/2161-D revision 5
SATA Version is:  SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Sun Jan 28 11:26:13 2018 WET
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

I wonder if it's possible to get SMART access without blacklisting UAS. I don't like the "very big device" messages I receive in dmesg and I guess the device will perform better with UAS enabled (Kernel 4.14.15-1 from Archlinux X86_64).

kern  :info  : [  +4.501957] usbcore: registered new interface driver usb-storage
kern  :info  : [  +4.470776] usb 4-1.4: new high-speed USB device number 12 using ehci-pci
kern  :warn  : [  +0.179453] usb 4-1.4: UAS is blacklisted for this device, using usb-storage instead
kern  :info  : [  +0.000009] usb-storage 4-1.4:1.0: USB Mass Storage device detected
kern  :info  : [  +0.000262] usb-storage 4-1.4:1.0: Quirks match for vid 0bc2 pid 231a: 800000
kern  :info  : [  +0.000134] scsi host7: usb-storage 4-1.4:1.0
kern  :info  : [  +0.574103] usbcore: registered new interface driver uas
kern  :notice: [  +0.437323] scsi 7:0:0:0: Direct-Access     Seagate  Expansion        0708 PQ: 0 ANSI: 6
kern  :notice: [  +0.022529] sd 7:0:0:0: Attached scsi generic sg2 type 0
kern  :notice: [  +4.367035] sd 7:0:0:0: [sdb] Very big device. Trying to use READ CAPACITY(16).
kern  :notice: [  +0.000439] sd 7:0:0:0: [sdb] 5860533167 512-byte logical blocks: (3.00 TB/2.73 TiB)
kern  :notice: [  +0.000017] sd 7:0:0:0: [sdb] 4096-byte physical blocks
kern  :notice: [  +0.001065] sd 7:0:0:0: [sdb] Write Protect is off
kern  :debug : [  +0.000006] sd 7:0:0:0: [sdb] Mode Sense: 47 00 00 08
kern  :notice: [  +0.001162] sd 7:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
kern  :notice: [  +0.001110] sd 7:0:0:0: [sdb] Very big device. Trying to use READ CAPACITY(16).
kern  :notice: [  +0.072621] sd 7:0:0:0: [sdb] Very big device. Trying to use READ CAPACITY(16).
kern  :notice: [  +0.002571] sd 7:0:0:0: [sdb] Attached SCSI disk

And just in case:

# lsusb -v -d 0bc2:231a                   
Bus 004 Device 010: ID 0bc2:231a Seagate RSS LLC Expansion Portable
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.10
  bDeviceClass            0 
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x0bc2 Seagate RSS LLC
  idProduct          0x231a Expansion Portable
  bcdDevice            7.08
  iManufacturer           1 Seagate
  iProduct                2 Expansion
  iSerial                 3 XXXXXXXX
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           85
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk-Only
      iInterface              0 

Change History (23)

comment:1 by Christian Franke, 7 years ago

Description: modified (diff)

comment:2 by Christian Franke, 7 years ago

Keywords: uas linux added
Milestone: undecided
Type: defectenhancement

The USB bridge might support SAT ATA PASS-THROUGH command only in BOT mode, but not in UAS mode.

Please provide output of smartctl -r ioctl,2 -d sat -i /dev/sdb as an attachment to this ticket. Add kernel messages triggered by the command (if any).

comment:3 by tgape, 7 years ago

No kernel messages triggered in both cases.

With UAS:

# smartctl -q noserial -r ioctl,2 -d sat -i /dev/sdb
smartctl 6.6 2017-11-05 r4594 [x86_64-linux-4.14.15-1-ARCH] (local build)
Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org


REPORT-IOCTL: Device=/dev/sdb Command=IDENTIFY DEVICE
 Input:   FR=...., SC=0x01, LL=...., LM=...., LH=...., DEV=...., CMD=0xec IN
>>>> do_scsi_cmnd_io: sg_io_ver=3
 [ata pass-through(16): 85 08 0e 00 00 00 01 00 00 00 00 00 00 00 ec 00 ]
  scsi_status=0x2, sg_transport_status=0x0, sg_driver_status=0x8
  sg_info=0x1  sg_duration=0 milliseconds  resid=0
  Incoming data, len=512 [only first 256 bytes shown]:
 00     00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
 10     00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
 20     00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
 30     00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
 40     00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
 50     00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
 60     00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
 70     00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
 80     00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
 90     00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
 a0     00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
 b0     00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
 c0     00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
 d0     00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
 e0     00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
 f0     00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
  >>> Sense buffer, len=18:
 00     70 00 05 00 00 00 00 0a  00 00 00 00 24 00 00 00
 10     00 00
  status=2: sense_key=5 asc=24 ascq=0
sat_device::ata_pass_through: scsi error: unsupported field in scsi command
REPORT-IOCTL: Device=/dev/sdb Command=IDENTIFY DEVICE returned -1 errno=5 [scsi error unsupported field in scsi command]

===== [IDENTIFY DEVICE] DATA START (BASE-16) =====
000-015: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
016-031: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
032-047: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
048-063: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
064-079: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
080-095: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
096-111: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
112-127: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
128-143: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
144-159: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
160-175: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
176-191: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
192-207: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
208-223: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
224-239: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
240-255: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
256-271: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
272-287: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
288-303: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
304-319: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
320-335: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
336-351: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
352-367: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
368-383: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
384-399: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
400-415: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
416-431: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
432-447: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
448-463: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
464-479: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
480-495: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
496-511: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
===== [IDENTIFY DEVICE] DATA END (512 Bytes) =====


REPORT-IOCTL: Device=/dev/sdb Command=IDENTIFY PACKET DEVICE
 Input:   FR=...., SC=0x01, LL=...., LM=...., LH=...., DEV=...., CMD=0xa1 IN
>>>> do_scsi_cmnd_io: sg_io_ver=3
 [ata pass-through(16): 85 08 0e 00 00 00 01 00 00 00 00 00 00 00 a1 00 ]
  scsi_status=0x2, sg_transport_status=0x0, sg_driver_status=0x8
  sg_info=0x1  sg_duration=0 milliseconds  resid=0
  Incoming data, len=512 [only first 256 bytes shown]:
 00     00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
 10     00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
 20     00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
 30     00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
 40     00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
 50     00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
 60     00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
 70     00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
 80     00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
 90     00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
 a0     00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
 b0     00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
 c0     00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
 d0     00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
 e0     00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
 f0     00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
  >>> Sense buffer, len=18:
 00     70 00 05 00 00 00 00 0a  00 00 00 00 24 00 00 00
 10     00 00
  status=2: sense_key=5 asc=24 ascq=0
sat_device::ata_pass_through: scsi error: unsupported field in scsi command
REPORT-IOCTL: Device=/dev/sdb Command=IDENTIFY PACKET DEVICE returned -1 errno=5 [scsi error unsupported field in scsi command]

===== [IDENTIFY PACKET DEVICE] DATA START (BASE-16) =====
000-015: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
016-031: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
032-047: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
048-063: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
064-079: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
080-095: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
096-111: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
112-127: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
128-143: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
144-159: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
160-175: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
176-191: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
192-207: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
208-223: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
224-239: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
240-255: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
256-271: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
272-287: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
288-303: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
304-319: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
320-335: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
336-351: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
352-367: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
368-383: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
384-399: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
400-415: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
416-431: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
432-447: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
448-463: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
464-479: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
480-495: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
496-511: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
===== [IDENTIFY PACKET DEVICE] DATA END (512 Bytes) =====

Read Device Identity failed: scsi error unsupported field in scsi command

A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options.

Without UAS:

# smartctl -q noserial -r ioctl,2 -d sat -i /dev/sdb                                                                                            :(
smartctl 6.6 2017-11-05 r4594 [x86_64-linux-4.14.15-1-ARCH] (local build)
Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org


REPORT-IOCTL: Device=/dev/sdb Command=IDENTIFY DEVICE
 Input:   FR=...., SC=0x01, LL=...., LM=...., LH=...., DEV=...., CMD=0xec IN
>>>> do_scsi_cmnd_io: sg_io_ver=3
 [ata pass-through(16): 85 08 0e 00 00 00 01 00 00 00 00 00 00 00 ec 00 ]
  scsi_status=0x0, sg_transport_status=0x0, sg_driver_status=0x0
  sg_info=0x0  sg_duration=6 milliseconds  resid=0
  Incoming data, len=512 [only first 256 bytes shown]:
 00     5a 0c ff 3f 37 c8 10 00  00 00 00 00 3f 00 00 00
 10     00 00 00 00 20 20 20 20  20 20 20 20 20 20 20 20
 20     43 57 31 4b 53 4d 41 52  00 00 00 00 00 00 30 30
 30     31 30 20 20 20 20 54 53  30 33 30 30 4d 4c 32 30
 40     2d 34 41 32 31 4e 52 37  20 20 20 20 20 20 20 20
 50     20 20 20 20 20 20 20 20  20 20 20 20 20 20 10 80
 60     00 40 00 2f 00 40 00 02  00 02 07 00 ff 3f 10 00
 70     3f 00 10 fc fb 00 10 0c  ff ff ff 0f 00 00 07 04
 80     03 00 78 00 78 00 78 00  78 00 00 00 00 00 00 00
 90     00 00 00 00 00 00 1f 00  0e 85 06 00 cc 00 00 00
 a0     f0 07 6d 00 6b 34 69 7d  63 41 69 34 49 bc 63 41
 b0     7f 00 fb 00 fb 00 80 80  fe ff 00 00 d0 d0 00 00
 c0     00 00 00 00 00 00 00 00  b0 a3 50 5d 01 00 00 00
 d0     00 00 00 00 03 60 00 00  00 50 00 c5 b5 ab 34 7f
 e0     00 00 00 00 00 00 00 00  00 00 00 00 00 00 5c 40
 f0     1c 40 00 00 00 00 00 00  00 00 00 00 00 00 00 00
 [Duration: 0.006s]
REPORT-IOCTL: Device=/dev/sdb Command=IDENTIFY DEVICE returned 0

===== [IDENTIFY DEVICE] DATA START (BASE-16) =====
000-015: 5a 0c ff 3f 37 c8 10 00 00 00 00 00 3f 00 00 00 |Z..?7.......?...|
016-031: 00 00 00 00 58 58 58 58 58 58 58 58 58 58 58 58 |....XXXXXXXXXXXX|
032-047: 58 58 58 58 58 58 58 58 00 00 00 00 00 00 30 30 |XXXXXXXX......00|
048-063: 31 30 20 20 20 20 54 53 30 33 30 30 4d 4c 32 30 |10    TS0300ML20|
064-079: 2d 34 41 32 31 4e 52 37 20 20 20 20 20 20 20 20 |-4A21NR7        |
080-095: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 10 80 |              ..|
096-111: 00 40 00 2f 00 40 00 02 00 02 07 00 ff 3f 10 00 |.@./.@.......?..|
112-127: 3f 00 10 fc fb 00 10 0c ff ff ff 0f 00 00 07 04 |?...............|
128-143: 03 00 78 00 78 00 78 00 78 00 00 00 00 00 00 00 |..x.x.x.x.......|
144-159: 00 00 00 00 00 00 1f 00 0e 85 06 00 cc 00 00 00 |................|
160-175: f0 07 6d 00 6b 34 69 7d 63 41 69 34 49 bc 63 41 |..m.k4i}cAi4I.cA|
176-191: 7f 00 fb 00 fb 00 80 80 fe ff 00 00 d0 d0 00 00 |................|
192-207: 00 00 00 00 00 00 00 00 b0 a3 50 5d 01 00 00 00 |..........P]....|
208-223: 00 00 00 00 03 60 00 00 00 00 00 00 00 00 00 00 |.....`..........|
224-239: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 5c 40 |..............\@|
240-255: 1c 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |.@..............|
256-271: 21 00 b0 a3 50 5d b0 a3 50 5d 20 20 02 00 40 01 |!...P]..P]  ..@.|
272-287: 00 01 00 50 06 3c 0a 3c 00 00 3c 00 00 00 08 00 |...P.<.<..<.....|
288-303: 00 00 00 00 ff bd 80 02 00 00 00 00 08 00 00 00 |................|
304-319: 00 00 07 08 00 00 02 80 00 00 00 01 00 a1 00 80 |................|
320-335: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
336-351: 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
352-367: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
368-383: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
384-399: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
400-415: 00 00 00 00 00 00 00 00 00 00 00 00 a5 30 00 00 |.............0..|
416-431: 00 00 00 40 00 00 00 00 00 00 00 00 00 00 00 00 |...@............|
432-447: 00 00 96 15 00 00 00 00 00 00 00 00 7f 10 00 00 |................|
448-463: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
464-479: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
480-495: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
496-511: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 a5 82 |................|
===== [IDENTIFY DEVICE] DATA END (512 Bytes) =====

=== START OF INFORMATION SECTION ===
Model Family:     Seagate Barracuda 2.5 5400
Device Model:     ST3000LM024-2AN17R
Firmware Version: 0001
User Capacity:    3,000,592,982,016 bytes [3.00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    5526 rpm
Form Factor:      2.5 inches
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ACS-3 T13/2161-D revision 5
SATA Version is:  SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Mon Jan 29 19:02:11 2018 WET
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
Version 0, edited 7 years ago by tgape (next)

comment:4 by Christian Franke, 7 years ago

  >>> Sense buffer, len=18:
 00     70 00 05 00 00 00 00 0a  00 00 00 00 24 00 00 00
 10     00 00
  status=2: sense_key=5 asc=24 ascq=0
sat_device::ata_pass_through: scsi error: unsupported field in scsi command

Sense KEY 0x5: ILLEGAL_REQUEST
ASC/ASCQ 0x24/0x00: INVALID FIELD IN CDB

This suggests that the USB bridge does not support SAT ATA PASS-THROUGH when in UAS mode. Cannot be fixed by smartmontools.

comment:5 by tgape, 7 years ago

Is there anything that can be done at the kernel driver level to query the device in BOT mode while the UAS is enabled? I wonder how in Windows it's possible to query the SMART info while it's still in UAS mode (AIDA64 can do it for example).

in reply to:  5 comment:6 by Christian Franke, 7 years ago

Same issue was reported for similar drive with Id 0x0bc2:0x2322, see ticket #973.

Note that various Seagate devices are listed in the unusual_uas.h file of Linux kernel. Which means that various aspects of UAS are broken with these devices.

Is there anything that can be done at the kernel driver level to query the device in BOT mode while the UAS is enabled?

No (AFAIK).

I wonder how in Windows it's possible to query the SMART info while it's still in UAS mode

Did you try smartctl for Windows in UAS mode?

(AIDA64 can do it for example).

Note that vendors of such closed source tools could sign a NDA to receive proprietary info from OS or device vendors. Open source developers could not.

comment:7 by pgkos, 7 years ago

I have tested smartctl both on Linux and Windows, with Seagate Expansion USB 3.0 1TB drive 0bc2:2322.

On Linux, since kernel 4.14 all Seagate enclosures have ATA passthrough disabled when using UAS (https://github.com/torvalds/linux/commit/7fee72d5e8f1e7b8d8212e28291b1a0243ecf2f1). So, smartctl does not work when UAS is enabled.

But, on Windows, smartctl works correctly and uses ATA passthrough (16) in UAS mode (I have verified this using a USB sniffer, it definitely uses UAS, not USBMS).

So it seems the only problem is that in the Linux kernel all Seagate enclosures are treated as if they always have broken ATA passthrough.

Last edited 7 years ago by pgkos (previous) (diff)

comment:8 by Christian Franke, 7 years ago

Summary: UAS support for smartmontoolsNo SMART access to Seagate devices under Linux if UAS is used
Type: enhancementdefect

Thanks for the info.

comment:9 by Christian Franke, 7 years ago

Milestone: undecided
Resolution: invalid
Status: newclosed

Linux 4.14 or later disable SAT ATA PASS-THROUGH to devices with USB Vendor Id 0x0bc2 if UAS is used. See above for details. This cannot be fixed by smartmontools.

comment:10 by tgape, 7 years ago

Thanks everyone. Everything's clear now. If someone Googles about this problem, hopefully they'll find this ticket. I was lost about what's going on when I opened it.

comment:11 by Christian Franke, 7 years ago

I added some info to the USB page and the FAQ.

comment:12 by tgape, 7 years ago

Nice! I sent an email to a kernel developer and he told me that although Seagate is making improvements, although there still are broken devices so the ata-passthrough in UAS mode ban will be kept in place. He implied that I was lucky if a Windows tool managed to access the SMART info of the device with that firmware bug.

He told me too how to disable the UAS quirk, which I did, and now I can access the SMART info in UAS mode. It seems this hard disk model from Seagate doesn't have any firmware bug.

The method is adding the same as adding a USB quirk to a device but without the ending letter which defines the quirk to apply, i.e. no ending letter means "no quirks" for this device. In my case, I added to the kernel command line: usb_storage.quirks=0bc2:231a:

So, thanks again to everyone involved!

Last edited 7 years ago by tgape (previous) (diff)

comment:13 by jrw, 7 years ago

Thanks for this post! I did indeed find it via google, although not via duckduckgo :-(

comment:14 by Christian Franke, 6 years ago

Ticket #1069 has been marked as a duplicate of this ticket.

comment:15 by Christian Franke, 6 years ago

Ticket #1078 has been marked as a duplicate of this ticket.

comment:16 by Christian Franke, 6 years ago

Ticket #1092 has been marked as a duplicate of this ticket.

comment:17 by Christian Franke, 5 years ago

Ticket #1312 has been marked as a duplicate of this ticket.

comment:18 by Christian Franke, 5 years ago

Ticket #1330 has been marked as a duplicate of this ticket.

comment:19 by Christian Franke, 4 years ago

Ticket #1344 has been marked as a duplicate of this ticket.

comment:20 by Christian Franke, 4 years ago

See SAT with UAS under Linux wiki page for further info.

comment:21 by Christian Franke, 2 years ago

Ticket #1619 has been marked as a duplicate of this ticket.

comment:22 by Christian Franke, 2 years ago

Ticket #1634 has been marked as a duplicate of this ticket.

comment:23 by Christian Franke, 2 weeks ago

Ticket #1902 has been marked as a duplicate of this ticket.

Note: See TracTickets for help on using tickets.