I have a “standard” Ubuntu 24.04 computer that I am using as a home file server. It is also a dual boot system with Windows 11 when needed. I have 2 - 14TB Seagate Expansion external USB hard drives that I use for storage and storage backup. When setting up the external drives, I erased everything and formatted them as NTFS to start from scratch (no Seagate “stuff” on them anymore).
When booted into Windows 11, when idle, they will spin down and go into sleep mode within a few minutes. This does not happen in Ubuntu. I tried using them on my Ubuntu 20.04 laptop with the same outcome. Since they are for storage I, of course, don’t want them to run all the time to help prolong their lifespan.
Does anyone have any idea why this behavior is happening? Is there something I can check to see if a process is keeping them awake? I’m sorry, I don’t really know the first place to look and search was not very helpful.
I don’t have a solution but if you are using the external drives for backup/storage, why would you keep them attached? If they are formatted ntfs, that is a foreign filesystem to Ubuntu/Linux . If you have windows hibernated, then Linux isn’t going to be able to do anything with the drives. Hopefully someone else will come along with a suggestion as I don’t use sleep or hibernation.
Thank you for the reply. Perhaps the description of my issue wasn’t clear?
This computer is a mini PC so no room for extra internal drives. It is also used as file server - music, movies, photos, other files. These files are stored ON the external drive I’m referring to (and the backs up to the other nightly as a CRON job) so they need to always be plugged in.
I want them to be in “sleep” mode, spin down, when idle and not being accessed, then wake when called. This behavior occurs in Windows without any additional steps. I booted into Windows to test; then, shut down and returned to Ubuntu. It is virtually always booted into Ubuntu.
I would like this behavior to occur in Ubuntu as well.
In similar issues, I’ve seen many users recommend using hd-idle, as it often handles USB drive spin-down more reliably on Linux than the default power management.
You can also tweak your systemd (I don’t know where exactly) in a way that specifies a spin-down of your USB every time you put your computer in sleep/hibernate mode.
One of the “*wants” directives ( under /etc/systemd/system/ ) needs to be modified to add a “preamble” drive spin-down, using the hdparm command (below will have wait of 6 x 5 => 30 seconds before spin-down).
I was able to get them to spin down after a specified amount of time using HD-IDLE, so thank you. I am still having issues though. They wake after a short while and I’m not sure what process is waking them.
Is there a program I can use to monitor, and log, I/O for a specific hard drive to see what is calling and keeping them awake?
Great to hear that hd-idle is working for spin-down
To find what’s waking the drives, you can try tools like iotop (real-time per-process disk I/O) or inotifywait to monitor filesystem access.
Another very useful option is enabling auditd to log read/write events for a specific block device or mount point.
Also check common culprits like smartd, file indexers (Tracker, Baloo), or backup services — they often wake external drives periodically.