AdamTheTech Logo
AdamTheTech
Enthusiast of Technology, Web Development, and Sci-Fi

Microsoft’s Free Virtual Machine Images

Deus Ex: Human Revolution Review

Embed dll Files Within an exe (C# WinForms)

Data Recovery: Data Loss and Drive Failures

Please be aware that this entry is over two years old. Therefore, it may contain broken links, outdated information, or views and content which are no longer completely valid.

Defragging

Fragmented drives can be a pain to recover data from, since the data is scattered all over the drive. Disk Defragmenter is the windows utility that defragments (commonly referred to as “defrags”) your hard drive. These two third party defragging utilities often defrag faster and sometimes more efficiently than the utility provided within Windows:

The way your system is set up, data files are not all the same size. They can be any size whatsoever. When a file is deleted, the space that the file was using is marked as free space and a new file can be written in its place. This is the point where the disk gets fragmented. For instance, say the deleted file was 10KB, so now you have 10KB of free space between two other files. Then, you go to save a new file, say, 30KB in size. What the operating system does is say, “Ooo! There’s a spot I can put the file! But wait! It’s two small.” So, that 10KB space is used for part of the file, and the rest of the file is placed somewhere else. This is similar to trying to find a parking spot for a 40-foot RV in a crowded supermarket parking lot. In order to fit the RV in the nearly full parking lot, it has to be chopped up and the pieces placed wherever there is room. When it comes to files, the files are divided into parts on the drive, or “fragments”. These fragments are placed wherever there is room, which alludes to the term “fragmentation”.

What defragging does is take those fragmented files that are all over your hard drive and rearranges all the data much in the same way as a Rubric’s Cube is solved. These file fragments are all painstakingly reassembled and put into continuous clusters. The reason it is easier to recover data after a relatively recent defrag is that most of the files are in one continuous place, rather than in bits and pieces scattered all over the drive. Fragmentation increases the chances of deleted files being overwritten, as well as introduce opportunities for corruption among the file fragments. It is recommended that a hard drive be defragged every so often. About once a month should do the trick. Note, however, that if you defrag after you have deleted and removed a file, there is little chance of it being recovered.