External hdds sleep problem can be solved?

please help me about external hdd sleep problem on ubuntu

1 Like

Keep them busy :smiley:

Open a terminal and run

watch -n 10 "sudo fdisk -l"

This will list your drives constantly, so they will be always active


i will now try thank you

This is just so on the spot and so easy to implement this is by far the best answer on the forum.

1 Like

For Windows that would be the powershell command :

while (1) {Get-PhysicalDisk; sleep 10}

To run on start, save in a .ps1 file, then open the startup folder (win+R > shell:startup) and create a .bat file with the following :

Powershell.exe -executionpolicy remotesigned -File “C:\Path\script.ps1”

The command “touch” worked for me. You can create a script thay each 5 min make a touch of a hiden file in a path of each of your disks. Then create a service systemd to run It on each restart or make a crontab job.

This is a good one. I have been using crontab;

* * * * * /usr/scripts/keepalive.sh

Where keepalive.sh is something like

for i in $(find /mnt -maxdepth 1 -mindepth 1 -type d); do
date > "${i}/date"