Page 1 of 1

[SOLVED]USB HDD spin down problem

PostPosted: Dec 12th, '19, 20:27
by mackowiakp
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: Select all
Bus 003 Device 008: ID 0bc2:3322 Seagate RSS LLC SRD0NF2 [Expansion Desktop Drive]


And from hdparm

Code: Select all
[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


Disk does not spi down. What the problem is? As I wrore, it worked with M6 and other Linux`s. Any idea?

Re: USB HDD spin down problem

PostPosted: Dec 12th, '19, 21:33
by doktor5000
You should add the full output of hdparm -I for that disk.

See also https://www.smartmontools.org/wiki/USB or https://www.smartmontools.org/ticket/971 and maybe https://askubuntu.com/a/1106020/329633
The behaviour changed after kernel 4.x at some time for the UAS mode access.

Re: USB HDD spin down problem

PostPosted: Dec 12th, '19, 21:47
by mackowiakp
So You have:

Code: Select all
[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

ATA device, with non-removable media
Standards:
        Likely used: 1
Configuration:
        Logical         max     current
        cylinders       0       0
        heads           0       0
        sectors/track   0       0
        --
        Logical/Physical Sector size:           512 bytes
        device size with M = 1024*1024:           0 MBytes
        device size with M = 1000*1000:           0 MBytes
        cache/buffer size  = unknown
Capabilities:
        IORDY not likely
        Cannot perform double-word IO
        R/W multiple sector transfer: not supported
        DMA: not supported
        PIO: pio0


A know that links. For example smartmontool output:

Code: Select all
[root@Piotr ~]# smartctl -i /dev/sdc1
smartctl 7.0 2018-12-30 r4883 [x86_64-linux-5.3.13-desktop-2.mga7] (local build)
Copyright (C) 2002-18, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Vendor:               Seagate
Product:              Expansion Desk
Revision:             9401
Compliance:           SPC-4
User Capacity:        4 000 787 029 504 bytes [4,00 TB]
Logical block size:   512 bytes
Physical block size:  4096 bytes
Logical Unit id:      0x5000000000000001
Serial number:        NA8F8593
Device type:          disk
Local Time is:        Thu Dec 12 20:47:26 2019 CET
SMART support is:     Available - device has SMART capability.
SMART support is:     Disabled
Temperature Warning:  Disabled or Not Supported


So, what to do?

Re: USB HDD spin down problem

PostPosted: Dec 14th, '19, 08:42
by doktor5000
mackowiakp wrote:A know that links.

But you didn't seem to actually read them. The first links to https://www.smartmontools.org/wiki/SAT-with-UAS-Linux which has workarounds. Which one did you try, with what results ?

Re: USB HDD spin down problem

PostPosted: Dec 15th, '19, 13:27
by mackowiakp
OMG! I have two identically looking Seagate Expansion 4tb units. Vendor ID is the same but unit ID is different. So I enter wrong unit ID in /etc/modprobe.d/disable_uas.conf file. In my case proper content is:

Code: Select all
[root@Piotr Pobrane]# cat /etc/modprobe.d/disable_uas.conf
options usb-storage quirks=0bc2:3322:u


Thats all. Solved. But why it is so complicated? USB is from assumption something p&p. Not plug and goggle several hours, ask on forums hoping that somebody help. Crazy...

Re: USB HDD spin down problem

PostPosted: Dec 16th, '19, 09:30
by doktor5000
mackowiakp wrote:But why it is so complicated? USB is from assumption something p&p. Not plug and goggle several hours, ask on forums hoping that somebody help. Crazy...

You complain because you bought some weird complicated proprietary hardware ? You may want to think about that again ...

Re: [SOLVED]USB HDD spin down problem

PostPosted: Dec 16th, '19, 09:37
by mackowiakp
No, I complain because I use the equipment I bought some 3-4 years ago and always worked without problems with everything, including the M6. And now you need to configure something that by definition is plug & play.

Re: [SOLVED]USB HDD spin down problem

PostPosted: Dec 18th, '19, 06:41
by mackowiakp
It works now but iotop shows 5 M/s for USB v3 interface connection. It is 10 times slower than the same HDD connected to OpenVRT based Asus router, equipped with USB v3 port too. I use in both cases RSYNC over SSH to backup QNAP NAS to HHD`s connected to Asus router and to PC.
Any idea how to seed-up such connection?