May/June 2005
Issue No. 22
Disk Warrior 3.0.2: Rebuild & Conquer

by Eden Maxwell:

Computer Connections May 2005

Disk Warrior 3.0.2: Rebuild & Conquer

Automated Newsletter Publication and Editize 2.0

Digital Imaging Part 2

The Cult of Mac: ?a book review

Monitor review: LaCie photon19vision

Software for the Way We Really Write

Qwerty's Qorner Returns!

From My Keyboard? The Spring has Sprung Edition


Past Issues

MetroMac Home

DW3 PackageIt's inevitable. Something goes wrong with a file. Or worse: your hard drive won't mount onto the desktop.
Not being able to access files, or having a hard disk failure is a nightmare we can all do without. Of course, if you have your data backed up (you do, don't you?), this sort of computer malfunction, while not a tragedy, is still a time- and money-wasting nuisance.
         Preventive maintenance is the name of the game for safeguarding your valuable files and mitigating the severity of any hard drive mishap. To repair your files and directory, you have most likely used Apple's Disk Utility (First Aid), and, if necessary, one of the popular file and disk repair programs, such as Symantec's Norton Utilities or Micromat's TechTool Pro. While you may have been getting by with these utilities up to now, they are, at best, half measures. Your toolkit is incomplete without Alsoft's DiskWarrior 3, ($79.95), which can restore your digital data better than any other off-the-shelf repair utility on the market. (Note: Symantec has announced that they will no longer develop new versions of Norton Utilities for the Mac; and although they will continue to support the product through Panther OS X 10.3, this means the end of line with OS X 10.4 Tiger in the bushes.

Premium Disk Insurance

Rather than trying to be a jack-of-all-trades, DiskWarrior specializes in a single-minded operation: rebuilding your disk's directory. That's it!

Main Window

Figure 1. The DiskWarrior Main Window. Information here tells whether the selected disk directory can be rebuilt. If not, a list of the reasons why not is displayed. Select a disk to rebuild, or create a directory graph from this list.

When the original directory data is severely damaged, DiskWarrior's powerful scavenging engine searches the original directory, and finds all the salvageable data, then uses this data to build an error-free replacement directory. In the process, it recovers lost files and folders and makes it possible to mount the disk on the desktop. The newly created directory is optimized for maximum performance. In effect, the procedure of rebuilding the directory has the side benefit of also fixing any files or folders needing restoration.

Millions of possible combinations of errors can damage a directory, and no single product can repair every contingency. When other utilities attempt to repair a directory, they attempt to do so by patching the directory structure based upon the possible combinations of errors they have "conceived of" to date. Product updates often include more potential errors. While other utilities claim to rebuild directories, in fact they merely fix the errors they have been programmed to fix, one repair at a timeoiling the squeaky wheel. This method can actually result in loss of directory data and, consequently, loss of access to files. If you think you have directory damage, it's a wise precaution to run DiskWarrior first on the suspected disk. Otherwise, you risk losing directory data (and access to files). For successful directory rebuilding, repair, and recovery, DiskWarrior relies on the quality of the original directory data.

Main Window

Figure 2. DiskWarrior Report. Pertinent information about the newly optimized directory, including any changes, is shown here. In this case, DiskWarrior performed over five million comparison te346sts on the files and folders of one of my disk partitions.

DiskWarrior is not a disk repair utility in the conventional sense. Instead of fixing things here and there to patch up the existing directory, DiskWarrior resolves disk damage by eliminating directory errors, the cause of most problems afflicting your hard drive. DiskWarrior rebuilds directories by using the data stored in the original directory. It then uses this information to build an entirely new directory structure. In other words, instead of repairing the rusts holes in your car fender, DiskWarrior replaces the entire fender with a new one.

This approach is similar to FileMaker's scheme for insuring the integrity of its databases. If a crash occurs while FileMaker is running or if a FileMaker database is otherwise closed improperly, then the next time that database is opened, FileMaker immediately rebuilds the database indexes (the database structure) using the data in the database. DiskWarrior performs a similar rebuild of the disk directory, and it takes these processes a step further.

If, however, you have used another utility to repair the directory, you may find you now have a directory with no errors, but missing data. (This has happed to me.) All is not lost. DiskWarrior can still be used to scavenge the directory to find the lost data. This is the same operation DiskWarrior uses to recover data when it finds directory errors; it simply skips the scavenge procedure when the directory has no major errors. DiskWarrior compares the original directory with the replacement directory and determines whether there have been any changes in the number or contents of the files and folders. If so, it lists any differences found in the DiskWarrior Report. You can then use this information to see what items should be tested or inspected in the preview. And with DiskWarriors Preview technology, you can see what the repaired disk will look like before committing to rebuild the disk.

Even though they are not part of the directory, DiskWarrior also repairs damaged boot blocks, which contain the startup code used to load the OS into memory, and, if necessary, will rebless and make the system folder bootable once the rebuilding is complete. DiskWarrior also eliminates a common cause of system crashes by checking custom icon files for corruption and repairing any damage to the wrapper System file, which contains essential startup information for the computer to boot properly. During my testing, I found that Norton Disk Doctor, which did not indicate why, could not repair a certain group of custom icon bits; running DiskWarrior had no effect on repairing these icon files either. Of course, I am presuming that Disk Doctor had properly diagnosed these custom icon bits as being a problem. If the custom icon bits were okay, then DiskWarrior had nothing to fix

Directory Explained

The directory is an area of a disk used by the Mac OS to map all the information stored on the disk. This portion of a disk is used to store the numbers, names, locations, and sizes of files and folders saved on the disk. When any software wants information from a disk, the Mac OS goes to the directory to find out where that information is located. Also, when any software wants to save information to a disk, the Mac OS goes to the directory to find out where the information can be placed. All the necessary information about where the data was saved is then recorded in the directory.

In a directory, there is a logical order and a physical order of the file and folder information. The logical order is based on the name of the files and the creation order of folders. The physical order is determined solely by the available free space on the disk, plus the space that becomes available as files are deleted and added. Over time, as files and folders are added to the directory where space is available, the physical order becomes increasingly less like the logical order. But directory searches are performed using the logical order of the directory; so, as the physical order becomes less like the logical order, the drive mechanism must move more to follow the logical order, which, in turn, impedes performance.

The directory itself consists of two parts: the structure and the data. The directory data is the information about the numbers, names, locations, and sizes of files and folders saved on the disk. The directory structure is the organization of this data in the directory. (The directory structure is not the folder organization seen on your disk, nor is it organized as such. This directory structure is internal, and cannot be changed or even seen by you; it is not what you see when you look at the list of files in your hard drive) The Mac OS uses the structure to quickly access the data and, in turn, finding out where in the directory file data is located. This concept is analogous to a telephone directory, where the data are the names and phone numbers, and the structure can vary depending upon which method of finding the data is more convenient. The names and numbers can be organized alphabetically, or can be organized by category (artists, computers, magicians, physicians, do-gooders, etc.).

Directory Damage

When any of the information about the numbers, names, locations or sizes of files and folders in a directory (the directory data) or the structure of the directory is either incorrectly updated or not updated at all, that directory is considered damaged. Since this damage is normally limited to only a specific area of the directory, its common for directory damage to remain undetected until long after it actually occurred.

When the Mac OS attempts to use the incorrect directory information to read or write information on a disk, an error will occur. This error may be very minor and go unnoticed. It might cause an instantaneous kernel panic or crash. Or, worst of all, the entire contents of the disk could become inaccessible!

The Usual Suspects

The continued accuracy of information in the directory depends on the ability of the Mac OS to perform all update and maintenance operations without unexpected interruptions. To help speed up many Mac OS computer operations, important pieces of information are temporarily stored in memory instead of being immediately saved to the disk

Common types of unexpected interruptions are kernel panics and crashes, power loss (lights flicker), turning your Mac OS computer off without using the proper Shut Down procedure, and pressing the RESET button. Depending upon the exact moment of the interruption, you stand a good chance that your directory was either not updated correctly and/or some information had not been saved to the disk. You now have directory damage and/or information loss. Dont wait for problems; run DiskWarrior immediately after any improper shut down situation.

A directory can also be damaged if an errant program inadvertently writes its own data to the portion of the disk that is reserved for the directories. If this occurs, the directory data will have been overwritten and may be permanently lost. System extensions, called kernel extensions in Mac OS X, may inadvertently corrupt system data. Directory damage occurs when the directory containing the corrupt data is saved to disk.

Optimization

DiskWarrior not only rebuilds the directory instead of fixing it, it also optimizes the directory for improved performance: speedier access to your files. Directory optimization is the process of defragmenting and packing nodes, which are part (like leaves) of a tree structure containing information. Some nodes represent files; others represent directories.

Defragmenting makes the physical order of nodes equivalent to the linked (logical) order. Packing combines partly-filled nodes, resulting in fewer nodes and more free space on the disk. Put it another way: Optimizing the directory entails two steps. The first (and most important) step is to make the physical order of nodes equivalent to their logical order; the second is to eliminate free space in the directory by packing, and thereby reduce its overall size. DiskWarrior allows you to create a graph that records the severity of the fragmentation of the directory.

Main Window

Figure 3. Directory Graph—Before Optimizing. DiskWarrior allows users to create a graph that shows to what degree the directory is internally fragmented. This graph shows both the number of fragments and the distance each fragment is out of place. Each part (node) of the directory is assigned a color along a gradient between white and dark blue, depending upon its optimized position.

This graph gives far more information than the number of fragments; you can visually determine the number of fragments and the distance each fragment is out of place. Each part (node) of the directory is assigned a color along a gradient between white and dark blue, depending upon its optimized position. The graph of a perfectly optimized directory is a perfect gradient from white to dark blue. Fragmentation interrupts the gradient. The more distant a fragment is from its optimized position, the greater the difference between the color of the fragment and the color of the same position in the example optimized graph. While other utilities also optimize the directory, they do not provide the true directory optimization provided by DiskWarrior.

Directory Graph

Figure 4. Directory Graph—After Optimizing. Here, the smooth transition of the color gradient (no fragments) indicates that the optimized directory has no items out of order. Note: DiskWarrior works only on the directory portion of your disk. To optimize the files themselves and eliminate free space fragmentation on the disk, you would also have to run such utilities as Norton Utilities Speed Disk or Alsoft’s PlusOptimizer.

Optimized Directory

Figure 5. Directory Graph—After Optimizing. Here, the smooth transition of the color gradient (no fragments) indicates that the optimized directory has no items out of order. Note: DiskWarrior works only on the directory portion of your disk. To optimize the files themselves and eliminate free space fragmentation on the disk, you would also have to run such utilities as Norton Utilities Speed Disk or Alsoft’s PlusOptimizer

Optimizing the data within the directory by DiskWarrior is not the same as optimizing the files and free space on your hard disk. After DiskWarrior rebuilds the directory, you would still have to run Alsofts PlusOptimizer or Norton Utilities Speed Disk to optimize the files and free up space on the disk. This function improves disk performance because it significantly decreases the necessity for disk head movement; in addition, by eliminating the fragmentation of free space, it reduces the fragmentation of newly saved files.

Main Window

Figure 6. Hardware Monitoring. Activate DiskWarrior’s pre-emptive diagnostic routine and catch hard disk failure before it strikes. Most late model hard drives are now equipped with built-in S.M.A.R.T. technology, which can monitor the operating status of the device. This report shows that my drive is functioning within normal parameters

As drives are used, their mechanical parts begin to wear out. Manufacturers rate their drives with a mean time between failure (MTBF) probability, which means its not a question if the drive will fail, but when. In recent years, drive manufacturers have begun including internal diagnostic routines S.M.A.R.T. capabilities to help determine if a drive is exceeding its permissible malfunction tolerances. Unless you have software to access these routines, you will never receive the heads up warning of the impending drive malfunction.

With DiskWarrior installed on your hard drive, you can enable DiskWarriors hardware monitoring capability, which activates the S.M.A.R.T. routines at regular intervals and checks the results. Or, you can run the routine manually directly from the DiskWarrior CD. If the diagnostics indicate the potential for a malfunction, DiskWarrior warns you, using the notification method you specifieda screen alert, AppleScript, or a notification via email. This warning allows you to back up any data on the drive before it fails completely, saving you from having to use an expensive data recovery facility to retrieve the data.

Mac OS X-native Director Repair

DiskWarrior 3.0 is not a simple carbonized or OS 9 application retrofitted to run under OS X without having to run under Classic OS 9. Extensive changes had to be made to the applications code to allow DiskWarrior to interact properly with the Unix core of Mac OS X, which is significantly more complex than OS 9. These changes allow DiskWarrior 3 to take advantage of Mac OS X technologies such as dramatic speed improvements. In addition, DiskWarrior 3 supports file journaling and Mac OS X RAIDs, offers full Unicode support, conforms to Apple's security standards, uses Mac OS Xs native memory model, and rebuilds directories on disks as large as 2,000 gigabytes (2 terabytes). This new version contains most of the applicable features found on previous versions of DiskWarrior. The new version does not include the version 2 DiskShield extension that ensured directory data was written regularly and warned of potential directory damage. Mac OS Xs protected memory and journaling features provide the functional equivalent of the old DiskShield extension.

Working DiskWarrior

DiskWarrior 3.0 ships on an OS X bootable (startup) CD. If youre working with only one hard drive, you will have to boot from the CD to run DiskWarrior. (I have two hard drives wih. Installing DiskWarrior on both drives allows me to run the utility from one drive to another with no further need of the DiskWarrior CD.)

While the DiskWarrior 3 CD uses a specially licensed version of Mac OS X that allows the CD to start up in Mac OS X, it does not include a Finder (Apple wont allow it). Alsoft got around this by creating a special DiskWarrior Preview Window, which allows users to preview the directory on their disks when the DiskWarrior CD is the startup disk. The DiskWarrior Preview Window has two panes, one for the original disk and one for the preview disk. Users can then compare files from the original disk to the preview disk prior to approving the rebuild.

If you have two hard drives, you can install DiskWarrior on both, which is more convenient than running the app from the CD. When DiskWarrior is launched from the hard drive, the Preview feature will present you with both the original disk and the preview disk on the desktop. Both of these disks will be locked during the preview; changes occur only when you commit to a rebuild.

System Requirements

DiskWarrior ships on a CD-ROM that will start up in Mac OS X on a Mac with a G3 or higher processor (including a G5) with built-in USB and 128 MB (256 MB recommended) of RAM. DiskWarrior can be run from the CD to eliminate all damage to any HFS (Mac OS Standard) and HFS Plus (Mac OS Extended) disk directories, including your normal startup disk as well as journaled disks. Version 2.1 of DiskWarrior, also included, runs and installs on a 68020 Mac or better when started from Mac OS 7.1 to 9.x. Either version of DiskWarrior repairs any supported disk no matter which version of the Mac OS is installed on the disk being repaired

Endgame

With DiskWarrior you never risk losing directory data, which means never losing access to files. DiskWarrior verifies the replacement directory before it can be written to disk, ensuring that it is completely error-free. This also ensures that the disk will have no problems when rebuilding is complete. If you want peace of mind concerning your computer data, then DiskWarriors preventive maintenance and incomparable file-recovery technology belongs on your utility belt.

While DiskWarrior may be a one-trick pony, it is one unique trick no other app can match in performance. The price of admission is a bargain.


[Mac OS X 10.4 (Tiger) Update, June 6 2005: In order to run DiskWarrior while started from Mac OS X 10.4 (Tiger) you will need to use DiskWarrior version 3.0.3. Earlier versions of DiskWarrior,while not compatible with Tiger, will not harm your disk. Attempting to rebuild a disk with DiskWarrior 3.0.3 or earlier, while started from Tiger, will result in an error stating that a "Mac OS Services" failure occurred. A free DiskWarrior 3.0.3 CD Update is now available for owners of DiskWarrior 3.0 to 3.0.2].

____________________


Eden Maxwell is an artist and published book author. He has contributed to many publications, including Popular Science, Art Calendar Magazine, Drachen Foundation Journal, Popular Mechanics, MacStreet Journal Online, Omni, MacUser, MacDigest, and Computer Gaming World. His art has been exhibited on both coasts and his work has appeared in the Encyclopedia Britannica. Visit Eden's Atelier and Gallery website. You may also reach him via email at artist@edensart.com

Copyright © 2009
Metropolitan New York Macintosh Alliance

Avoiding file corruption and disk failure takes a bit of doing?but the pay-off in smooth workflow is well worth it.