Data recovery is the process of salvaging data from corrupt hard drives and other storage media, when it cannot be accessed normally. This recovery may be required due to physical damage to the storage device or damage to the file system (such as with viruses), successfully preventing it from being mounted by the host operating system. The manufacturers of Hard drives seldom tell their clients that hard drives can easily stop working, even under normal use.
Physical damage to hard drives and storage media, such as the scratching off of metallic substrate of a CD-ROM, usually causes data loss and usually causes the logical structures of the file system to be damaged as well, resulting in logical damage that has to be fixed before a single file can be salvaged from the damaged media. Since physical damage cannot be repaired by end users, it is usually costly data recovery companies that are employed to salvage important data, and these firms use "Class 100" / ISO-5 cleanroom facilities to protect the media while repairs are in progress, and to prevent dust particles from settling on the hard drive after opening, which can damage the platter and compromise the recovery process. An example of a physical recovery procedure is removing the damaged circuit board and replacing it with a healthy one, or simply swapping parts of the hard drive that are corrupt with parts of a functioning hard drive. Creating a virtual disk, which is commonly known as 'disk imaging' is also helpful in the reconstruction of the lost images, as the images can be converted into a usable form. Logical damages can also be cleared by this method.
Logical damage to hard drives and storage media, which are usually caused by power outages, viruses or system crashes, can render a hard drive useless, and can be prevented by using reliable file systems such as ext3 and regularly degfragmenting the drive. There are two major methods of recovering data from a hard drive that has been logically damaged. One is the scanning of the logical data in the disk and making sure that it is consistent with its specification (commonly known as Consistency Checking), which checks the directory's and file entries and whether they point to the correct places. If they do not, an error message is printed and the problem is resolved. Both 'chkdsk' and 'fsck' work in this fashion. Another method of logical data recovery is called data carving, which extracts data with no file system, which can analyze the data, provide details of logical errors, and assist in the rebuilding process of the file system.