[kwlug-disc] SMART on USB disks ...
Khalid Baheyeldin
kb at 2bits.com
Fri Jul 1 13:34:11 EDT 2022
If you are like me trying to get SMART to run on USB disks, then this post
is for you.
See, SMART used to work fine on USB disks, until kernel changes made it not
work
by default.
You try to run smartctl like this, but you get errors and recommendations
for certain
parameters, which still give errors:
$ sudo smartctl -d sat -a /dev/sdb
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.
$ sudo smartctl -d sat -T permissive -a /dev/sdb
Read Device Identity failed: scsi error unsupported field in scsi command
That means that USB drives fail without warning, unlike SATA connected
disks.
The only remaining option is to regularly run the badblocks program on the
device,
which takes forever on a large 4TB disk.
But all is not lost.
Here is a discussion on the topic and workarounds:
https://www.smartmontools.org/wiki/SAT-with-UAS-Linux
The easiest, no-reboot, option is this:
# echo "0x0bc2:0xaaaa:u" > /sys/module/usb_storage/parameters/quirks
Replace 0x0bc2:0xaaaa with the USB vendor and ID for your USB disk, from
the lsusb command.
Hope this is useful to someone ...
Anyone who is in the know can chime in on UAS vs. SAT, and whether the :u
flag is better than the :t or vice versa?
--
Khalid M. Baheyeldin
2bits.com, Inc.
Fast Reliable Drupal
Drupal performance optimization, hosting and consulting.
"Sooner or later, this combustible mixture of ignorance and power is going
to blow up in our faces." -- Dr. Carl Sagan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://kwlug.org/pipermail/kwlug-disc_kwlug.org/attachments/20220701/bf2ad531/attachment.htm>
More information about the kwlug-disc
mailing list