11/15/94 Information on Using the migratepv Command in AIX 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 has NOT been | | verified for AIX 4.1. | | | +----------------------------------------------------------+ WARNING: Please do not use this document if the system is a /usr client, diskless client, or dataless client. MIGRATEPV SYNTAX migratepv [ -l lv_name ] source_disk destination_disk(s) Notice that the "-l lv_name" is optional and that more than one destination disk can be included. GENERAL STEPS FOR USING MIGRATEPV WARNING: Please do not use this document if the system is a /usr client, diskless client, or dataless client. WARNING: The migratepv command only migrates logical volumes of 512 logical partitions (2 GB) or less. You can check the size of a logical volume with the "lslv " command. 1. With the following command, determine which disks are included in the volume group to be migrated. (Replace VG_NAME with the volume group name.) lsvg -p VG_NAME Sample output: rootvg: PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION hdisk0 active 159 0 00..00..00..00..00 2. If the disk to which you are migrating is new, perform these steps: Information on Using the migratepv Command in AIX 3.2 1 11/15/94 a. Make sure the disk is available with the following command. lsdev -Cc disk Sample output: hdisk0 Available 00-08-00-30 670 MB SCSI Disk Drive hdisk1 Available 00-08-00-20 857 MB SCSI Disk Drive If the disk is not listed or is listed but not in the available state, you may need a CE's help to check/install your hardware. If it is listed and in the available state, then make sure it does not belong to another volume group: lspv Sample output: hdisk0 0000078752249812 rootvg hdisk1 000000234ac56e9e none b. To add the new disk to a volume group, enter the command: extendvg VG_NAME hdisk# CAUTION! If extendvg finds that the hdisk contains information, it will issue the following warning but will NOT prevent you from including it in another volume group. 0516-014 linstallpv: The physical volume appears to belong to another volume group. 0516-631 extendvg: Warning, all data belonging to physical volume hdisk3 will be destroyed. extendvg: Do you wish to continue? y(es) n(o)? If you answer yes, ALL INFORMATION on the physical disk WILL BE LOST. BE CAREFUL!!! 3. With the following command, determine the number of PPs you will need for the migratepv. (Replace hdisk# with the source hdisk.) lspv hdisk# | grep "USED PPs" Sample output: USED PPs: 159 (636 megabytes) For the above example, you would need 159 FREE PPs in this volume group to successfully complete the migratepv. 4. Determine the number of free PPs on the destination disk(s). Run the following command for EACH DESTINATION Information on Using the migratepv Command in AIX 3.2 2 11/15/94 DISK IN THE VOLUME GROUP. (Replace hdisk# with the des- tination hdisk.) lspv hdisk# | grep "FREE PPs" Sample output: FREE PPs: 204 (816 megabytes) 5. Now, add up the FREE PPs from all of the destination disks (determined in step 4). If the SUM is LARGER than the USED PPs from step 3, then you will have enough space to complete the migratepv procedure. If not, then another disk will be needed to get enough FREE PPs. 6. With the following command, check to see if hd5 is on the source disk. (Replace hdisk# with the source hdisk.) lspv -l hdisk# | grep hd5 Sample output: hd5 2 2 02..00..00..00..00 /blv If you get no output, then hd5 is not on that hdisk. Skip to step 6c. If you get output similar to the sample shown above, perform the following: a. To migrate the rootvg, it is important to run migratepv with the "-l hd5" flag before running it on the entire disk. Use the following command: migratepv -l hd5 After the command is completed, a message will be displayed which will warn you to run bosboot on the destination disk. (See part 6b.) Note the hdisk listed in the message. NOTE: If you attempt to run migratepv with a desti- nation disk that is not a part of the volume group, you will get these errors: 0516-320 getlvodm: Physical volume hdisk1 is not assigned to a volume group. 0516-812 migratepv: Warning, migratepv did not com- pletely succeed; all physical partitions have not been moved off the PV. WARNING: Please do not proceed further if the system is a /usr client, diskless client, or dataless client. b. Execute the following with the hdisk listed in the message from migratepv: Information on Using the migratepv Command in AIX 3.2 3 11/15/94 bosboot -a -d /dev/ /usr/sbin/mkboot -c -d /dev/ c. With the following commands, determine if you have a logical volume of type sysdump on the source disk that contains the rootvg. lsvg -l rootvg | grep sysdump Sample output: hd7 sysdump 2 2 1 open/syncd /mnt If you get no output, then there are no logical volumes of type sysdump on that hdisk. Skip to step 7. If you get output similar to the sample shown above, run the following command, where yyy is the logical volume name (usually hd7) found in the output of the previous command and where hdisk# is the source hdisk. lspv -l hdisk# | grep yyy Sample output: hd7 2 2 00..00..02..00..00 /mnt If you get no output, skip to step 7. If you do get output from the lspv command, run the sysdumpdev command, to check if this logical volume is the primary dump device: sysdumpdev -l Sample output: primary /dev/hd7 secondary /dev/sysdumpnull If /dev/hd7 is listed as primary in the output, then logical volume hd7 is the primary dump device (/dev/hd7), and you will need to change the primary dump device. Use the following command: sysdumpdev -Pp /dev/sysdumpnull 7. Now, migrate the disk. (NOTE: This may take an hour if the source disk is large.) migratepv NOTE: If the source disk on which you run migratepv contains hd5 and you run migratepv without first running it with the "-l hd5" flag (see step 6), you will get the following errors: Information on Using the migratepv Command in AIX 3.2 4 11/15/94 0516-1011 migratepv: Logical volume hd5 is labeled as a boot logical volume. 0516-812 migratepv: Warning, migratepv did not completely succeed; all physical partitions have not been moved off the PV. NOTE: If you attempt to run migratepv with a destina- tion disk that is not a part of the volume group, you will get these errors: 0516-320 getlvodm: Physical volume hdisk1 is not assigned to a volume group. 0516-812 migratepv: Warning, migratepv did not completely succeed; all physical partitions have not been moved off the PV. 8. If you want to remove the source hdisk from the volume group, run the following command: reducevg VG_NAME 9. If you plan to physically remove the old disk from the system, run the following command: rmdev -l -d 10. If you migrated your primary dump device (step 6c), run the following command (where /dev/hd# is usually /dev/hd7): sysdumpdev -Pp /dev/hd# EXAMPLE In the following example, migratepv is used on a rootvg that contains only one disk. The commands entered are shown along with important output. Input: lsvg -p rootvg Output rootvg: PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION hdisk0 active 159 0 00..00..00..00..00 Input: lsdev -Cc disk Output: hdisk0 Available 00-08-00-30 670 MB SCSI Disk Drive hdisk1 Available 00-08-00-20 857 MB SCSI Disk Drive Input: lspv Information on Using the migratepv Command in AIX 3.2 5 11/15/94 Output: hdisk0 0000078752249812 rootvg hdisk1 000000234ac56e9e none Input: extendvg rootvg hdisk1 lsvg -p rootvg Output: rootvg: PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION hdisk0 active 159 0 00..00..00..00..00 hdisk1 active 204 204 40..41..41..41..41 ***** Since hdisk0 contains 159 PPs which have to be migrated, and hdisk1 has 204 PPs available, we have enough room to migrate. Input: migratepv -l hd5 hdisk0 hdisk1 bosboot -a -d /dev/hdisk1 /usr/sbin/mkboot -c -d /dev/hdisk0 sysdumpdev -Pp /dev/sysdumpnull migratepv hdisk0 hdisk1 reducevg rootvg hdisk0 sysdumpdev -Pp /dev/hd7 Information on Using the migratepv Command in AIX 3.2 6 11/15/94 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 (migratepv.32.krn, 4FAX# 2488) Information on Using the migratepv Command in AIX 3.2 7