Smartctl: how to run a long test on hdd

I need to test an hdd because the smart control on OVM mark it as bad, then I’m trying to run a test, first i run this

sudo smartctl -a -dscsi /dev/sda
smartctl 7.2 2020-12-30 r5155 [aarch64-linux-5.10.92-v8+] (local build)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Vendor: Pinas
Product: SATA
Revision: 0
Compliance: SPC-4
User Capacity: 500,107,862,016 bytes [500 GB]
Logical block size: 512 bytes
Physical block size: 4096 bytes
LU is fully provisioned
Rotation Rate: 7200 rpm
Form Factor: 2.5 inches
Logical Unit id: 0x5000000000000001
Serial number: CE0000000000
Device type: disk
Local Time is: Sat Mar 5 20:16:06 2022 CET
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
Temperature Warning: Disabled or Not Supported

=== START OF READ SMART DATA SECTION ===
SMART Health Status: OK
Current Drive Temperature: 0 C
Drive Trip Temperature: 0 C

Error Counter logging not run

After i run : sudo smartctl -t long -d scsi /dev/sdd
smartctl 7.2 2020-12-30 r5155 [aarch64-linux-5.10.92-v8+] (local build)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org

Long (extended) offline self test failed [unsupported field in scsi command]

How can I make smartctl recognize the usb bridge?

lsusb:
Bus 002 Device 004: ID 1741:1156 Pinas sata
Bus 002 Device 003: ID 174e:1155 Pinas SATA

@picard12 Try: smartctl -d sat -a -t long /dev/sdd

1 Like

This works on mine. Thanks, @jamesgrace ! I tried getting the right flags to pierce the USB bridge a while ago, but couldn’t quite get there on my own.

In case anyone is curious: smartctl -d sat -a -t long /dev/sdd, according to the man page, translates into (see man page for more details):

  • -d sat: specify device type to “SCSI to ATA translation” for “ATA PASS THROUGH SCSI commands”
  • -a: Print all SMART information
  • -t long: Perform extended self-test