Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am curious about a particular matter. Recently I have purchased a small plug computer that I will use as a torrent server and networked file storage. The thing is I will attach an external HDD to this linux box. Now I am curious about something. The HDD is powered on while the box works, but once the work is done the disk seems to keep running and does not spin down automatically - even though there is no I/O happening.
My question is whether I should add a script that automatically powers down the HDD after a while of inactivity to save electricity or is it better to keep the disk spinning? How does spinning down a HDD affect its health?
Spinning down a drive will have no ill effects, and in fact some of the newer high-efficiency drive will actually spin themselves down after a period of inactivity rather than rely on software to tell them to do so.
The amount of energy you save will depend on a lot of factors. On my own system, the drive spinning takes around 10 watts, and when spun down only 2 watts. Admittedly, this isn't a huge power savings (about equal to a night-light), but there is no reason to burn the energy if you don't need to.
I am fully aware how to spin down a disk using sdparm. sdparm -C stop /dev/sg0 (yes, that's /dev/sg0, not /dev/sda)
While the newer disks may spin down on their own, mine does not. I will have to write a script that monitors the I/O of the HDD to power it off once it has been idle for a given time, add it to cron jobs. The reason I'm asking is because I don't want the disk to spindown and spinup too many times. I assume that doing so will degrade its health and lifespan.
What idle spindown interval do you suggest I set? 3 hours?
My server is setup to sleep the storage drive after only a few minutes of inactivity; 3 hours seems like an unnecessarily long time for a home file server.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.