LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-13-2019, 12:58 PM   #1
mackowiakp
Member
 
Registered: Jun 2014
Location: Poland/Gdynia
Distribution: Mageia 9, SH4, Debian
Posts: 367

Rep: Reputation: 8
USB HDD spin down problem


I want to spin down USB connected Seagate USB HDD. It works correctly with M6, RPi and QNAP NAS. But not with M7. Below output from lsusb:

Code:
Bus 003 Device 008: ID 0bc2:3322 Seagate RSS LLC SRD0NF2 [Expansion Desktop Drive]
And from hdparm

Code:
[root@Piotr TMP]# hdparm -S120 /dev/sdc

/dev/sdc:
 setting standby to 120 (10 minutes)
SG_IO: bad/missing sense data, sb[]:  70 00 05 00 00 00 00 0a 00 00 00 00 24 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[root@Piotr ~]# hdparm -I /dev/sdc

/dev/sdc:
SG_IO: bad/missing sense data, sb[]:  70 00 05 00 00 00 00 0a 00 00 00 00 24 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Generally it works with kernel ver 4.xx but not with kernel ver 5.xx, probably because changing UAS mode access.

My device is Seagate Expansion Desk USB v3 4TB HDD (0bc2:3322) is listed in smartmontools as unsupported. It always shows that SMART is avaliable but disabled. No way to enable it.
Is any way to make it working with hdparm correctly as previous?

Last edited by mackowiakp; 12-13-2019 at 01:05 PM.
 
Old 12-15-2019, 03:42 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,160

Rep: Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266
The SCSI sense data says:
Code:
key = 05  ILLEGAL REQUEST
asc/ascq = 24/00 INVALID FIELD IN CDB
So hdparm sent an invalid command to that drive.
 
Old 12-17-2019, 10:38 PM   #3
mackowiakp
Member
 
Registered: Jun 2014
Location: Poland/Gdynia
Distribution: Mageia 9, SH4, Debian
Posts: 367

Original Poster
Rep: Reputation: 8
According to https://www.smartmontools.org/wiki/SAT-with-UAS-Linux, for older USB to SATA converter, it is necessary to disable the UAS mode access in kernels 5.xxx.
So I create file /etc/modprobe.d/disable_uas.conf with content:

Code:
[root@Piotr Pobrane]# cat /etc/modprobe.d/disable_uas.conf
options usb-storage quirks=0bc2:3322:u
where 0bc2:3322 are VendorID:UnitID taken from lsusb.

It works now but iotop shows 5 M/s for USB v3 interface. It is 10 times slower than the same HDD connected to OpenVRT Asus based router. Any idea how to seed-up such connection?
 
Old 12-18-2019, 01:25 AM   #4
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Not a direct answer, but I use this:
Code:
hdparm -B100 /dev/disk/by-id/usb...
Haven't noticed any perf. issues, and it does spin down.
 
Old 12-18-2019, 10:39 PM   #5
mackowiakp
Member
 
Registered: Jun 2014
Location: Poland/Gdynia
Distribution: Mageia 9, SH4, Debian
Posts: 367

Original Poster
Rep: Reputation: 8
Yep. It works too. Byt with disabled the UAS access mode only. And still performance is very low. Does not matter I connect HDD to USB v3 or v3.1. HDD is v3 device.
 
Old 12-31-2019, 09:10 AM   #6
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Must be the USB connection, one way or the other (inside the drive enclosure or inside your PC).
Usually these USB drives are just normal drives in a USB enclosure; you can try taking the drive out and connecting it directly via SATA cable or some such.

Did you say that you have performance problems with only one of three SBCs?
That would of course put a different spin on things.
 
Old 01-13-2020, 02:19 AM   #7
mackowiakp
Member
 
Registered: Jun 2014
Location: Poland/Gdynia
Distribution: Mageia 9, SH4, Debian
Posts: 367

Original Poster
Rep: Reputation: 8
The only thing that helps is to disable UAS for particular USB device, as I described above. Then it is possible to use hdparm without problems. It is needed only on kernel 5.xx. Mageia forum stands that UAS does not support older USB/SATA chip converters so such disabling is necesery. Strange. My Seagate USB HDD is 2 or 3 years old so its rather new. But as we can see, not for 5.xx kernels, especially in Mageia (dont know about other distros).
But maybe someone know how to enable/disable UAS support on-demand? Is it possible at all?
 
  


Reply

Tags
hdparm, seagate, spindown, usb 3



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Spin-down functionality for USB HDD Mr. Alex Linux - Hardware 2 12-12-2013 09:48 AM
DIY NAS + database: boot off USB and spin down hdd? Frakk Linux - Server 4 02-11-2013 08:46 AM
LXer: Fedora 13 - Xfce spin vs. LXDE spin LXer Syndicated Linux News 0 06-19-2010 07:50 AM
External HDD spin down / powerdown fjanoos Linux - Hardware 1 09-21-2009 10:40 AM
to spin down or not to spin down, that is the question maenho Linux - Software 2 02-05-2005 08:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:26 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration