Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
USB drive spin-down, smartmontools
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Massimo B.
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1421
Location: Germany

PostPosted: Fri May 19, 2017 8:01 am    Post subject: USB drive spin-down, smartmontools Reply with quote

I have seen USB 2.0 drives, that supports power modes, but I have lot like this Trekstor 04b4:6830 (Cypress chipset) that I can't spin-down:
Code:
Bus 001 Device 013: ID 04b4:6830 Cypress Semiconductor Corp. CY7C68300A EZ-USB AT2 USB 2.0 to ATA/ATAPI


https://www.smartmontools.org/wiki/Supported_USB-Devices reports some of these IDs as supported, some as unsupported. However I'm able to read smart data:
Code:
 # smartctl -d usbcypress /dev/disk/by-id/usb-ST375064_0A_D-0:0 -a
smartctl 6.5 2016-05-07 r4318 [x86_64-linux-4.10.14-ck] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Seagate Barracuda 7200.10
Device Model:     ST3750640A
Serial Number:    3QD0PQBQ
Firmware Version: 3.AAD
...

But setting power modes fails:
Code:
# smartctl -d usbcypress /dev/disk/by-id/usb-ST375064_0A_D-0:0 -s standby,240 -s aam,254
smartctl 6.5 2016-05-07 r4318 [x86_64-linux-4.10.14-ck] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF ENABLE/DISABLE COMMANDS SECTION ===
AAM enable failed: Non-SMART commands not implemented
ATA IDLE command failed: Non-SMART commands not implemented

hdparm failing as well:
Code:
# hdparm -y /dev/disk/by-id/usb-ST375064_0A_D-0:0

/dev/disk/by-id/usb-ST375064_0A_D-0:0:
 issuing standby command
SG_IO: bad/missing sense data, sb[]:  70 00 05 00 00 00 00 0a 00 00 00 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00


This is actually not about Linux support for the devices, but those USB cases don't support port modes. It is hard to find a case that supports it. I have one that works, but own a lot of USB cases that don't support spin-down. I usually take them for backup only and like to spin-down them in the meanwhile.

Is there any way to put the device into low-power mode without physically disconnecting the USB connection?

I tried
Code:
echo '1-1.4.1' |tee /sys/bus/usb/drivers/usb/unbind
which makes the device disappear but not spinning down.
I tried
Code:
# echo off > /sys/bus/usb/devices/1-1.4.1/power/level
-bash: echo: write error: Invalid argument


Any idea?
_________________
ppc:PowerBook5,8 15"(1440)-G4/1.67,2G | amd64:Acer Z5610 (Core2QuadQ8200),i5-3470,VMware VM @ i7-2620M | amd64-prefix:OpenSuse | Lila-Theme
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 5625
Location: almost Mile High in the USA

PostPosted: Sat May 20, 2017 1:57 am    Post subject: Reply with quote

Some of them, you get no SMART data through it.

Some of them will spin down but you can't control it.

Some of them, you just have to live with the fact it won't spin down... and not get SMART data either.

All depends on what the chip decided to implement and not to implement.

Genesys Logic is the worst one I've seen. All of the ones I've seen have no SMART pass through. One of them has powerdown but you can't control it as far as I know.

Initio - I've seen one with SMART but I don't remember if it passes powerdown properly. I used it for a CDROM drive so not sure how it behaves with a hard drive.

These USB-IDE bridges are a PITA...
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Massimo B.
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1421
Location: Germany

PostPosted: Mon May 22, 2017 6:11 am    Post subject: Reply with quote

So you mean from https://www.smartmontools.org/wiki/Supported_USB-Devices supported list I can't even know how many of the SMART commands and power mode commands are supported? I noticed that all the power mode commands don't seem to be even SMART commands, though they are implemented in smartctl.
Which chipset is the best in general? This is some Cypress chipset eventhough I remember that I had some other Cypress chipset that I was able to power-off by smartctl.
_________________
ppc:PowerBook5,8 15"(1440)-G4/1.67,2G | amd64:Acer Z5610 (Core2QuadQ8200),i5-3470,VMware VM @ i7-2620M | amd64-prefix:OpenSuse | Lila-Theme
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 37743
Location: 56N 3W

PostPosted: Mon May 22, 2017 9:41 am    Post subject: Reply with quote

Massimo B.,

USB bridges are very hit and miss about what they deal with beyond data reading and writing.
Older samples don't even support LBA48 addressing.

I have just bought a USB 3.1 USB/SATA bridge. It won't pass the trim command to the SSD its connected to.
I know the drive supports it, since it used to be in a PC.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum