blazessdd
Posts: 12
Joined: Thu Mar 26, 2020 11:19 am

hdd spin even after shutdown

Fri Oct 02, 2020 11:38 pm

I have a raspberry pi 4 which has the disk always spinning tried to put it on sleep with hdparm hdidle sdparm ecc.. but after the spin down the disk spins immediately up, i use the pi mainly as wol server so i dont need the disk for long time.
A check with iotop shows that the journal is the culprit this need further investigation.
now the problem is thaht the isk keeps spinning even after the shutdown i don't know where to search about someone could give me a hand?

Kendek
Posts: 265
Joined: Thu Jul 25, 2019 4:39 pm
Location: Kaposvár, Hungary

Re: hdd spin even after shutdown

Sat Oct 03, 2020 7:34 am

blazessdd wrote:
Fri Oct 02, 2020 11:38 pm
now the problem is thaht the isk keeps spinning even after the shutdown i don't know where to search about someone could give me a hand?
Two things:

1. The bootloader EEPROM configuration, power off the USB ports:
WAKE_ON_GPIO=0
POWER_OFF_ON_HALT=1


2. UDEV rule to set the 'manage_start_stop'; with value '1' the kernel will spin-down the disks at system shutdown:
/etc/udev/rules.d/01-manage_start_stop.rules

Code: Select all

ACTION=="add|change", SUBSYSTEM=="scsi_disk", RUN+="/bin/sh -c 'echo 1 >/sys/class/scsi_disk/%k/manage_start_stop'"

LTolledo
Posts: 4106
Joined: Sat Mar 17, 2018 7:29 am
Location: Anime Heartland

Re: hdd spin even after shutdown

Sat Oct 03, 2020 9:29 am

issuing the shutdown command means that you've committed yourself to turn-off (remove, cut-off, terminate) power to the setup

so the simplest solution is to turn off the power to the setup....
no power..... no spin....
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

blazessdd
Posts: 12
Joined: Thu Mar 26, 2020 11:19 am

Re: hdd spin even after shutdown

Thu Oct 08, 2020 12:48 pm

Kendek wrote:
Sat Oct 03, 2020 7:34 am
blazessdd wrote:
Fri Oct 02, 2020 11:38 pm
now the problem is thaht the isk keeps spinning even after the shutdown i don't know where to search about someone could give me a hand?
Two things:

1. The bootloader EEPROM configuration, power off the USB ports:
WAKE_ON_GPIO=0
POWER_OFF_ON_HALT=1


2. UDEV rule to set the 'manage_start_stop'; with value '1' the kernel will spin-down the disks at system shutdown:
/etc/udev/rules.d/01-manage_start_stop.rules

Code: Select all

ACTION=="add|change", SUBSYSTEM=="scsi_disk", RUN+="/bin/sh -c 'echo 1 >/sys/class/scsi_disk/%k/manage_start_stop'"
got it thanks a lot : )

Return to “Troubleshooting”