Monday, October 22, 2012

Hard Disk: BadCRC errors from dma_intr on bootup

SkyHi @ Monday, October 22, 2012

If dma is enabled on a controller that is not well supported, these errors can appear. ( I had it on a VIA KT266a with kernel 2.2. Upgrading to kernel 2.4 fixed it beautifully.
If you are sure that the IDE controller is supported, the drive is on its way out. You can run fsck with the badblock option turned on to mark these blocks as bad... As a rule, once these errors start, we throw the disk away(This is a high availability production environment).
If you dont mind that the disk can crash in the near future, make a backup and continue using it, it might work for a long time to come.
If the disk is under guarantee... take it back, it is not worth risking data loss if the drive can be replaced for free.
This is how you hunt for and fix badblocks.
# e2fsck -c /dev/hda1
Make sure that you have a backup, badblock scans can destroy data running with certain switches.
# man badblocks && man e2fsck (And read them carefully)
To turn of dma per drive
# hdparm -d0 /dev/hd[a-d]
To list dma settings
# hdparm -d /dev/hd[a-d]
To turn dma on
# hdparm -d1 /dev/hd[a-d]
Where hd[a-d] is hda, hdb, hdc, hdd.