Excessive hard disk activity

I am having problems on Ubuntu 12.04 x64 "fresh" installed on ext4 partition on primary HDD. When not in use every 5 to 10 seconds HDD is active for about 10 seconds an writing no mater what application is turned on or running. I used iotop and found that jbd2 is constantly writing to the HDD. The noise of the HDD is driving me crazy, at this rate disk will not last long. On the same HDD I have Windows 7 (dual boot Grub2) and everything works OK, the disk is turned off when not in use, and the computer is silent. Everything else is working fine (just little problems with Skype and the webcam, but that is tolerable), but fear from losing disk and noise is untolerable since I have computer turned on for 10 hours a day...

I tried manually to lower the frequency of journalling, but no solution found on web helped me so far, disk is grinding at same rate.

Any solution of this problem? If not I think I will stop using Ubuntu, no HDD will last long at this rate of use and the noise from HDD is not tolerable...


This are rare cases where the Hard Drive activity is above the normal use and the user is not using it that much. It has only happened to me twice in all of my years with Ubuntu. On one time I solved the issue by doing a fsck on the disk.

For example, if your HDD is /dev/sdb1 then do the following:

sudo fsck /dev/sdb1

In that case it said that I had booted the hard drive more than 200 times without checking. I actually did not count how many times but 200 is a lot in my book.

Anyway, when started checking, at some point it started finding problems and fixing them. A lot of them actually. After that I rebooted and problem was gone.

In the second case, it was because I edited the /etc/fstab and incorrectly passed a parameter to the hdd. The solution was to remove that parameter from it.

I would also have to say that adding noatime to the hard drive lessens the amount of write operations. For example this is my HDD in the fstab file:

# / was on /dev/sda2 during installation
UUID=38673e00-ecc8-4e11-85d2-58af72999e5b /               ext4    noatime,errors=remount-ro 0       1

with the noatime parameter, the disk activity is less. Although, if using a version of the kernel 2.6.30 or greater, relatime is much better.

My suggestion for this would be:

  • Run fsck on the drive with the problem. It might detect many problems or it might not, but checking it will make sure the information is good and the hard drive has no file system problems.

  • In the Desktop run the disks utility. It shows the status of the drive and the SMART information about it. This can give you further information about it, specially if it has a hardware problem.

  • Type dmesg and look at the last lines. If there is something every 10 seconds it will show there. It can also show in cat /var/log/syslog or cat /var/log/kern.log

  • Lastly add the noatime parameter to your fstab file to save some access time writings.


  1. If you are seeing a lot of activity when nothing much is running, check if any of the logs are getting a lot of updates. See if any of the files grow when you run this ...

    ls -lS /var/log/*log | head
    
  2. You can reduce spindowns, if your hard disc supports SMART, with

    hdparm -B 255 /dev/sdX
    

    where sdX needs to be changed to a valid partition.

  3. Check your fstab for noatime.

  4. From the last link below someone claims he solved it with a forced check of the partition.

    touch /forcecheck
    

    and a reboot will confirm if this is the case for you.


Also have a look at this topic:

ext4 jbd2 journaling active even on empty filesystem


This is more than likely a kernel problem (and not specifically related to Ubuntu). In 2010 both Ubuntu and Arch users had the same problem. It might be worth it posting it as a bug on launchpad against the kernel you are using.