I've got a external HDD connected to my home server (ubuntu 16), which is used to back up some dirs with rsync. Periodically ubuntu mounts that drive with crontab and does the backup. On complete, it umounts the drive. My server is only running through the day, so it shutdowns in the evening and boots in the morning. My concern is, that the drive keeps spinning during the hole up-time although it is only needed for that specific backup. Can I prevent it firstly from start spinning on startup and secondly keep spinning after umount?
Asked
Active
Viewed 75 times
2 Answers
0
You could make a cronjob which mounts and immediately spins down the HDD at every reebot.
The HDD will awake when a program tries to perform an I/O operation on it. As soon as the backup script did his work you can spin down the HDD again.
Have a look at hdparam and on this answer

MMtn
- 3
0
You can run hdparm -Y
on the drive to spin it down after your backup finishes and you unmount the drive.

psusi
- 37,551