HDD Sleep/Spindown/Standby

Well, the Community Edition apps and VM features aren’t much use to Enterprise customers, yet IX seems to have spent some time and resources on their development over the years. Perhaps spin down is viewed as not contributing to the expansion of the CE adoption rate enough to justify the effort to maintain it.

@etorix

I cite @ark

I made and shared the changes needed for spin down to work properly when configured as described in the official documentation

This is all what is asked for now.

A bug report has already been created, with no reply yet.

The patch given here in this post is simple, and should be a change done in less then 1h by a dev.

I hope that making this centralized post will motivate someone at iX to work on this, or at least have a look at the bug report, and update it to give more info.

All the best :slight_smile:

5 Likes

You mean like they cared about the biggest feature request on the forum about bringing back the smart GUI? I doubt it will help…

I have my opinion on this topic, but it is out of context, so thanks for not doing these kind of comments.

I’ve applied the patch to 25.10.1 and enabled the spindown script again. I’ll report on how it’s going in a day or so

1 Like

The patch with the spindown shell script works. All my disks fall asleep after 3 hours and then stay asleep until there is activity. This does include opening some of the webui tabs with disk info, but this gives me a great 20 watt reduction during the weeks its storage is unused.

1 Like

Which script? I did the patch and out of 5 drives I always have at least 2 spun up, including the currently unused spare for some reason.

I use this GitHub - ngandrass/truenas-spindown-timer: Monitors drive I/O and forces HDD spindown after a given idle period. Resistant to S.M.A.R.T. reads.
Which you setup as a startup script with some variables for which pool(s) and how long to wait. Works great for me.

Edit:

I do have to add it’s certainly not perfect. Sometimes I see the disks get woken up without actual disk activity, and so the script quickly puts them to sleep again. Not ideal, but with only 3 spin ups per day max I’m totally fine.

Thx, I use the same script but as a cron every 20m What args do you pass it on startup?

I run the following:

bash /home/myuser/spindown_timer.sh -u zpool -m -i storage -l -t 10800

where storage is the name of my pool of HDD’s and 10800 is 3 hours. So after 3 hours of no activity, it will spin down the disks. As for the disk settings themselves, the are all set to low power, but NO standby. Just to avoid it clashing.

It has about 10watt of impact currently, but I do plan to add more disks so this will help further.

You can see it stays spun down quite nicely (the little spikes are purely cpu related). The Idle with disks spinning is around 70watt, and with the patch and script it nicely drops to 60. (this is including other stuff in my server cabinet).

1 Like

Hi @zeroZshadow and anyone forcing the disks to spindown without patching the middlewared files.

The smart check in TN, which in 25.10 cannot be configured anymore, triggers every 90 minutes, and may spin up the disks depending on the model and how it reacts to smart queries, both my Seagate models gets spun up by that.

If you are using ZFS dataset encryption, the disks will spin up every 24hours as the sync_db_keys job triggers a write to the pool.

If you are using 2.5 inch disks spinning up that frequently may be fine but if you are using high RPM 3.5 disks that may significantly reduce its lifetime.

Another problem @zeroZshadow , you said you are using 3 hours standby time.

TN uses hdparm, which has multiple issues with long timers and some hdd models.

My Seagate Exos for example only work with up to 90 minutes standby timer using hdparm… timers longer than that are simply ignored.

Need to use seachest tools for that to work properly.

I did give it a try, same deal so I just reverted back to 25.4, set disks to sleep in the UI .. waited and…all asleep and quiet for the night.

2025-12-23 16:40:44 /dev/sda drive state is: standby
2025-12-23 16:40:44 /dev/sdb drive state is: standby
2025-12-23 16:40:44 /dev/sdc drive state is: standby
2025-12-23 16:40:44 /dev/sdd drive state is: standby
2025-12-23 16:40:44 /dev/sdf drive state is: standby

HDDs get reduced lifespan due to spinning them down?

What are your detailed supporting arguments for that?

That was true long time ago when the HDD motors were AC (vs brushless DC today), without gentle spin up and with ball bearings!

(grease would age and become sticky, which would then not allow the platters to spin up, or would drag them, overheating the motor, circuitry and power elements).

Longer life by having them on? Fluid bearings fixed that grease problem, but the extra heat alone would age capacitors faster. Yes, they use better sealed capacitors today, but 100% of electrolytic capacitors have a finite life (heat promotes the loss of electrolyte).

100% of the HDDs I look after, in servers (TN, Linux, Windows) or workstations (Linux, Windows) spin down.

In those 50, 60 HDDs, all of them are older than 5-7 years. Most of them running 24x7 and spun up and down anywhere between 6 to 12? times daily. Secondary TN systems go to sleep during the night and 2, 3 times during the day (which adds to the spin up-down count while running).

There are 30 to 40 HDDs that are older than 10 years with no issues or errors.

The only 3, 4 drives that have died, were the usual suspects, Seagate 3TB and a couple of newer 8TB and 12TB that died in less than a year. The replacements (8TB, 14TB and 18TB) were bought used and have been in service for 4-8 years with multiple daily spin up and down.

So, in my experience and electronics knowledge, spin up or down are not detrimental to HDD life.

When people don’t know the intricate details of how something really works, they believe anything they hear.

6 Likes

This is not an electronic problem, it is mechanical… as with virtually anything with moving parts, things do wear out over time, including the spindle motor which is one of the most common cause of hdd mechanical failures after head actuator failure and physical impact.

