A fairly standard solution to the problem of losing root-disk data is to script a periodic copy of the data to another disk. Several scripts for this purpose have been published (including one by me, which may get updated here in the future). In general, they use dd or ufsdump/ufsrestore to copy each partition of the root disk to a backup disk. installboot is needed to make the backup disk bootable, and files such as /etc/vfstab must be changed to match the backup disk's parameters.
Unfortunately, this solution does not fit in most circumstances. If the root disk fails, the system will crash. Then, someone must issue commands to boot the system from the alternate disk. (This someone is typically you, at 3AM.) The problem must then be resolved and the contents copied back to the replacement root disk, with another reboot to reset the system to its original state.
This solution is suitable in some circumstances, however, such as a less important machine with little uptime requirement. It can, also, be used to augment any of the other methods described here. For instance, DiskSuite can mirror the root disk automatically, and a disk copy can assure that even if DiskSuite fails, or (more likely) someone executing an unfortunate command which damages the system, the system can be rapidly recovered.
Solstice DiskSuite
DiskSuite is free and included with Solaris. It can be used for more than mirroring, and for more than the root disk. It has a GUI as well as a command-line interface. Even experienced DiskSuite users steer away from using it on complex disk configurations or on more than a few disks. It tends to scale poorly in terms of its manageability. However, at first blush, it appears to be the perfect root-mirroring tool.
The first time you use DiskSuite, it is complex to implement. With experience, however, it becomes a straightforward and useful tool. It also meets the first three of our requirements.
If either disk of a root-disk mirror pair fails, the other will be used and the system will continue running. For operating-system upgrades, DiskSuite is unconfigured and removed (disabling disk mirroring). (Upgrading to Solaris 8 will be covered in a future column.) The upgrade is performed, and DiskSuite is reimplemented. With RAID level 1, performance loss on the root disk is minimized.
Unfortunately it fails the last test, but this takes some explaining...
Veritas Volume Manager