S.M.A.R.T. wakes up disks

I have some disks which are rarely used (backups) and I therefore spin them down to save power. If I disable the S.M.A.R.T. service, the disks stay in standby the whole day, so there is no read/write happening. However with the S.M.A.R.T. service enabled they wake up as soon as they are queried.

Since I set SMART to power mode “standby” it should not wake the disks. I tested with smartctl -a /dev/sda -n standby while the disks are in standby and smartctl correctly identifies the state and skips the test. I assumed the setting in TrueNAS does the same, but obviously I am missing something.

Any ideas what I could do?

In the GUI try this since you didn’t list if you had these set:
Services for SMART, set Power Mode = Sleep

Save it, the service “should” restart itself however I like to manually stop and start the SMART service. This will change the way ‘smartd’ runs.

1 Like

Maybe you missed it, but like I said I set the Power Mode option to “Standby”. I didn’t set it to “Sleep” because from the documentation (Powermode – smartmontools) it sounds like the wrong option.

I also confirmed it by calling

$ sudo smartctl -a /dev/sdc -n standby

smartctl 7.4 2023-08-01 r5530 [x86_64-linux-6.6.44-production+truenas] (local build)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org

Device is in STANDBY mode, exit(2)

As you can see this skips the check since the disk is in standby mode. However when I use sleep it wakes the disk:

$ sudo smartctl -a /dev/sdc -n sleep

smartctl 7.4 2023-08-01 r5530 [x86_64-linux-6.6.44-production+truenas] (local build)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
...
Power mode was:   STANDBY

=== START OF READ SMART DATA SECTION ===
...

This leads me to believe that standby and not sleep is the correct powermode to use.

I will try with sleep in the GUI setting and let you know, but somehow I doubt that this helps.

I think you misread my posting:

Key emphasis on “GUI”.

Honestly I do not know if this will work however it is quite possible that ‘smartd’ is using the values set in TrueNAS and overriding your manual settings.

As for which option to choose, you can use any of them however “Never” will wake the drives.

1 Like

No, I was not, but obviously I am not describing in a clear way what I did :wink:
I am setting these options in the GUI. I have not done any manual changes anywhere!

The tests with smartctl were just to confirm that SMART and my disks actually respect the power mode parameter. And they do as long as it is set to “standby”. With “sleep” they wake up. So the smartctl calls are not to set any option but simply to confirm that in general SMART and my disks behave correctly.

I also saw that the options from the GUI are correctly written into /etc/smartd.conf. So either smartd behaves differently to smartctl when it comes to that powermode, or one of the additional settings TrueNAS does cause the issue.

Using the GUI drop down menu under Storage/Disks these values keep the drive spun down for me when using a short Smart test.

image

It is too easy to have a communications gap between people, we make assumptions, even if they are unintentional, which leads to misunderstandings.

Hopefully you are able to rectify the issue. You should be able to sleep the drives and keep them asleep until they are needed.

1 Like

So after a lot of playing around I am back at the original setting with SMART set to power mode “standby” and suddenly it works…

I have no idea why the exact same setting didn’t work in my previous attempts. Maybe it was the reboot due to the system update.