I'm running Debian 13 (fresh install) and want to use specifically Nextcloud and Immich on docker on an SSD and 2 HDDs with 10TB for data (and the second for raid/snapraid or backups or similar). For power efficiency and to make it quiet, I want the HDDs to spin down since the server is in idle 90% of the time. I know this is not standard and produces wear, but I have multiple unused drives, and for family reasons it's important to have the server quiet and efficient.
I looked into autofs and bcache and other software that allows me to spin down the HDDs. hdparm -Y doesn't spin down the HDDs, since the Kernel is keeping them active. I also tried external ext4 journaling on the SSD where the os runs. But still no spindown with hdparm or hd-idle. This only works, when I unmount the drives.
My question is, how can I spin down the drives, while still "seeing the files". Best case I want to have a cache like bcache and have most files hit the SSD and transfer them automatically to the HDD afterwards (in up to 24h intervals or when necessary). However I need the files to be visible for Nextcloud and Immich etc. even when the HDD is spun down. The wait time for spin up, when I request a very old file is acceptable. Also the "problem" that the cache ssd could break and data that's only on cache is lost is tolerable (up to N hour data loss is acceptable if the SSD breaks). Can I use bcache with autofs for this? Does bcache work, when the HDD is unmounted and spun down? Is there a better solution to this problem?
I tried putting the disks in some states and measure power consumption with a cheap power-meter at the plug of the pc. Values are with usb keyboard and hdmi cable attached and go further down by 1,2 W if those are removed:
~35-40 W writing to HDD
~30 W idle discs active
~28.5 W idle HDDs unmounted
~19.8 W idle with HDDs in standby (hdparm -y)
But: however long I leave the pc on and without any program installed or running (I freshly installed debian without any non-standard program (except htop, nvim and some tools like hdparm, which I use for this), I never stop hearing the HDDs. Also the status remains active/idle, when asked by hdparm -C.
So I really want to stop the drives, since those 10 W add cost and not useful power consumption and they are too loud for my family to live next to.
Is there a way I can debug further? See the io traffic on the drive or so something to allow the disks to really unmount and still be cached by the SSD?