SOLVED Something definitive on spinning down HDD disks

NumberSix

Contributor
Joined
Apr 9, 2021
Messages
188
Hi
I have some thoughts on trying to get spindown to work in TrueNAS.

I have wanted to get my HD's to spin down under TrueNAS since before I installed it. The promise of that facility was important to me. After some extensive investigation, reading almost everything I can find on the topic in this forum, and after hours of tedius experiment, I'm going to stick my neck out and say - it flat out doesn't work.

What this post is not about: I hear all the opinions that say you shouldn't spin down a drive, it shortens their lifespan etc, and although that may well be true, I want to set all that aside. I am just focused on the observation that it's a facility that's offered in the GUI and something my pattern of usage would see as a benefit, not to mention the green aspect of it, so - arguments about what's best is not is not what this is about so I thought I'd head all that off at the pass and just focus on the practicalities.

Following advice on this forum and elsewhere, I set Storage/Discs/Hard drive 1 to Level 127, Force HDD standby, and HDD standby (time) to 5 (mins) - I am sitting here testing this remember! As is often reported, this didn't work. I define not working as both not spining down, or spinning down only to spin up again a couple of minutes later. On further reading, I became aware of the impact of writes to the system and the antics of plugins in keeping the drives from spinning down. So I bought a SDD to put the System on and also move the jail and (both) my plugins to. That should deal with that issue, right? Wrong. The disks still only spin down for a couple of minutes then wake right back up again. Lastly, I played around with the poorly documented "S.M.A.R.T. extra options". There's a darth of relevant examples but I played around with most permutations of -n standby, -n standby,0, prefaced sometimes with -d ata, -d, sata, and even -d marvell. I might as well have tried -please and -pretty please for all the impact these had.

Next, I tried switching off the plugins - the plugins that were jailed on an SSD by now. That made an impressive amount of no difference too, but by now I'm willing to try facing south and reciting Black Sabbath lyrics backwards if there's a chance it will make disks spindown & stay spun down.

Finally, I took the nuclear option. I turned off SMART. Completely. Guess what??! Spin down!. Spin down that stays spun down. This tells me that SMART is, without doubt, the elemenent here that's causing spin down to fail. It also tells me that all of the controls in the GUI are powerless to stop it (except for the Off switch). So here's the gauntlet I'm going to throw down; I'll say something definitive about spinning down disks with TrueNAS. Spindown does not meanigfully work, no matter what you do, unless you're prepared to switch off SMART completely. I can't tell you how much I hope that provokes someone who knows differently and can explain how, to step forward and, well, do that thing!
[EDIT] It turns out I am completely correct in my assertion. You have to switch SMART off. All other config changes are fully ineffective.

Meanwhile I'm thinking 'how vital is SMART anyway'? All my disks in the last decade have had it, and it never results in any warnings about disk failure - you find out they are dead when they die is the rule. I don't have the time to pour over logs looking for exotic warning signs if that's what's needed to benefit from SMART, so maybe this is one heresy worth considering as the price of a working spindown option.

Food for thought I hope.
 
Last edited:

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
I'm in the "disk drives are not meant to be spun down" camp, yet I completely understand your intentions. Just want to comment on the SMART aspect.

I have never ever had an advance notice by SMART for a spinning hard disk failing - so I guess I can support your cause.
I consider SMART data absolutely essential for SSDs because I want to monitor the write load on the device. But SSDs don't need to be spun down.

Just my experience and opinion, little hard data to back it up. I have my spinning disks spinning 24x7.
 

rogerh

Guru
Joined
Apr 18, 2014
Messages
1,111
When you say disable SMART, do you mean just stopping any attempts to monitor smart parameters, or do you mean disabling SMART functions of the drives in the BIOS (or whatever it is now called) or by hdparm or something?
 

NumberSix

Contributor
Joined
Apr 9, 2021
Messages
188
Hi Patrick. Thank you for that: knowing I'm not alone in getting no warnings from Smart is oddly reassuring. As for SSDs, I completely concur with you. Some sort of advance warning (if Smart can reliably provide it?) would be of immense value. I wonder what you're looking for in 'write load' though? Is there any value or threshold that could indicate impending failure? Actually I will do a tangential experiment: check that I can run Smart on the SSD and not the HDDs, and hopefully confirm that there is no "cross talk" that spins up the HDDs as a side effect.

