Disk temperature while in standby mode

ragametal

Contributor
Joined
May 4, 2021
Messages
188
So, i'm testing some settings to put my HDDs into standby mode to keep their temps down while not in use (these disks will only be activate once a day for remote replication tasks).

In any event, i was able to get the disks to spin down but i lost the ability to monitor their temperatures. When i go to Reporting->Disks TrueNAS advises that the temperature of the disks are not available and in order to enable it i should put the disks either in "HDD Standby - Always on" or to check the option "Force HDD Standby".

I did the second and the temperature of the disks are still not available. Do anybody knows how to get the disks to spin down and also report their temperatures? I'm using a pair of WD Red Pro WD161KFGX.

Also, i was a bit hesitant about using the "Force HDD Standby" option as there is very little documentation of it. According to this youtube video Spinning Down Disks | Managing TrueNAS Core , and i quote, this is "normally to force it into standby mode if its running software checks like a scrub or doing a snapshot". The implication here is that those extremely important tasks could be interrupted by the "Force HDD Standby" feature.

Do anybody know if this is true? Because if that is the case i cannot imagine why would anybody want such feature.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
If your disk is spun down, it's not generating heat, so the temperature isn't relevant anyway.
 

ragametal

Contributor
Joined
May 4, 2021
Messages
188
If your disk is spun down, it's not generating heat, so the temperature isn't relevant anyway.
I agree with you 100% but there are instances where it is helpful to know the temperature of the disks even when they are in Standby. In my particular case i constantly monitor the disks to identify how much temperature change they experience when they go from standby state to active state and back to standby.

I mean, if this cannot be done then that is fine, i will just accept it as a limitation of TrueNAS. I was just a bit surprised about it since the temperature of the drives can be obtained by smartctl -A /dev/ada0 even when the disks are in standby mode.

How about "Force HDD Standby"? do you know how it works or if i definitely should not use it?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
I don't claim to know a lot about spinning down disks as I don't do it myself.

I know that I've seen many a thread about how people don't get to the magical land of spun-down disks despite all the native settings they seem to set, so I have noticed that many folks turn to scripts like this one:

I personally log my disk temps to influxdb all the time, but I do that via a fan control script I'm running, so I'm not sure I can help you a lot there other than to link my perl code if you want it. For the disks where I don't use their temperatures to control the fans (like SSDs), I separately run a cron job every 5 minutes to catch those in the DB for the sake of completeness of the graphs I use, so maybe that could somehow get adapted if you wanted to use it.
 

ragametal

Contributor
Joined
May 4, 2021
Messages
188
I don't claim to know a lot about spinning down disks as I don't do it myself.

I know that I've seen many a thread about how people don't get to the magical land of spun-down disks despite all the native settings they seem to set, so I have noticed that many folks turn to scripts like this one:

I personally log my disk temps to influxdb all the time, but I do that via a fan control script I'm running, so I'm not sure I can help you a lot there other than to link my perl code if you want it. For the disks where I don't use their temperatures to control the fans (like SSDs), I separately run a cron job every 5 minutes to catch those in the DB for the sake of completeness of the graphs I use, so maybe that could somehow get adapted if you wanted to use it.
I also log my disk temps to InfluxDB but i use the integral reporting feature in TrueNAS. Your script sounds like a good workaround until i realized that these are the only drives on this system (besides the boot drive), this means that the script that will run every 5 minutes will reside on these disks.

Therefore, the cron tasks calling this script will prevent the disks from spinning down.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
You can store a script in root's home directory which is on the boot pool.
 

ragametal

Contributor
Joined
May 4, 2021
Messages
188
You can store a script in root's home directory which is on the boot pool.
I did not think about that. Your script might work in my case. Where can in download it?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703

Glorious1

Guru
Joined
Nov 23, 2014
Messages
1,211
I was just a bit surprised about it since the temperature of the drives can be obtained by smartctl -A /dev/ada0 even when the disks are in standby mode.
This does not work for me. I set my backup drives to standby using "HDD Standby" = 5 minutes, and checking the "Force HDD Standby" box. It works great: drives remain in standby, but the reporting graphs are still showing their temperature (I have yet to learn if they will wake for a scheduled SMART test, though).

However, I am unable to directly get SMART information from these drives while in standby. I've tried with and without the smartctl -d option with a few suitable settings, but nothing. How the heck does TrueNAS (13.1) do it? I've searched all the logs and can't find a command that's getting logged.
Code:
Tabernacle:~$ sudo smartctl -a -d sat,auto /dev/dao
smartctl 7.2 2021-09-14 r5236 [FreeBSD 13.1-RELEASE-p1 amd64] (local build)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org

Smartctl open device: /dev/dao [SCSI/SAT] failed: No such file or directory
Tabernacle:~$

And yet (I put it in standby about 6 am):
Screenshot 2022-10-31 at 10.19.21 AM.jpg

I want to get this temperature for a fan control and temperature reporting script.
 

ragametal

Contributor
Joined
May 4, 2021
Messages
188
This does not work for me. I set my backup drives to standby using "HDD Standby" = 5 minutes, and checking the "Force HDD Standby" box. It works great: drives remain in standby, but the reporting graphs are still showing their temperature (I have yet to learn if they will wake for a scheduled SMART test, though).

However, I am unable to directly get SMART information from these drives while in standby. I've tried with and without the smartctl -d option with a few suitable settings, but nothing. How the heck does TrueNAS (13.1) do it? I've searched all the logs and can't find a command that's getting logged.
Code:
Tabernacle:~$ sudo smartctl -a -d sat,auto /dev/dao
smartctl 7.2 2021-09-14 r5236 [FreeBSD 13.1-RELEASE-p1 amd64] (local build)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org

Smartctl open device: /dev/dao [SCSI/SAT] failed: No such file or directory
Tabernacle:~$

And yet (I put it in standby about 6 am):
View attachment 59583
I want to get this temperature for a fan control and temperature reporting script.
I'm sorry to report that is no longer my case.
After I updated to core 13.2, if the drives are in standby i can't obtain their disk temperature via smart nor via the truenas reporting GUI. So, you are better than me right now.
 

Glorious1

Guru
Joined
Nov 23, 2014
Messages
1,211
Correction, I'm actually on TrueNAS-13.0-U2. Is that what you're on too? I'm not aware there is a 13.2.

So weird that I'm getting system reporting of the drive temperatures in standby and you're not. Settings all the same?

Individual drive settings:
  • "HDD Standby" = 5 minutes (shouldn't matter the time)
  • "Force HDD Standby" checked
  • "Enable SMART" checked
  • "Advanced Power Management" Disabled
Services > SMART settings:
  • "Check interval" 60
  • "Power Mode" Never
 

Glorious1

Guru
Joined
Nov 23, 2014
Messages
1,211
Unfortunately, I find they will not spin up or even remain spinning during a scheduled SMART test. In order for a scheduled SMART test to work, I have to disable "Force HDD Standby", and then they never go into standby at all.

The Help for that control says "Allows the drive to enter standby, even when non-physical S.M.A.R.T. operations could prevent the drive from sleeping." Well a SMART test is a physical operation, right? So I thought that would override the standby. I guess the holy grail of standby is still unobtainable if you also want SMART tests.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
smartctl -a -d sat,auto /dev/dao... Seems like you used a lower case O instead of a zero...
 

Glorious1

Guru
Joined
Nov 23, 2014
Messages
1,211
smartctl -a -d sat,auto /dev/dao... Seems like you used a lower case O instead of a zero...
Oh, duh, good eye sretella. Thank you. However, in the meantime I've once again given up on putting this pool in standby, because scheduled SMART tests don't work.
 
Top