I never got hdparm to work for me either. Hd-idle however works like a charm.
Linux
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
hd-idle is the solution. it's strictly better than the HDDs own feature, because if you have some system monitoring software that queries your disk stats every minute, that will always reset that timer. hd-idle is smarter than that.
Use -B instead.
Sets Advanced Power Management feature. Possible values are between 1 and 255, low values mean more aggressive power management and higher values mean better performance. Values from 1 to 127 permit spin-down, whereas values from 128 to 254 do not. A value of 255 completely disables the feature.)
Besides the caveats about disks living longer if they are kept spinning,
I think that's not necessarily true. I think spinning 24/7/365 has its downsides too, higher temperatures and others I'm less certain about.
are there reasons why I shouldn't setup a cron job (well, a systemd timer) that runs hdparm -Y every 10 minutes? (for example, could hdparm -y cause errors if run while the drive is being backed up?)
because you'll often shut it down while someone would be using it. and then it can spin up immediately. the processes accessing it would probably hang for half a minute or such.
there is a better solution, hd-idle, as said in the other response
Does the job get suspended if tasks are being done on the drive or will the task stall with the command being fired then the drive wakes up again defeating the purpose of the job?
When you spin up the drive, the motor has to overcome the mass of the disks to bring them up to speed, requiring more torque, current, and wear, than just keeping them at that speed. On the other hand, bearings don't wear out at zero RPM. Bearings go, motor goes, either way drive is dead. Regarding bearings ALWAYS mount drives so that they are horizontal, this results in minimal bearing wear and load.
The motors are brushless, so no wear happens during spin-up from the extra current other than a little more heat for a few seconds.
@MangoPenguin Same thing that happens to your car motor when you slam the accelerator from a dead stop rather than gradually accelerating and maintaining a steady speed. Everyone knows stop-and-go traffic is hard on cars, disk drives too.
Car engines have connecting rods and all kinds of extreme side forces on bearings that get stressed under high load. Brushless motors do not have any of those things, just a rotational bearing that doesn't experience any more load on startup vs constant speed.
The startup is absolutely more stressful for the motor. It's a period of high current that also creates hotspots in the windings and such. It's certainly not great for the motor.
Hotspots won't hurt anything unless they get too hot and damage the coating on the windings, I would assume the manufacturer is aware of that and designed the startup current so it's safe.