Roger. I mean disabling Smart in the GUI only. Unchecking the check box. It seems to be the only Smart control in the GUI that works, so no need for me to go poking around in whatever the new word for Bios is. Now I had to go remind myself! It's "Extensible Firmware Interface (UEFI)". So, I left the UEFI alone on this occasion :).
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
I've had SMART fail on various drives over the years, but generally the PASS/FAIL status doesn't flip to "fail" until the drive is spewing all sorts of issues. The failed drive bin here is filled with at least a hundred drives...

The part where SMART is really handy is that it monitors for minor issues like unreadable pending sectors, and you can issue SMART long tests a few times a week to make sure your drives are readable. ZFS has a major deficiency in that area. Unreadable pending sectors are frequently correctable by forcing a write to the affected sector, so this can potentially help extend the life of a disk, such as a disk that went from 73 unreadable to zero, but is back up to one this morning. It's at 47K hours lifetime. However, it's 2500 miles away, so it is easier/cheaper to sit in my chair and play with it from afar than it is to get the drive replaced, so I'll continue to play with it a bit until its direction is clear.
 

masru

Dabbler
Joined
Aug 9, 2020
Messages
26
My disks spin down just fine, and I did not deactivate anything SMART-related. In my case it works as intended -- and "out of the box" with the GUI interface and without any tuning or tricks.

Short question: where is your "system dataset"? It's usually on the first pool and there are updates to it every few seconds.
 

NumberSix

Contributor
Joined
Apr 9, 2021
Messages
188
I've had SMART fail on various drives over the years, but generally the PASS/FAIL status doesn't flip to "fail" until the drive is spewing all sorts of issues. The failed drive bin here is filled with at least a hundred drives...

The part where SMART is really handy is that it monitors for minor issues like unreadable pending sectors, and you can issue SMART long tests a few times a week to make sure your drives are readable. ZFS has a major deficiency in that area. Unreadable pending sectors are frequently correctable by forcing a write to the affected sector, so this can potentially help extend the life of a disk, such as a disk that went from 73 unreadable to zero, but is back up to one this morning. It's at 47K hours lifetime. However, it's 2500 miles away, so it is easier/cheaper to sit in my chair and play with it from afar than it is to get the drive replaced, so I'll continue to play with it a bit until its direction is clear.
Hi Jgreco
That's interesting, and scary you spotted a ZFS deficiency in exactly the sort of area that I thought ZFS's strengths were located! Eek! I'd like to know a bit more detail (like, um, a tutorial!) on what the signs are you look for in a Smart report, and exactly how you go about writing to the dodgey sector? Is there anything you can point me to that will teach me how to do this - or if it's not too onorus, perhaps you could flesh out the process yourself? Thank you, either way!
 

NumberSix

Contributor
Joined
Apr 9, 2021
Messages
188
Short question: where is your "system dataset"? It's usually on the first pool and there are updates to it every few seconds.

Hi Masru.
I covered that point where I said:

"So I bought a SDD to put the System on and also move the jail and (both) my plugins to. That should deal with that issue, right?"

So yes, it's on a SSD, Awell away from the hard drives that won't stay spun down. It achieved nothing.

Cheers.
 

masru

Dabbler
Joined
Aug 9, 2020
Messages
26
Sorry, I missed that. I rechecked my config: I didn‘t check the box „Force HDD standby“ — did you test that as well?
And I assume you make sure nothing can access the NAS while you test this?
 

NumberSix

Contributor
Joined
Apr 9, 2021
Messages
188
Hi Masru. Funnily I though I had checked all permutations - but you're right, I didn't try un-checking that 'Force HDD Standby' box. I'll give it a try and report back in a day or two. Thank you.
 

scandrew

Cadet
Joined
Sep 22, 2021
Messages
5
I stumbled upon this thread as I was trying to figure out why my disks wouldn't stay in a standby mode for more than a few minutes. And I can confirm, after unchecking "Enable SMART" option for all of my HDDs, the disks are now staying in standby mode.
Thank you NumberSix!
 

NumberSix

Contributor
Joined
Apr 9, 2021
Messages
188
I stumbled upon this thread as I was trying to figure out why my disks wouldn't stay in a standby mode for more than a few minutes. And I can confirm, after unchecking "Enable SMART" option for all of my HDDs, the disks are now staying in standby mode.
Thank you NumberSix!
Thank you Scandrew! That's probably the first time I've received such a message as yours! Great that you found my experiences useful. Please don't forget to Like/Praise/Adore or whatever the recognition process of this Forum is. Cheers! :)
 
Top