HC2 - APM (Advanced Power Managment)

Post Reply
MikeSmith929
Posts: 33
Joined: Thu Dec 22, 2022 2:55 pm
languages_spoken: english
ODROIDs: H3
Has thanked: 1 time
Been thanked: 0
Contact:

HC2 - APM (Advanced Power Managment)

Post by MikeSmith929 »

Using an Odroid HC2 with a Western Digital 6TB WD Red NAS drive

I have Open Media Vault installed on it via Armbian Bookworm.

Looking here https://wiki.odroid.com/odroid-xu4/soft ... _fw_update I see you can flash the firmware with a spin-down timer.

Is this applicable if I have a WD Red NAS and it doesn't support APM / spindown timer?

I ran

Code: Select all

sudo hdparm -B /dev/sda
to verify this.

Can you not set the spindown timer on WD Red NAS drives because they should never spin down?

What is the proper way to set this if at all?

Finally I was going to update the firmware but when I ran :

Code: Select all

./JMS578FwUpdate -d /dev/sda -v
I got:

Code: Select all

Bridge Firmware Version: v173.1.0.2
So doesn't that mean I have the latest firmware?

User avatar
odroid
Site Admin
Posts: 42478
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 3705 times
Been thanked: 2079 times
Contact:

Re: HC2 - APM (Advanced Power Managment)

Post by odroid »

You seem to have the latest firmware.
What happens if you run the command of Example 4 in the wiki page?

BTW, If Armbian or OMV background programs or services access your HDD periodically/continuously, your HDD will not spin down no matter how long you wait.

User avatar
mad_ady
Posts: 12034
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4 (HC1, HC2), C1+, C2, C4 (HC4), N1, N2, N2L, H2, H3+, Go, Go Advance, M1, M1S
Location: Bucharest, Romania
Has thanked: 663 times
Been thanked: 1298 times
Contact:

Re: HC2 - APM (Advanced Power Managment)

Post by mad_ady »

Don't rely on the reported version number. Multiple different firmwares report the same number.

Regarding spindown - you have 2 options. Flashing a controller firmware that sets a spindown time and spins down the drive, or run a userspace tool that monitors hdd activity, like hd-idle, and instructs the drive to spin down. hd-idle works also when using usb-sata adapers and you can't update the firmware. For wd drives, there's also wdidle3 utility that controls spindown/park frequency from the drive's onboard controller.

Note that you'll need to turn off smartmontools/smartd or daemons that make use of it to read smart data, like hdd temperature, because for most drives it counts as accessing the drive and it prevents sleeping.

Regarding - is it healthy to spin down a wd red? - I don't know. For infrequent use (e.g. 1h spinup time per day), I'd say it's healthier for the drive to be spun down most of the time. For 24h action, maybe you shouldn't spin it down.

I personally spin down my WD Green and Blue with a hd-idle:

Code: Select all

cat /etc/udev/rules.d/90-disk.rules
#udevadm info --attribute-walk --name=/dev/sda
# HDD Seagate
ACTION=="add", ENV{DEVNAME}=="/dev/sd?", SUBSYSTEM=="block", ENV{ID_SERIAL_SHORT}=="NA4TEVC6", RUN+="/sbin/hdparm -S 60 $env{DEVNAME}"
# HDD WD Green 3TB
ACTION=="add", ENV{DEVNAME}=="/dev/sd?", SUBSYSTEM=="block", ATTR{size}=="5860533168", RUN+="/usr/local/sbin/hd-idle -a $env{DEVNAME} -i 630 -l /var/log/hd-idle.log"
# HDD WD Blue 4TB
ACTION=="add", ENV{DEVNAME}=="/dev/sd?", SUBSYSTEM=="block", ENV{ID_SERIAL}=="WDC_WD40EZRZ-00GXCB0_WD-WCC7K4PCS6CD", RUN+="/usr/local/sbin/hd-idle -a $env{DEVNAME} -i 630 -l /var/log/hd-idle-4TB.log"
These users thanked the author mad_ady for the post:
odroid (Tue May 14, 2024 4:03 pm)

MikeSmith929
Posts: 33
Joined: Thu Dec 22, 2022 2:55 pm
languages_spoken: english
ODROIDs: H3
Has thanked: 1 time
Been thanked: 0
Contact:

Re: HC2 - APM (Advanced Power Managment)

Post by MikeSmith929 »

Thank you mad_ady and odroid for the quick response.

Am I correct in understanding:

I can either do what ordoid said and try to flash with a spindown timer from Example 4 in the wiki

or

do what mad_ady suggested and use hd-idle and spin it down that way.

Either way I should turn off smartmontools / smartd or daemons that make use of it to read smart data.

Logically my next question will be to ask how do I figure out what daemons exist in my build that trigger hard drive activation?

User avatar
mad_ady
Posts: 12034
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4 (HC1, HC2), C1+, C2, C4 (HC4), N1, N2, N2L, H2, H3+, Go, Go Advance, M1, M1S
Location: Bucharest, Romania
Has thanked: 663 times
Been thanked: 1298 times
Contact:

Re: HC2 - APM (Advanced Power Managment)

Post by mad_ady »

Logically my next question will be to ask how do I figure out what daemons exist in my build that trigger hard drive activation?
This is more difficult, but:
1. To rule out userspace tools that go through the data, unmount all the drive's partitions and wait for it to spin down. If previously it didn't spin down, but now does you can locate the guilty party with the help of inotify or auditd. Details here: https://adrianpopagh.blogspot.com/2023/ ... m.html?m=1
2. If it still doesn't spin down while unmounted, most likely something uses smartmontools to query the drive. This can be smartmontools service (which sends emails to warn you of failing media), or some ui tools - I had webmin, which measure hdd temp. I suspect omv does the same. Try stopping that tool to see if the disk spins down.

Post Reply

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 1 guest