0

I just installed Ubuntu 16.04 LTS Server. And I want to disable hard drive when it is not used for a long time using SMART capabilities.

So, is it possible to prevent any Ubuntu writes on a hard drive in idle? And from what things should I start?

4
  • Check out man hdparm
    – Stormvirux
    Dec 2, 2016 at 11:44
  • It is not a problem to set hdparm to disable hard drives. The problem is the system always writes something there, so timout never reached. My question is how to prevent any disk writes, but not to set up hdparm.
    – GLaz
    Dec 2, 2016 at 13:19
  • What is writing to disk? Have a look at this question in terms of more aggressive disk caching. Can the program writing to disk use a RAM disk? Dec 2, 2016 at 18:55
  • This is also a useful answer Dec 3, 2016 at 9:28

1 Answer 1

0

You can set a disk to spin down when it is not accessed for a certain period of time

You need to edit /etc/hdparm.conf

try an entry along the lines of

/dev/disk/by-id/disk_id { spindown_time = 36 }

The spindown time is in blocks of 5 seconds, so 36 means spindown after 3 minutes on inactivity. disk_id is the id of the disk you want to spin down (ls -l /dev/disk/by-id to find the right one)

Not the answer you're looking for? Browse other questions tagged .