[Improve OS/2's performance with Priority Master II (click here).] [Products and Resources for VisualAge (click here).]
[Previous]
Disaster Recovery- by Chris Wenham
[Next]
OS/2 e-Zine!

Go to a Printer Friendly version of this page


Chris Wenham is the Editor-In-Chief of OS/2 e-Zine! -- a promotion from Senior Editor which means he now takes all the blame.

Blast Back! Send a private message directly to Chris Wenham with your thoughts:

Contact OS/2 e-Zine!

Summary: Ouch! It went boom! Slippery fingers or a careless install program have deleted your data or messed up your hard drive configuration. Let's see how the two utility suites handle the job of rescue and recover.

Disaster recovery is one of the biggest reasons why people buy utility suites. Hard drive fragmentation you can not even notice if you treat your computer well and install HPFS. But when data gets erased or you find you can't access your hard drive anymore, that's something that you just can't sweep under the rug and put off until later. It's a problem that needs to be fixed immediately. There are four different types of disaster recovery that the two major suites deal with: Deleted files; damaged media; corrupted partition tables or boot sectors; and corrupted Workplace Shell desktops.

Undelete

The one place where both suites compete head-on in the disaster recovery arena is with undeletion: the recovery of files that you had deleted. Normally, once a file is dragged to the shredder, it's gone forever. Unlike the Mac's trash-can or the Windows recycle bin, when you want to kill a file in OS/2, you can consider it done. But thanks to the nature of hard drive management and the way filesystems store files, it's yet possible to get back what you thought was gone.

On a hard drive, files are stored with a record that says which sector or cluster the file begins at, and where it ends. Without that record, the operating system just can't find the file and doesn't count nor respect its integrity when calculating free space available, or when storing new files. So when it comes to deleting a file, something you do every day and which programs do to their temporary work files all the time, the operating system merely removes the file's record. It doesn't bother to explicitly scrub the information from the platter's surface.

What undelete programs do is search for files that are still present on the drive (in limbo) and attempt to reconstruct them. They work best if they're invoked immediately after the accidental deletion has occurred. If you leave things for even a few hours, especially if there are other active programs running, then the chances increase that the deleted file could be partially overwritten before you get the chance to recover it. Undelete programs cannot perform miracles. They're not what the FBI use, if that's what you're thinking.

Gammatech Undelete

Like with the defragmentation utilities, each suite must cope with the fact that the undelete process is different between FAT and HPFS formatted drives. While Gammatech integrates both functions within the same program, Graham Utilities separates them into two different programs.

Graham edges slightly better than Gammatech in terms of speed, however. In a test, we had each utility scan the same HPFS formatted drive. Gammatech took 2 minutes and 20 seconds to complete, but Graham found the same number of deleted files in only 1 minute and 25 seconds. According to the manual, Graham achieves this speed by scanning only the free space on the hard drive, although you can configure it to scan the entire drive if you want to for those rare circumstances when it might be needed.

Both utilities recommend undeleting a file to a drive or partition other than the one being recovered from to increase the chances of a successful undelete. This is because as it writes a file back to the drive, it may accidentally write over the tail end of the very same file you're trying to recover.

Neither utility seemed to have any special favors with God, however. Both utilities had equal luck in file recovery, we didn't find any case where one could retrieve a file that the other couldn't. What was annoying with both is that they wouldn't give an estimate of how good the chances were of recovering the files you select. You may wipe the sweat from your brow one moment, only to discover that the recovered file was corrupted anyway. Neither suite was capable of evaluating what the remaining integrity of the undeletable files were.
Gammatech Pass. Slower, but has a nice PM user interface
Graham Pass. About twice as fast as Gammatech at doing the same job, but has a fullscreen (character mode) interface

Damaged Media

Like all physical things, disks are prone to damage. The most common that you'll encounter are bad sectors, cases where an imperfection or fleck of dust has damaged the surface of the platter. Usually, the sectors surrounding it can still be read, and if you have a file that spans these sectors then it can be quite frustrating to know that most of the file's data is recoverable, but that one bad sector is preventing the operating system and any program from even trying.

Gammatech Utilities has an answer to this problem in the form of FILEREC.EXE, a command line tool that can lift a file from a damaged floppy or other drive. You give it the name of the file to be recovered, the destination to recover it to, and what Hex value to fill in for the data that cannot be recovered. The default is to use the space character, but you might want to change this to '00' for binary files. The program reads as far as it can until it reaches a bad sector, then fills in as much as it can with the replacement character, resuming again from the other side of the bad sector until it reaches the reported end of the file.

We tested this with a TIFF (graphic) file that was stored on a damaged floppy disk. The floppy had been used to store an image that we'd scanned at a local Kinko's service bureau, only to discover upon return home that the disk had a bad sector. Gammatech's FILEREC.EXE managed to pull most of the file off the disk, and by using a photo processing program we manually re-touched the corrupted image into acceptable condition - thus saving us the expense of a return trip to Kinko's.

Graham Utilities has no such equivalent, unfortunately. We talked with the author of the suite, Chris Graham, who told us that while there was no tool specifically designed for this job, it may be possible to do the same job with the Disk Editor program, but with a lot of manual work. We did not attempt to figure out the procedure to do this, however.
Gammatech Pass. It may use a command line interface for this tool, but it's easy to figure out and not so hard if you only need to use it once or twice.
Graham Fail. Maybe it can do the same thing with the arcane Disk Editor tool, but we reckon you'd have to be a hard disk guru to even try it.

Partition Table / Boot Sector Recovery

A hard drive can be divided up into multiple partitions, useful for installing multiple operating systems, or for keeping your data and programs separate. But even if you only have one partition on the whole drive, you still have a partition table hidden away there which can get corrupted. If you've ever played with the FDISK program, you know how easy it is to completely render a whole drive's worth of contents unreadable. Because if the operating system doesn't see a partition defined, it doesn't consider it to even exist.

Graham Utilities makes sure that, almost from the point where you open the pink box it ships in for the first time, you'll be ready to recover from a damaged partition table. Indeed, you can even run all of its utilities straight off the CD-ROM or Recovery floppy before you install, in case you should have deleted files that you don't want to accidentally overwrite with the very programs you want to undelete them with!

But during the install process, Graham Utilities will prompt you to insert the included recovery diskette (you don't have to supply and make one yourself), onto which it will save not only your partition information and boot sectors, but also the critical "super" and "spare" blocks of any HPFS formatted drives you have. These can be life savers if a mistake in FDISK or another operating system's install routine were to wipe your OS/2 partition. With the install floppies from your copy of OS/2 handy to boot from, you can run the RESTPART program on the recovery disk and usually get back into a working system again.

Gammatech Utilities takes the problem by the horns two different ways. First off there is a Sentry program that can be set to monitor the boot sector periodically and present you with the option of returning it to its original state if it detects a change - possibly saving you from a virus. Secondly, Gammatech can back up your boot sectors to a floppy. Gammatech's GTDisk program also has a partition fixup function that, if FDISK can recreate the partitions in all the right locations and sizes, then Gammatech might be able to recreate the logical boot sector. It's not quite as easy and straightforward as Graham's partition restore program, though.

Gammatech does not come with the convenience of a recovery disk either. If you want one, you'll have to make it yourself.
Gammatech Pass. While the Sentry program might not catch a boot sector modification in time, it at least has a backup-and-restore utility and has limited partition repair features too.
Graham Pass. Jesus may save souls, but Graham saves hard drives. Make sure the write protection tab on your recovery disk isn't set when the install program asks for it, though.

Desktop Recovery and Preventative Maintenance

Gammatech's Sentry program is useful for another form of disaster recovery, however, and that's for the Workplace Shell Desktop. The Sentry program includes a mini-scheduler that can make timed backups of the OS2.INI, OS2SYS.INI and Desktop directory tree in case of corruption. This is similar to the archiving feature found within Warp itself, but which only runs on each system boot. Plus, Gammatech's Sentry can keep up to 100 generations of desktops, instead of just three.

As far as preventative maintenance goes, Gammatech's Sentry allows you to lock individual files so they cannot be written to. This goes further than just setting the READ ONLY attribute, it actually marks the file as "in use" from OS/2's perspective, and as such has an upper limit of about 1500 to 3000 files that can be locked. This could be quite handy to protect files that absolutely must not change. But as with its boot sector protection, it's only good for when the Sentry program is actually running.

Graham does not have any close enough equivalents for desktop backup or file protection. It does have a set of tools for mass-backup of extended attributes: the resource forks supported by OS/2 for HPFS and FAT filesystems which store such information as icon data, comments, keywords, permissions and other meta-information related to the file. This is useful if you need to process files with a program that's not written to handle EAs, such as a DOS defragmentation or disk repair utility. But it's not really any use beyond that scope.
Gammatech Pass. A superior alternative to Warp's desktop archive feature, plus powerful locking of files
Graham Fail. Nothing to backup your desktop, nor any facility for protecting files from modification

[Previous]
 [Index]
 [Feedback]
 [Next]
Copyright © 1998 - Falcon Networking ISSN 1203-5696
November 16, 1998