05/23/96 Mirroring the rootvg Volume Group for AIX 3.1 or 3.2 SPECIAL NOTICES Information in this document is correct to the best of our knowledge at the time of this writing. Please send feedback by fax to "AIXServ Information" at (512) 823-4009. Please use this information with care. IBM will not be responsible for damages of any kind resulting from its use. The use of this information is the sole responsibility of the customer and depends on the customer's ability to eval- uate and integrate this information into the customer's operational environment. +----------------------------------------------------------+ | | | NOTE: The information in this document is NOT appli- | | cable for AIX 4.1. | | | +----------------------------------------------------------+ PROCEDURE ABOUT THIS DOCUMENT This document describes how to mirror the rootvg volume group to create a redundant volume group for the purpose of booting in case of a system crash. Mirroring the root volume group is a complex procedure, requiring a significant level of AIX knowledge, and extreme care in maintaining the consistency of the mirrored copy. | For these reasons, IBM does NOT recommend mirroring rootvg | in AIX 3.1 or 3.2. WARNING: Please do not use this document if the system is a /usr client, diskless client, or dataless client. This document describes how to mirror the rootvg volume group to create a redundant volume group for the purpose of booting in case of a system crash. | MIRRORING ROOTVG IN AIX 31 OR 32 IS NOT OFFICIALLY SUP- | PORTED. ABOUT MIRRORING Mirroring allows your system to remain available in the event of a disk failure and will even allow an automatic boot from an alternate disk drive if necessary. The fol- lowing example assumes that the operating system was installed on hdisk0 and you are mirroring onto hdisk1; if this isn't the case, substitute the names of your disks for hdisk0 and hdisk1 in the following example. Mirroring the rootvg Volume Group for AIX 3.1 or 3.2 1 05/23/96 NOTES: 1. Having "high availability" in the case of mirroring reduces the performance of the machine. 2. It is best for the mirrored disk to be on another SCSI controller. DISCLAIMER: IBM does not take responsibility for this pro- cedure, although it has been verified. It is always recom- mended that a full-system backup (mksysb, smit startup, or backup) be performed prior to doing any disk-reorganization procedure. 1. Extend rootvg to hdisk1: extendvg rootvg hdisk1 2. If the rootvg is on two disks and both of them are mir- rored, QUORUM must be disabled so that the volume group will be varied on if one of the disks goes down. NOTE: This can only be done on AIX levels 3.2.3e and above. If the level of the AIX operating system is from before 3.2.3e, skip this step. To disable QUORUM, run the following: chvg -Qn rootvg WARNING: Please do not proceed further if the system is a /usr client, diskless client, or dataless client. 3. Create a NEW boot logical volume: mklv -y hd5x -t boot -a e rootvg 2 hdisk1 4. Edit the /etc/filesystems file and add the following stanza to the bottom of the file: /blv: dev = /dev/hd5x vol = "spare" mount = false check = false free = false vfs = jfs log = /dev/hd8 5. Update the new boot logical volume: bosboot -a -l /dev/hd5x -d /dev/hdisk1 6. Update NVRAM with a new list of disks from which to attempt to IPL: bootlist -m normal hdisk0 hdisk1 NOTE: The bosboot and bootlist commands need to be exe- cuted on BOTH boot images after ANY command is run that Mirroring the rootvg Volume Group for AIX 3.1 or 3.2 2 05/23/96 updates the ODM. Failure to do so could result in serious problems when booting from the mirrored copy. The most common commands which modify ODM are those which: o Add/change/delete system/device configuration o Add/change/delete logical volumes or volume groups (even volume groups other than rootvg) o Install or update software 7. Create a mirrored copy of all the file systems, the file system log, and the paging space on hdisk1: mklvcopy hd1 2 hdisk1 # /u file system mklvcopy hd2 2 hdisk1 # /usr file system mklvcopy hd3 2 hdisk1 # /tmp file system mklvcopy hd4 2 hdisk1 # / (root) file system mklvcopy hd6 2 hdisk1 # paging space mklvcopy hd8 2 hdisk1 # file system log For 3.2 only: mklvcopy hd9var 2 hdisk1 # /var file system 8. Create a NEW system dump device on the second disk, and set the device to be the secondary dump device: mklv -y hd7x -t sysdump -a e rootvg 2 hdisk1 sysdumpdev -P -s /dev/hd7x 9. Synchronize (update) all the new copies (mirrored copies) created: (NOTE: This takes a while.) syncvg -v rootvg 10. reboot the system shutdown -Fr SWITCHING BACK TO THE PRIMARY DISK WARNING Do not attempt to reintegrate a disk containing rootvg mirrors that was previously removed from rootvg. This disk will appear to be a valid, but will have a dif- ferent copy of the VDGA. Reintergrating can cause unpredict- able results. If you have booted from a mirror but later corrected the primary disk, brought down the system, and connected the primary back to boot from it again, you may get the fol- lowing errors during reboot: 0516-068: lresynclp: Unable to completely resynchronize... 0516-932: /etc/syncvg: unable to synchronize volume group... The system will, however, proceed to boot. Mirroring the rootvg Volume Group for AIX 3.1 or 3.2 3 05/23/96 Now, when the system is up, you will see (with "lsvg -p rootvg") that the primary shows up as "removed" while the secondary shows up as "active". Other problems you will encounter are an inability to create logical volumes on the primary, "lsvg -l rootvg" showing most LVs as "stale", "lsdev -Cc disk" showing the primary as "Available" but "lspv " showing it as "removed". All this is because /dev/ipldevice is still pointing to the secondary (the previous boot disk). To make the primary available again, you need to do the following (before you boot from the primary): 1. Open the primary physical volume for logical and phys- ical output: chpv -va 2. Synchronize the logical volume copies that are not current. syncvg -v rootvg The same needs to be done for the secondary if you have booted from the primary and now want to boot from the sec- ondary. If the replacement of a failed mirrored rootvg disk causes symptoms other than those previously described, restoring a mksysb backup has proven to be the fastest, most reliable method of recovering rootvg. Mirroring the rootvg Volume Group for AIX 3.1 or 3.2 4 05/23/96 READER'S COMMENTS Please fax this form to (512) 823-4009, attention "AIXServ Informa- tion". You may also e-mail comments to: elizabet@austin.ibm.com. These comments should include the same customer information requested below. Use this form to tell us what you think about this document. If you have found errors in it, or if you want to express your opinion about it (such as organization, subject matter, appearance) or make sug- gestions for improvement, this is the form to use. If you need technical assistance, contact your local branch office, point of sale, or 1-800-CALL-AIX (for information about support offer- ings). These services may be billable. Faxes on a variety of sub- jects may be ordered free of charge from 1-800-IBM-4FAX. Outside the U.S. call 415-855-4329 using a fax machine phone. When you send comments to IBM, you grant IBM a nonexclusive right to use or distribute your comments in any way it believes appropriate without incurring any obligation to you. NOTE: If you have a problem report or item number, supplying that number may help us determine why a procedure did or did not work in your specific situation. Problem Report or Item #: Branch Office or Customer #: Be sure to print your name and fax number below if you would like a reply: Name: Fax Number: ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ END OF DOCUMENT (mirror.rootvg.32.krn) Mirroring the rootvg Volume Group for AIX 3.1 or 3.2 5