Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

If I put Linux on my machine, what steps should I take so that it ONLY tries to access the hard drive when I physically work on it. i.e., the grinding sounds are annoying me when I try to fall asleep.

share|improve this question
    
Unmount the drives? –  a sandwhich Sep 27 '11 at 1:12
1  
I strongly suggest earplugs. –  Emilio M Bumachar Sep 28 '11 at 13:14
    
Get a small HDD? Laptop one? (Btw my new Black Caviar is faster than my old Samsung power saving HDDs. So yeah ... maybe newer = more silent.) –  Shiki Sep 28 '11 at 15:58
add comment

12 Answers 12

You can use iotop (preferably with a large interval and the -o option) to find out which program is writing to disk.

If you have enough RAM, you may also want to turn off swap with:

$ sudo swapoff -a

, or permanently by removing the swap line from /etc/fstab.

The typical culprits for I/O in the night are:

  • cron. This daemon allows one to schedule commands (like "update at 2am" or "clear sessions every 30 minutes"). Have a look at /etc/cron* and use crontab -e (there is one for each user) to find out what is being executed, and when, and remove the offending lines. Since most of the preconfigured cronjobs are indexing in some way, you can safely turn cron off if you don't depend on any action being scheduled.
  • logfiles Have a look at /var/log. If some file is constantly growing in there, consider reducing the program's log level. If you don't care about logs, turn them off in the programs and/or mount a memory filesystem at /var/log. You can find out which files change with what with $ sudo tail -f /var/log/*
  • On-disk temporary files. Usually, that means some process is writing to /tmp (you can find out with iotop). Consider mounting a memory-based filesystem (tmpfs) on there if you have enough RAM and the size of these files is limited.

You may also be interested in powertop, which shows which programs are waking up your CPU. If something unexpected is in there, consider filing a bug against the program.

On the hardware side, you can get a silent disk (an SSD has no movable parts, so it's a good candidate) or put the HDD to standby manually. hdparm (particularily the -C and -y options) is a good tool for that.

share|improve this answer
    
Best answer by far, finally someone that goes in some technical detail rather than just suggesting common sense really! –  UncleZeiv Sep 27 '11 at 16:50
add comment

Get a Solid State Drive (SSD), they contain no moving parts. That is the only guarantee.

share|improve this answer
4  
Or a quieter disk, and/or a more isolating case. It's been a long time since I heard any "grinding sounds" from my disks. –  Thomas Padron-McCarthy Sep 27 '11 at 6:45
2  
I was going to say new hard drive, not an SSD. Grinding sounds scary. D: –  Rob Sep 27 '11 at 14:11
    
Sorry, looking for a solution with my existing setup. –  sks Sep 28 '11 at 19:39
add comment

If you don't need your computer to compute anything, turn it off at night and you will save yourself quite a bit of power; not to mention you are then also eliminating the fan noise from lowering your sleep quality.

share|improve this answer
1  
Honestly... Pretty much the best option. –  Simon Sheehan Sep 27 '11 at 0:40
    
Not if he leaves the computer doing something just in memory, eg., as a network server as a router... –  woliveirajr Sep 27 '11 at 0:44
3  
It has to be turned on :) –  sks Sep 27 '11 at 1:09
    
Unless you have to make up for the heat it produces with other sources :p (if you live somewhere that is an issue that is...) –  Svish Sep 27 '11 at 11:15
    
@user82480 Why must it be left on? perhaps the reason it needs to be left on is the reason the HD is being accessed. What does the computer do overnight that requires it to be left on? –  Scott Chamberlain Sep 28 '11 at 21:43
add comment

You can try to use the hdparm command, it can change the HDD status. But not all HDDs suport it. Take a look at this page at the -s -y -Y or -z parameters.

You could also try alternatives:

  1. buy one SSD
  2. Search how to make your computer less noisier (using foam inside it, in very specific places, if you know how to build a computer and dissipate the heating
  3. Change your HDD for another one, quieter (like the ones used in notebooks)
share|improve this answer
    
It should be -S, not -s. This is the idle timeout setting supported by almost all hard drives. –  jankes Sep 27 '11 at 8:38
    
Summarizing the various hdparm switches in the answer would be useful. –  UncleZeiv Sep 27 '11 at 10:27
    
@uncleZeiv : yes, could do that... but the "buy SDD" or "turn it off" are being choosen as best answers, I won't bother editing this again :) –  woliveirajr Sep 27 '11 at 11:37
add comment

Monitor drive access, find out what is waking the drive up at night, stop it.

share|improve this answer
7  
This answer would be more useful if you elaborated a bit on how to monitor drive access, and/or listed common causes for it to be accessed. –  UncleZeiv Sep 27 '11 at 10:26
add comment

It might take a little work, but you might consider setting up a USB or livecd boot, and manually setting your /home location to your hard drive. Periodically remaster your livecd with something like remastersys for better efficiency.

You might also want to consider some other witchcraft with unionfs

All that being said, grindy hard disks are BAD BAD BAD BAD. You might want to have them checked out.

share|improve this answer
2  
+1 for using a USB stick as a ghetto SSD. –  Tom Anderson Sep 27 '11 at 17:29
add comment

Get used

I have a little insolent home server that sometimes make noises late at night and at first it was pretty annoying but now I can't sleep without his sweet melody : )

share|improve this answer
add comment

a) those file systems that don't write directly to the disk

b) get a good hdd, google SPCR and look at their silent hdd list

c) don't listen, you don't need an SSD, especially for a linux box for downloads.

My NAS is 4x WD caviar green, they are barely audible although they're running 24/7 due to downloads.

Samsung Ecogreen or WD caviar green . easy green = silent (wtf).

share|improve this answer
add comment

Use a separate low-power box in a separate room for background tasks and only power up your main machine when you use it. The power savings offset the initial investment within a year.

My broom closet box is an Atom (fanless design, so less chance for failure) that has gained more and more harddisks as my storage requirements expanded -- but it still uses only a third of the power of my desktop machine, saving me 250 EUR/year. The harddisks are in a RAID6 with hot-swap bays, so I can handle disk failures easily, and the desktop runs a weekly backup to the storage array.

share|improve this answer
    
You save 250 Euros/year, but the power savings paid for the Atom system in less than one year. So your Atom system, with all the attached storage (RAID6!), cost less than 250 Eur? Where can I buy one?! –  CarlF Sep 28 '11 at 14:14
    
That was the price for the base system I built back before I needed that much space; this was an Atom board for 100 EUR, two 1 TB disks and a no-brand case and power supply -- that would be totally sufficient for the OP. The system has just grown over time as needed. –  Simon Richter Sep 29 '11 at 10:47
add comment

Isolate the drives from the chassis so that it doesn't act as a soundboard for vibrations. You can buy elaborate noise-isolating drive enclosures or simple rubber mounts or grommets for this purpose, but the most effective solution I know of is this one you can make by yourself using just a piece of elastic cord. I've used it, and it makes an amazing difference.

share|improve this answer
add comment

There is a setting somewhere that allows you to click a box to "spin down HDDs when not in use" I know on Ubuntu 10-10 its in preferences somewhere.

I couldn't rememeber so I did some searching and found this link.

Depending on your flavor or linux it may be helpful

HDD spin down

There seems to be a file you can edit as well.

If it is grinding, you may have a bigger problem :)

share|improve this answer
add comment

I think you can use Laptop Mode. Latest release is 1.59.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.