You do make a valid point in that spindle failure is not very common, but it is not zero and shouldn’t be ignored.

Virtually every hdd manufacturer calls out reliability specifications for their devices like this one that clearly says 50,000 motor start stop cycles under very specific conditions: https://www.seagate.com/staticfiles/support/disc/manuals/desktop/Barracuda%207200.11/100507013c.pdf

Look for any hdd tech spec out there and most manufactures will call that out.

And I didn’t say how many years an hdd would last under such conditions, I just said “reduce its lifetime“, and whether that will be 1 or 10 years of MTBF that is for each person to evaluate how much risk they are willing to accept.

I have some disks with more than 30k start cycles, an average of +8 cycles per day over 10 years, but I don’t use those for critical data.

People should be aware that there may be some level of risk with this and make their own choices.

Specially knowing that most home users do not follow the 3-2-1 rule and RAID is not backup.

1 Like

“each person to evaluate how much risk they are willing to accept.”

Exactly, when spinning rust drives where still common in pc’s as system drive (not THAT long ago) they where spun up every time one turned on the computer. And often shutdown by power management after inactivity.

So, yes. There might be extra wear and tear, but that should be up to the user.

There is also the annoyance of having have to wait for the drives to spin up when accessing them, also an annoyance I’m willing to endure to save energy and the environment (but in reality mostly energy though :wink: )

4 Likes

I agree that the load/unload cycles are important to check in the specs.

I’m using these, https://www.seagate.com/www-content/datasheets/pdfs/ironwolf-12tbDS1904-9-1707US-en_US.pdf

Which are clearly rated for 600k load/unloads. I could start and stop these multiple times a day and I still wont hit that number after 10 years.

2 Likes

Hello @joeschmuck

I have an idea: could I add some simple calculations to the script and present the changes of several key data points over time using a separate table?

  1. 04 (004) Start_Stop_Count: Absolute change compared to data from 1 day, 1 week, and 1 month ago; average number of start-stops per day; average number of start-stops per hour of power-on.

  2. C1 (193) Load Cycle Count: Absolute change compared to data from 1 day, 1 week, and 1 month ago; average number of loads per day; average number of loads per hour of power-on.

Reason: Many users want to monitor whether their sleep policies for hard drives are effective.

Which script are you talking about?

I will assume you mean Multi-Report. You are in luck, the data is captured in a “CSV” (spreadsheet) format already and it maintains the last 2 years worth of data (by default).

Well you made me want to try something new, here it is. If you are running Multi-Report and are using the default statisticalsmartdata.csv file to record the statistical data, then here is a script which does what you asked for. It only looks at HDD data, S.M.A.R.T. eh?

To Use:
Rename the file to generate_report.py
Make the file executable if it does not run: chmod +x generate_report.py
Most recent day: python3 generate_report.py --date_from day --diff_only
Most recent week python3 generate_report.py --date_from week --diff_only
Most recent month python3 generate_report.py --date_from month --diff_only
Dates python3 generate_report.py --date_from "2025/12/15" --date_to "2025/12/25" --diff_only
or
Dates python3 generate_report.py --date_from 2025/12/15 --date_to 2025/12/25 --diff_only

Remove the --diff_only and get the full report.
If your statistical data file is a different name, use --file_name "mydatafile.csv"
And you can use --h or --help, hint hint.

You can also pipe this into a file if you desire, for example:
Most recent week python3 generate_report.py --date_from week --diff_only >> Weekly_Results.txt which will create the file Weekly_Results.txt and each successive time you run the script it will append the new data. This will make it easy to consolidate the data should you want to do something like that.

I hope I have exceeded your expectations. Now if you are not using Multi-Report, well why not? :clown_face:

P.S. If there are typos, sorry, I did this sort of quick. Quick for me = 2 hours as I’m not good with Python but I’m getting better. This seemed like it would be an easy project so I decided to do it, and it helped me out as well.
generate_report.txt (4.0 KB)

1 Like

Thank you for your work :slight_smile:

I’ve been using Multi-Report since version 3.21 and am currently using 3.27; it’s a fantastic piece of work.:star_struck:

I know about the CSV file; even without Python, I could process the data in Excel within minutes. I’d like to suggest adding this feature to the daily emails sent to Multi-Report.

Most anomalous data is highlighted in orange or another color in the emails because a common threshold can be pre-set for almost all hard drives. For metrics like Start_Stop_Count and Load Cycle Count, I think it’s difficult to set a fixed metric for monitoring. Displaying it in a separate table would likely be a more convenient approach.

In Multi-Report v4.0, I am allowing the user to append personal attachments. You could use this feature to append the output of the script above. With that said, if I hear too many people have problems using this new feature, then I may remove it. I am using in on my v3.29 Beta. If I publish v3.29, it will be included. v3.29 would be a bug fix, not really an upgrade, but I’m using it and it works, so…

If you would like to test this version out, send me an email to joeschmuck2023@hotmail.com and we can chit-chat this way. Especially if you find small errors, this way I can fix them. Version 4.0 is not ready, I still have a lot to do and because I’m being anal about it, making sure I complete each function properly and not just getting it to work and then go back to make changes to make it easy to read and update. Version 3.x is a mess to edit. It started out simple and patch after patch, what a mess. I did it to myself.

1 Like