Mirror Your System
Mirroring means storing the same information in two or more different locations. Informix has a built-in mirroring capability for all data spaces. Depending upon your performance and disk storage requirements, mirroring may be advisable for your system. The downside of mirroring is that it requires twice the amount of disk space for the primary and mirror chunks for each data space. But if you have the disk space, mirroring may be a very good option. It is faster than a RAID system (described next) and provides a very robust means of protecting your system. This protection is enhanced if you can arrange to have the primary and mirror chunks on different physical disk controllers with different power supplies.

Even if you cannot mirror your entire system, it may make sense to mirror part of it. You should mirror at least the rootdbs and the log spaces. To do this, be sure to create additional dbspaces for your application data. Do not simply put the application data in the rootdbs. Your rootdbs should probably never exceed about 50MB. You should place the logical and physical logs in their own dbspaces for performance reasons, so there's not much else that needs to be stored in the rootdbs.

Your system will not start up with a bad rootdbs or bad log files, so mirror the physical and logical logs also. It doesn't take up too much space and you'll at least be able to start the database if the rootdbs and logspaces are protected.

Use a RAID System
A RAID (Redundant Array of Inexpensive Disks) system is another very popular way to avoid disk failures. Indeed, mirroring is considered a basic form of RAID. Unlike Informix mirroring, however, a RAID is a hardware solution that consists of multiple disks, usually hot-swappable, which appear to the operating system as one large disk drive.

The most common type of RAID for database systems is RAID 5. In a RAID 5 system, you have an extra disk that keeps checksums from the other disks. Thus, if you have a ten-drive RAID system, there will be nine drives that actually hold the data. The tenth drive is a parity drive; its data is the sum of the other drives. If one of the drives fails, the RAID 5 checks the eight data pieces that it is sure of and then looks at the data on the parity drive. If there is only one drive's data missing, the RAID can reconstruct any missing data.

RAID 5 is commonly used because it gives decent performance and decent reliability. RAID systems typically incur a small performance penalty for database writes and usually increase the performance for database reads. RAID 5 incurs the least write penalty and is commonly used for this reason.

Administratively, a RAID 5 system can simplify a DBA's life enormously. Because a RAID 5 fragments the data across multiple drives automatically, the DBA can usually ignore Informix's intelligent fragmentation capability. Build a big chunk on a RAID and just throw the data into it. You won't have to worry too much about placement and table layout, since the RAID will handle it fairly well.

On the other hand, if you really need to use the intelligent fragmentation that Informix provides, a RAID 5 setup may not be your best bet, because you'll lose the ability to intelligently place your data in a RAID 5 system.

The main problem with RAID systems is that they foster an over-reliance on the hardware protection. A RAID is not invincible. You may have two drives fail at the same time, or you may not notice that one drive has failed. When that happens. the next failure will kill you. If you are using a RAID system, be sure and monitor it closely. As soon as one drive fails, replace it and continue.

Although Informix is a solid, robust product, it still runs on a piece of hardware that is subject to failure. If you make the proper choices in purchasing and laying out your system, you can minimize the effects of inevitable hardware failures.


Joe Lumbley is the author of The Informix DBA Survival Guide, the best-selling Informix book in the world. Joe operates an Informix consultancy, JP Lumbley & Associates, LLC, which specializes in database administration, performance tuning, and CRM systems. Joe can be reached at joe@lumbley.com.



Previous: Keep Detailed Change Logs
 
Back to the Beginning


Introduction Keep Detailed Change Logs
Perform Regular Backups Mirror Your System


Return to Get Help with Informix Page

Return to Main Get Help Page
 

How do you prevent a catastrophic disk crash?




Perform regular backups, keep detailed change logs, buy quality hard drives, improve your disk layout, mirror your system, and use a RAID 5 system.


Find Out More
Sample Mean Time Between Failure (MTBF) Values from Farallon Communications

MTBF description by Kevin Daly

Maury Tiller's OnBar site (all you need to know about Informix's backup software)

• "How to Select a RAID Disk Array" article by Joel Leider on EarthWeb

• "Beyond RAID 5: Mirroring Your Way to Fault-Tolerant Storage" article by Joel Leider on EarthWeb

DBA Survival Guide site by J.P. Lumbley and Associates

Informix online documentation site

TALK BACK
Share some of your database crash horror stories. What happened and how did you survive it? Let us know in the database.informix.general discussion group!
 


Sponsored Links