I have 3 SATA HDDs in my server. The first one is a SSD system drive, and the other two (in JBOD) are being used to store some data (accessed via Samba). Most of the time when there are no requests, those two data drives can go to sleep. However only one of those two does.

I have already set the noatime flag in fstab for both drives and Im pretty sure that there's no cron job accessing this drive. I also set the spindown timeout to 10 minutes (hdparm -S 128 command) for both.

Is there a way how do I determine which application still accesses the drive and preventing it from going to sleep?

I wouldn't normally care whether the drive is sleeping or not, but as this is a home server, setting those two drives asleep is worth saving some energy. The OS is Ubuntu Server 10.04.

Thanks for tips.

4 Answers 4


You could try powertop.

Another thing to try is to check which processes have files open on the filesystem in question. See the tools "lsof" and "fuser".


I've also heard good things about powertop.

However, you could also look at iotop (found on newer distros). iotop also help you identify what programs are writing to disk.

(It's also generally useful to see how much io a given process is doing.)

Good luck.


As you are on linux, you can use the new fatrace utility, which logs every file access and tells you which process is responsible:


More information here:


It makes use of the linux fanotify API (more details) available since linux kernel 2.6.37.

fatrace isn't packaged by most distributions as of July 2014 (it entered debian testing recently, so should ship in 'jessie'), but is easy to install from source.


I believe the drive handles this.. Doesnt hdparm edit the harddrives conf???

I used the exact same configuration to put my disks to sleep.. Movies/Music/Pictures worked great, a small 40gb disk for my OS and logs :D

i know that NFS keeps the disks alive, writing logs also.. basically any binary that needs or could stat a file on the underlying disks would keep them spinning

Take a look at what your storing on these disks.. other than static files and the applications which work refer to them..

You must log in to answer this question.

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