I have an external USB hard drive plugged in, and after a few minutes, when there's been no activity against it, it automatically spins down, stops, and is unmounted. Is there a way to keep it spinning so I don't lose the mount?
Cheers
I have an external USB hard drive plugged in, and after a few minutes, when there's been no activity against it, it automatically spins down, stops, and is unmounted. Is there a way to keep it spinning so I don't lose the mount?
Cheers
I had been looking for that answer for a Seagate FreeAgent drive, the 2 answers I found were 1) use the Seagate utility on a Windows machine to disable auto-spindown, or this page which explains how to do the same on Linux using sdparm. (but as psusi pointed out, when the drive goes into auto-spindown it shouldn't unmount, at least on recent kernels.
If you just need to make it work now, you can set up a loop to touch a file every 30 seconds:
while true; do
touch /media/disk/.tempfile
sleep 15
done
One way to use this is to make a bash file with that script and make another one containing:
screen -mdS "some name for the screen" "name of the bash file that you created earlier"
For example: screen -mdS spin spin.sh
That way you can close the ssh session without ending the script.