I use Ubuntu server to make a USB HDD available on the network using samba. It is constantly spinning. How do I get the system to “stop and park” the drive after some time of inactivity?
I run minimal server 24.04.1 LTS on a Dell Wyse 3040 Thin Client.
i have an extra drive i only access when i run backups or try to retrieve something from backups. it always is spinning. i think something checks it for changes periodically simply because a filesystem is mounted. unmounting everything on that drive seemed to let it spin down after a while. i noticed the spin-up lag when i mounted it back.
not so sure you can unmount it when it is idle and still serve it.
Thanks!
If this is a solution, is there a way to automate this? Meaning the system unmounts file systems which have not seen activity for some time and mounts them as soon as something attempts to access it?
I run automated backup jobs to the disk from other devices on the network so this cannot be a manual thing.