Hard drive clicking noise on Acer AO722

I'm running Ubuntu 11.10 on an Acer Aspire One 722. Whenever I'm on battery power I get a clicking sound from my hard drive every 5 seconds or so (this does not happen when the laptop is plugged in). I'm dual booting with Windows 7 and I don't get the clicking sound in Windows.

The clicking sound stops when I run the command:sudo hdparm -B 254 /dev/sda

Also, according to:sudo smartctl -H /dev/sda my hard drive is healthy.

Is this clicking sound something I can just ignore? Or is it a serious problem and will it eventually damage my computer? If so, how would I fix it?

I have tried adding hdparm -B 254 /dev/sda to my /etc/rc.local file, but I still run into the clicking problem if my computer boots while plugged in and is then unplugged. Also, I'm finding this fix to be unreliable. Sometimes it works, sometimes it does not. Is this a good solution and is there a better way of doing this? Also, would running my laptop with a -B value of 254 have any negative effects? (I read somewhere about a lower level protecting the hard drive from bumps)


gksudo gedit /etc/hdparm.conf

Enter and on the "bottom" of the gedit file

 /dev/sda {
    apm = 254
    apm_battery = 254
}

This is a duplicate of: Laptop's hard drive doesn't really spin down

WRT regards to the posters who have dumped a series of commands, an explanation would be nice. There are trade offs to disabling hard drive power management completely, like the hard drive will better survive the shock from a drop were the heads parked.

Profiling your usage and minimizing disk hits is really the way to go here. Creating a tmpfs to cache things you can afford to lose, like a browser cache, is up to your discretion.

WRT keeping hdparm parameters consistent across boot and suspend/resume, this is managed by the pm-utils and driven by this script here: /usr/lib/pm-utils/power.d/95hdparm-apm. /etc/hdparm.conf should govern these values per hdparm_options in /lib/hdparm/hdparm-functions. If it doesn't, it's a bug.

hdparm -B

   -B     Get/set Advanced Power Management feature, if the drive supports
          it.  A  low  value  means aggressive power management and a high
          value means better performance.  Possible  settings  range  from
          values  1  through  127 (which permit spin-down), and values 128
          through 254 (which do not permit spin-down).  The highest degree
          of  power  management  is  attained with a setting of 1, and the
          highest I/O performance with a setting of 254.  A value  of  255
          tells  hdparm to disable Advanced Power Management altogether on
          the drive (not all drives support disabling it, but most do).