Migrating the contents of a physical volume - AIX and pSeries Information Center for V5.3

来源:百度文库 编辑:神马文学网 时间:2024/05/01 08:50:51

Migrating the contents of a physical volume

To move the physical partitions belonging to one or more specifiedlogical volumes from one physical volume to one or more other physical volumesin a volume group, use the following instructions. You can also use thisprocedure to move data from a failing disk before replacing or repairing thefailing disk. This procedure can be used on physical volumes in either theroot volume group or a user-defined volume group.

Attention: Whenthe boot logical volume is migrated from a physical volume, the boot recordon the source must be cleared or it could cause a system hang. When you executethe bosboot command, you must also execute the chpv-c command described in step 4 ofthe following procedure.
  1. If you want to migrate the data to a new disk, do the following steps. Otherwise, continue with step 2.
    1. Check that the disk is recognizable by the system and available by typing:
      lsdev -Cc disk
      The output resembles the following:
      hdisk0 Available 10-60-00-8,0  16 Bit  LVD  SCSI Disk Drive
      hdisk1 Available 10-60-00-9,0 16 Bit LVD SCSI Disk Drive
      hdisk2 Available 10-60-00-11,0 16 Bit LVD SCSI Disk Drive
    2. If the disk is listed and in the available state, check that it does not belong to another volume group by typing:
      lspv
      The output looks similar to the following:
      hdisk0          0004234583aa7879       rootvg         active
      hdisk1 00042345e05603c1 none active
      hdisk2 00083772caa7896e imagesvg active
      In the example, hdisk1 can be used as a destination disk because the third field shows that it is not being used by a volume group.

      If the new disk is not listed or unavailable, refer to Configuring a disk or Logical volume storage.

    3. Add the new disk to the volume group by typing:
      extendvg VGName diskname
      Where VGName is the name of your volume group and diskname is the name of the new disk. In the example shown in the previous step, diskname would be replaced by hdisk1.
  2. The source and destination physical volumes must be in the same volume group. To determine whether both physical volumes are in the volume group, type:
    lsvg -p VGname
    Where VGname is the name of your volume group. The output for a root volume group looks similar to the following:
    rootvg:                                                                       
    PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
    hdisk0 active 542 85 00..00..00..26..59
    hdisk1 active 542 306 00..00..00..00..06
    Note the number of FREE PPs.
  3. Check that you have enough room on the target disk for the source that you want to move:
    1. Determine the number of physical partitions on the source disk by typing:
      lspv SourceDiskName | grep "USED PPs"
      Where SourceDiskName is of the name of the source disk, for example, hdisk0. The output looks similar to the following:
      USED PPs:      159 (636 megabytes)
      In this example, you need 159 FREE PPs on the destination disk to successfully complete the migration.
    2. Compare the number of USED PPs from the source disk with the number of FREE PPs on the destination disk or disks (step 2). If the number of FREE PPs is larger than the number of USED PPs, you have enough space for the migration.
  4. Follow this step only if you are migrating data from a disk in the rootvg volume group. If you are migrating data from a disk in a user-defined volume group, proceed to step 5. Check to see if the boot logical volume (hd5 ) is on the source disk by typing:
    lspv -l SourceDiskNumber | grep hd5
    If you get no output, the boot logical volume is not located on the source disk. Continue to step 5. If you get output similar to the following:
    hd5            2   2   02..00..00..00..00   /blv
    then run the following command:
    migratepv -l hd5 SourceDiskName DestinationDiskName
    You will receive a message warning you to perform the bosboot command on the destination disk. You must also perform a mkboot -c command to clear the boot record on the source. Type the following sequence of commands:
    bosboot -a -d /dev/DestinationDiskName
    bootlist -m normal DestinationDiskName
    mkboot -c -d /dev/SourceDiskName
  5. Migrate your data by typing the following SMIT fast path:
    smit migratepv 
  6. List the physical volumes, and select the source physical volume you examined previously.
  7. Go to the DESTINATION physical volume field. If you accept the default, all the physical volumes in the volume group are available for the transfer. Otherwise, select one or more disks with adequate space for the partitions you are moving (from step 4).
  8. If you wish, go to the Move only data belonging to this LOGICAL VOLUME field, and list and select a logical volume. You move only the physical partitions allocated to the logical volume specified that are located on the physical volume selected as the source physical volume.
  9. Press Enter to move the physical partitions.
At this point, the data now resides on the new (destination) disk.The original (source) disk, however, remains in the volume group. If the diskis still reliable, you could continue to use it as a hot spare disk (see Enabling hot spare disk support for an existing volume group and Enabling hot spare disk support while creating a new volume group).Especially when a disk is failing, it is advisable to do the following steps:
  1. To remove the source disk from the volume group, type:
    reducevg VGNname SourceDiskName
  2. To physically remove the source disk from the system, type:
    rmdev -l SourceDiskName -d
Parent topic: Copy of a logical volume to another physical volume
Migrating the contents of a physical volume - AIX and pSeries Information Center for V5.3 Volume I: History of the Talmud: Contents of Volume I. The Price of War, Front and Center Process for the purification of hydrogen and a purifier therefor - US Patent 5556603 A breath of fresh air for relations between the U.S. and Latin America? Volume I: History of the Talmud: Chapter XIV: The Talmud in the Sixteenth and Seventeenth Centuries Information Efficiency ? A better way of using Gmail for GTD Volume I: History of the Talmud: Appendix A. The Current Situation and Future Development of the General Education Center Volume I: History of the Talmud: Chapter XI: Talmudic Scholars of Germany and Northern France Volume I: History of the Talmud: Chapter VIII: Islam and Its Influence on the Talmud Volume I: History of the Talmud: Chapter IV: The Sixth Century: Persian and Byzantine Persecution of the Talmud Volume I: History of the Talmud: Chapter XV. Polemics with Muslims and Frankists Volume I: History of the Talmud: Chapter XIX: Exilarchs, Talmud at the Stake and Its Development at the Present Time A Contest between a Mortal and the Goddess of... The Center for Advanced Research on Language ... Imaging Research Center at The University of ... Journal list and rank of Information Systems Volume I: History of the Talmud: Introduction Volume I: History of the Talmud: Preface a comparison of the size of the yahoo and google indices [Nemeth10] 13.6. Management of the AIX kernel The Babylonian Talmud, Tract Sabbath, Rodkinson, tr.; Book I: Volume I: Contents A Comparative Study of the Cultural Images in Chinese and English Idioms and Idioms Tra