02/28/96, 4FAX# 2580 When Fixed Disk Removed Without Software Procedures 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 has NOT been | | verified for AIX 4.1. | | | +----------------------------------------------------------+ PROCEDURE The following is a procedure to remove a fixed disk from the ODM after the disk has been physically removed from the RISC System/6000 without the proper software procedures. This procedure may also be used if the fixed disk cannot be recognized by the system and must be replaced. This document applies to AIX 3.2. IMPORTANT NOTES o If the fixed disk is still physically in the system and it can be recognized, you must follow a DIFFERENT set of procedures. You can order a fax with those procedures free of charge from 1-800-IBM-4FAX. The document number is 1895. (Outside the U.S., you can order the fax by calling 415-855-4FAX from a fax machine phone.) o This procedure is for removing the parameters of a disk from AIX. Once the disk is removed physically from the RISC System/6000, the data on that disk is lost unless there is a backup or a copy of it. o This procedure requires AIX expertise and knowledge in the area of volume groups, file systems, and ODM. Some extra cleanup and reconfiguration may be required after this procedure is applied. Reinstalling the system may be required for certain conditions. o This procedure may not work when the following are on the removed disk: - Third party software (such as Sybase(RT) or Oracle(RT)) which uses its own logical and physical When Fixed Disk Removed Without Software Procedures 1 02/28/96, 4FAX# 2580 volumes -- contact the third-party vendor for dis- aster recovery procedures - Mirroring, HACMP, RAID - System files such as / (root), /usr, and /var In this situation, partial or complete reinstallation may be required. If the reducevg command was not run prior to the physical removal of the fixed disk, information about that disk still resides in the system. Follow the steps below to attempt to remove that disk from the ODM. 1. If there was a paging space logical volume on the disk in question, follow this step (otherwise, skip to step 2). If the paging space in question is the default paging space (hd6), you need to run another procedure before continuing. That procedure can be found in the fax entitled "How to Reduce Paging Space in AIX 3.1 or 3.2", which can be ordered free of charge from 1-800-IBM-4FAX. It's document number is 2565. Then skip to step 2. If the paging space is not the default paging space, do the following: a. Change the characteristics of the paging space, so that it is not active at the next reboot: chps -a n PagingSpaceName For example: chps -a n hd61 b. Reboot the system in order to inactivate the paging space: shutdown -Fr c. Remove the paging space (for example, "rmps hd61"). 2. Obtain the PVid number and the volume group of the disk to be removed by comparing the output of lspv and lqueryvg, as follows: Run lspv Sample output: hdisk0 000005265ac63976 rootvg hdisk1 00005264d21adb2e rootvg Note the volume group in the output. In this example it is rootvg. When Fixed Disk Removed Without Software Procedures 2 02/28/96, 4FAX# 2580 Now run the following, where hdisk# is one of the disks in the volume group in question. lqueryvg -Ptp hdisk# Compare the "Physical:" section of the lqueryvg output to the lspv output. The PVid in the lqueryvg output that is not in the lspv output is the one that needs to be deleted. For example, if "lqueryvg -Ptp hdisk0" shows Physical: 000005265ac63976 2 0 00005264d21adb2e 1 0 00000540000000b5 1 0 then the PVid that needs to be deleted is "00000540000000b5". 3. Obtain the VGid number with the following command, replacing "VolumeGroup" with the volume group obtained in step 2: getlvodm -v VolumeGroup Sample output: 00005264c192a1a3 The VGid for rootvg in this example is: 00005264c192a1a3 4. Run the following commands to remove the physical volume, using the PVid and VGid obtained in steps 2 and 3. | reducevg -df VGname PVid 5. If the physical volume was not successfully removed in step 4, try the following: a. Run the following command: grep NVGID /usr/sbin/reducevg If there is no output, skip to step 6. b. Save the current version of reducevg: cp /usr/sbin/reducevg /usr/sbin/reducevg.keep c. Edit reducevg ("vi /usr/sbin/reducevg", or use your favorite editor). d. Search for the phrase "NVGID". Note the "if" state- ment immediately below the "NVGID=" assignment statement. Place a "#" (comment symbol) in the first position of the "NVGID=" line and every line of the "if" statement, like this: When Fixed Disk Removed Without Software Procedures 3 02/28/96, 4FAX# 2580 #NVGID=`lqueryvg -p $PVNAME -v 2>/dev/null` #if [ "$NVGID" != "$VGID" ] #then # dspmsg -s 1 cmdlvm.cat 886 "`lvmmsg 886`\n" reducevg $PVNAME $VGNAME >& 2 # EXIT_CODE=2 # continue #fi Now run the reducevg command again: reducevg -df VGname PVid 6. If the physical volume was not successfully removed in step 5, try the following. (As an EXAMPLE, this step uses hdisk99 as the problem disk, hdisk0 as the good disk, and rootvg as the volume group.) NOTE: You can use any hdisk# (for example, hdisk99) for the problem disk AS LONG AS THAT HDISK# IS NOT CURRENTLY BEING USED ON YOUR SYSTEM. Run these commands: odmget -q name=hdisk0 CuAt > /tmp/hdisk.add odmget -q name=hdisk0 CuDv >> /tmp/hdisk.add vi /tmp/hdisk.add (or use your favorite editor) Search for the phrase "hdisk0" and replace it with "hdisk99". Also replace the PVid of hdisk0 with the PVid that needs to be deleted (found in step 2). Save the file and exit the editor, and run: odmadd /tmp/hdisk.add reducevg -d rootvg hdisk99 synclvodm -v rootvg rmdev -l hdisk99 -d savebase shutdown -Fr 7. If NONE of the above methods work, then the volume group MIGHT be damaged beyond repair; you might have to delete the volume group and re-create it. If you would like further assistance in attempting to remove the physical volume, contact one of the following: o local branch office o your point of sale o 1-800-CALL-AIX (to register for fee-based services) All of the above avenues for assistance may be billable. When Fixed Disk Removed Without Software Procedures 4 02/28/96, 4FAX# 2580 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 (remove.disk.krn, 4FAX# 2580) When Fixed Disk Removed Without Software Procedures 5