Techniques For File System Repair

There are lots of repair programs to correct inconsistencies in the file system. Microsoft Windows uses chkdsk, Mac OS X has Disk Utility, and Linux provides the fsck utility.

These programs use two main techniques. The first technique is consistency checking, it scans the logical structure of the disk and checks to make sure that it is consistent with its specification. Such programs as chkdsk and fsck work in this way.

However, this technique has two problems. First, if the file system is greatly damaged, the consistency check can end in complete failure and the repair program may also fail or it may not recognize the drive as having a valid file system at all.

The second problem that can appear is the disregard for data files. If chkdsk finds a data file to be out of its place, it may delete the file without asking. The program works so to make the operating run smoother, without consideration about how important the files can be.

The second technique for file system repair is to accept the state of the file system, and by taking every indication of undamaged file system structures, rebuild the file system. This technique means scanning the entire drive and then making note of all file system structures and possible file boundaries, then trying to match what was located to the specifications of a working file system. This technique is slower than consistency checking, but recovers data even when the logical structures are almost completely destroyed. It does not repair the underlying file system, but makes it possible to extract data from file system to another storage device.

Still these two techniques are not the remedy from data loss, when trying to repair logical damage. Such file systems as NTFS 5.0, ext3, and XFS can reduce the data loss by taking to a consistent state, and the only data to be lost is what was in the drive’s cache at the time of the system failure. Nevertheless, regular system maintenance should include the use of a consistency checker to prevent against bugs in the file system software and data loss.

Comments are closed.