Hey guys,
I have a setup of four HDDs mounted to a QUAD SATA head on a Raspberry Pi 4. Currently I have the problem that my HDDs keep spinning after powering down my raspbian installation. All LEDs are off (except a green LED on the SATA hat and the red power LED on the Pi).
Why is this happening and how can I prevent this behaviour.
I’ve similar issue, after shutdown : fan of HAT still running (but no display). Only when I’m removing plug system fully stop. (I’ve connected plug with my phone I can fully shutdown the powerplug and reconnect to start my RPI, my RPI is in garage).
Seeing the same issue, main difference in my setup is that I only have one hard drive, I installed OMV using the setup script they provide, and I didn’t update the firmware (because the forum post detailing the process said not to).
thanks for the hint. That helped for the automatic spin down.
But this didn’t solve the problem of the spinning HDDs after powering off the raspberry pi.
I found the solution to add the following systemd unit:
[Unit]
Description=Handles all initialzitations of the HDDs.
Wants=rockpi-sata.service
After=rockpi-sata.service
@frogtime Cool! Could you please explain it in detail how you did that with that systemd approach for automatic spindown at shutdown? I’m just a linux noob
I think the problem is indeed the APM level of the disks @StephaneP. I wrote a systemd service file where the APM is set to 127. If the level is higher the disk won’t go to sleep.
My systemd .service file:
[Unit]
Description = service file for disk 1
After = disk1.mount
Requires = disk1.mount
[Service]
Type = oneshot
ExecStartPre = /usr/sbin/hdparm -S 12 /dev/disk/by-uuid/xxxxxxxxxxxxx
ExecStart = /usr/sbin/hdparm -B 127 /dev/disk/by-uuid/xxxxxxxxxxxxx
[Install]
WantedBy = multi-user.target
More information about this can be found here:
I’ll keep the link updated here because it’ll change in the near future. I will also add a shutdown script I am still working on but I think with setting the APM level, the disk will also stop on shutdown.