2

I got an HDD attached via dock station. Gentoo spins it down each ten minutes which leads to wearing out the disk spindle and moreover, waiting for the drive to spin up each time is inconvenient. I’ve tried hdparm -B255 and -S0, but these commands do not work on the disk, hdparm returns with an error

HDIO_DRIVE_CMD failed: Invalid argument

And reports that Advanced power management is disabled. Though the disk keeps spinning down often. If I detach the USB cable from the laptop, while the disk is running, it can work until I turn off the dock station, so the problem is in the OS. I’ve read that ATA commands cannot passed through the USB controller, but OS somehow manages to spin it down? How do I prevent that?


Update:

# hdparm -I /dev/sdb | grep Advan
        Advanced power management level: disabled

# hdparm -B255 /dev/sdb
/dev/sdb:
 setting Advanced Power Management level to disabled
 HDIO_DRIVE_CMD failed: Invalid argument
 APM_level      = off

# hdparm -S0 /dev/sdb
/dev/sdb:
 setting standby to 0 (off)
 HDIO_DRIVE_CMD(setidle) failed: Invalid argument
  • Actually, ATA commands can be passed through USB by using SAT ( en.wikipedia.org/wiki/SCSI_/_ATA_Translation ); hdparm should use that automatically. I've tried it on my WD WDBU6Y enclosure and hdparm -B, hdparm -y and smartctl -a all work. Maybe your enclosure doesn't support SAT? You could try to connect the disk directly via SATA, change the -B value and then put it back into the enclosure. – Martin von Wittich Jun 5 '16 at 15:02
  • My what? And what setting -B to 255 would change, if APM is already disabled? – tijagi Jun 5 '16 at 16:10
  • Enclosure, like in en.wikipedia.org/wiki/Disk_enclosure . Well, docking station in your case, but I assume there's no real difference when the docking station is connected via USB. Are you sure that APM is really disabled, or is it possible that hdparm isn't reporting correct values because it can't properly communicate with the disk? You quoted an error message, but it's not entirely clear which of those commands resulted in this error. Could you post the complete output of each command? – Martin von Wittich Jun 5 '16 at 19:19
  • I’ve updated the post above with hdparm output. – tijagi Jun 6 '16 at 12:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.