hdparm does not work for my USB external drive (it spins down too early), I’d like to simulate stand-by control manually by a simple script with the following idea:
- monitor I/O to the disk
- when, except for the script itself, there is no I/O from other processes for some time, produce dummy I/O to keep disk alive
- after some time let drive spin down
- the dummy I/O should at best be nothing that actually reads or writes to disk (and therefore moves the mechanics producing wear-out) but maybe read some status etc.
I’m not experienced enough in Bash scripting to know which commands could be used. Any suggestions? The system is Arch Linux.