Apparently, hdparm only works with internal HDD's.
How do I avoid an external HDD from spinning down after half a minute?

One way is to read one sector using badblocks or dd each 29 seconds in an infinite loop.

Is there another way to keep the HDD spinning?

Edit: SMART is also not supported by that HDD. hdparm -y also does not work, but works for a different external HDD.

  • 1
    Make and model of HD? – roaima Mar 7 '19 at 11:51
  • @roaima Intenso Box 4TB. Very common in Europe. – neverMind9 Mar 7 '19 at 13:24
  • 1
    That's the make of the casing. What's the make and model of disk? – roaima Mar 7 '19 at 15:01
  • @roaima Model of the disk? Not sure. (lsblk -S does only show “External USB 3.0 HDD” or something similar.) – neverMind9 Mar 7 '19 at 18:15

From the DESCRIPTION paragraph of man hdparm:

hdparm provides a command line interface to various kernel interfaces supported by the Linux SATA/PATA/SAS "libata" subsystem and the older IDE driver subsystem. Many newer (2008 and later) USB drive enclosures now also support "SAT" (SCSI-ATA Command Translation) and therefore may also work with hdparm. E.g. recent WD "Passport" models and recent NexStar-3 enclosures. Some options may work correctly only with the latest kernels.

So yes, hdparm will work with some external HDDs: basically all eSATA HDDs and those USB HDDs which are using SCSI-ATA Command Translation.

For specifically Western Digital HDDs, there is also the idle3-tools package. If you can read the SMART information from your WD external drive, then idle3-tools should also work.

And it's likely you could take the drive out of the enclosure, plug it into an internal SATA cable, use hdparm to change its settings persistently, and then place it back into the external enclosure. Of course that voids the warranty, if you care about that...

  • The only problem is that in most consummer grade controllers SMART lies a lot/is not properly implemented. – Rui F Ribeiro Mar 6 '19 at 15:54
  • The idea is, if the USB-to-SATA adapter chip in the external enclosure can pass through the SMART commands, then the commands of the idle3-tools should also pass through the adapter chip to the actual disk. – telcoM Mar 6 '19 at 16:08

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.