Cannot perform SMART data and Self-Test on external hard drive

Right now my external drive does not has any errors but I just want to check manually to make sure.
As seen from image below, the option for SMART data and Self-Test is greyed out. Also see the details about the hard drive in image itself.

  1. I tried running gksu gnome-disks but still the option is greyed out.

  2. I ran sudo smartctl --all /dev/sdb --test=short -T permissive I got this error:

    smartctl 6.4 2014-10-07 r4002 [x86_64-linux-3.19.0-15-generic] (local build)
    Copyright (C) 2002-14, Bruce Allen, Christian Franke,
    www.smartmontools.org
    
    Read Device Identity failed: scsi error unsupported field in scsi
    command
    
    === START OF INFORMATION SECTION ===
    Device Model:     [No Information Found]
    Serial Number:    [No Information Found]
    Firmware Version: [No Information Found]
    Device is:        Not in smartctl database [for details use: -P
    showall]
    ATA Version is:   [No Information Found]
    Local Time is:    Wed Jun 17 11:33:46 2015 IST
    SMART support is: Ambiguous - ATA IDENTIFY DEVICE words 82-83 don't
    show if SMART supported.
    SMART support is: Ambiguous - ATA IDENTIFY DEVICE words 85-87 don't
    show if SMART is enabled.
    
    A mandatory SMART command failed: exiting. To continue, add one or
    more '-T permissive' options.
    

screenshot


Solution 1:

I had the same problem. In my case, S.M.A.R.T had been working properly on the device for years while using Ubuntu 12.04, and then under Ubuntu 14.04 it happened exactly what you tell in the question.

The problem is related to a new kernel module that was introduced in Linux Kernel 3.15 called uas (USB Attached SCSI) (see release announcement).

That module is now the responsible of managing USB Mass Storage Devices. There is a thread where people complain that uas in kernel 3.15 is causing their USB devices to fail. Another one says that it might be the cause of S.M.A.R.T problems.

Fortunately, those problems seem to be gone at kernel 3.19 (which I am using), as my device is being detected correctly. Only the S.M.A.R.T problem remains.

To fix it, you need to disable the use of uas module for the given device.

Disable uas without rebooting

First, unplug all USB devices that might be using it. Then, remove the uas and usb-storage modules:

sudo modprobe -r uas
sudo modprobe -r usb-storage

Then, load usb-storage module with a parameter that tells it to not use uas for a given device:

sudo modprobe usb-storage quirks=VendorId:ProductId:u

VendorId and ProductId must be replaced by your device vendor and product id, which can be obtained with lsusb command (they are the characters after ID).

For example, I have the following device:

Bus 002 Device 011: ID 0bc2:3320 Seagate RSS LLC SRD00F2 [Expansion Desktop Drive]

So my vendor id is 0bc2, and my product id is 3320. My command is:

sudo modprobe usb-storage quirks=0bc2:3320:u

The last u tells usb-storage to ignore uas for the device (see source).

At this point, you can insert the USB device, and it will know not to use uas, making S.M.A.R.T work properly. You will see lines like these in dmesg when inserting the USB device:

usb 2-2: UAS is blacklisted for this device, using usb-storage instead
usb-storage 2-2:1.0: USB Mass Storage device detected
usb-storage 2-2:1.0: Quirks match for vid 0bc2 pid 3320: 800000
scsi host12: usb-storage 2-2:1.0

Make the change permanent

The previous quirk will only last until you reboot the system. To make it persistent, you need to follow the steps described here, which I copy below:

First, create a file named ignore_uas.conf in the /etc/modprobe.d/ directory with the following content:

options usb-storage quirks=VendorId:ProductId:u

As before, substitute VendorId and ProductId by your device vendor and product id obtained from lsusb.

Next, regenerate your inital ramdisk:

mkinitcpio -p linux

or, on newer Ubuntu versions:

sudo update-initramfs -u

Finally, reboot your computer.


Edit: More background on the issue, and another way to get around it without disabling uas (which has better throughput than usb-storage) can be found here: https://www.smartmontools.org/ticket/971#comment:12

It seems that kernel is blacklisting SAT ATA PASS-THROUGH on some devices when running in uas mode, as they have broken firmware.

So, the blacklisting can be disabled (at your own risk) by using the previous method I mention in the answer, but removing the final u from the quirk, ie:

quirks=VendorId:ProductId:

Please note, however, that I have not tested this approach.

Solution 2:

External drives (via USB, I assume) are tricky with SMART. Some don't work at all. The smartmontools people posted a list of hard drives with command-line switches to add to smartctl (see fifth column).


For Seagate Expansion drives in particular, it looks like you need either -d sat or -d sat,12. Try the following:

sudo smartctl -d sat --all /dev/sdb
sudo smartctl -d sat,12 --all /dev/sdb

If one of those works, it tells you which -d switch to add to your smartctl commands.