How to fix ‘$MFTMirr does not match $MFT (record 0)’ error

From time to time hard disks with NTFS filesystem get a ‘$MFTMirr does not match $MFT (record 0)’ error when user try to mount or read/write.

This error can be easily fixed running the ntfsfix command as seen below.

root@artemis:~# ntfsfix /dev/sdf1
Mounting volume… $MFTMirr does not match $MFT (record 0).
Attempting to correct errors…
Processing $MFT and $MFTMirr…
Reading $MFT… OK
Reading $MFTMirr… OK
Comparing $MFTMirr to $MFT… FAILED
Correcting differences in $MFTMirr record 0…OK
Processing of $MFT and $MFTMirr completed successfully.
Setting required flags on partition… OK
Going to empty the journal ($LogFile)… OK
Checking the alternate boot sector… OK
NTFS volume version is 3.1.
NTFS partition /dev/sdf1 was processed successfully.

User can then mount the drive and proceed with read/write operations.