Page 1 of 1

Rpi4 w/ several USB harddrives idle spindown

Posted: Sat Dec 07, 2019 7:55 pm
by bluenote
There's a lot of conflicting information on how to deal with this. I see people saying certain methods are obsolete or not ideal, but from my perspective the info is a mishmash.

I have a few Seagate, Samsung and WD USB external drives that I plan to run off my RPI4 through a USB 3 hub, and currently the ones I have connected do not spin down on idle. What's the recommended way to do this with Raspbian Buster?

thanks

Re: Rpi4 w/ several USB harddrives idle spindown

Posted: Sat Dec 07, 2019 9:45 pm
by epoch1970
Solution 1: Use the automounter and let the firmware in the drives do their job when the drives are unmounted and idle for a while.
Solution 2: fliddling with hdparm, sdparm, ext4 settings, etc.

Re: Rpi4 w/ several USB harddrives idle spindown

Posted: Sat Dec 07, 2019 9:59 pm
by bluenote
epoch1970 wrote:
Sat Dec 07, 2019 9:45 pm
Solution 1: Use the automounter and let the firmware in the drives do their job when the drives are unmounted and idle for a while.
Solution 2: fliddling with hdparm, sdparm, ext4 settings, etc.
Are you suggesting manually unmounting when I am done? Because this drive will be accessed over the network sometimes. If you're suggesting something more automatic please give a few more details. Thx

Re: Rpi4 w/ several USB harddrives idle spindown

Posted: Sat Dec 07, 2019 10:38 pm
by epoch1970
An automounter looks after paths you've configured. It creates an empty path, traps any attempt to access the path and mounts the target resource (device, server share...) on the fly if needed. Once nothing uses the path for a while, it dismounts the resource. The original purpose was mounting NFS shares from central servers.

The systemd automounter is relatively simple to use: https://www.freedesktop.org/software/sy ... mount.html
(autofs5 is the traditional linux automounter. While considerably capable, making it work is sort of a flashback to the 80's. Probably not useful to most.)

There are a lot of threads about "automounting" in the forum, beware that half of them relate in fact to some USB/udev daemon that mounts USB devices when you plug them in. Same idea, same name (...) but not the same usage.

Re: Rpi4 w/ several USB harddrives idle spindown

Posted: Sat Dec 07, 2019 11:26 pm
by bluenote
epoch1970 wrote:
Sat Dec 07, 2019 10:38 pm

There are a lot of threads about "automounting" in the forum, beware that half of them relate in fact to some USB/udev daemon that mounts USB devices when you plug them in. Same idea, same name (...) but not the same usage.
Hence my confusion. I thought this was what you are talking about. Thanks for clarifying

Re: Rpi4 w/ several USB harddrives idle spindown

Posted: Mon Dec 09, 2019 5:25 pm
by bluenote
So far hdparm worked with 2, and hd-idle seems to be working with 3. :/