From Wiki-UX.info

Wiki-UX / Dynamic Root Disk / How to clone vg00 using Dynamic Root Disk
Jump to: navigation, search

How to clone vg00 using Dynamic Root Disk

Abstract

This article explains how to use Dynamic Root Disk (DRD) to clone an HP-UX Operating Environment LVM system boot drive to an inactive disk. Once the volume group and boot configuration are duplicated into the target device, some of the following actions can be done:

  1. It performs system maintenance on the clone while the HP-UX 11i system is online
  2. It reboots quickly during off-hours after the desired changes have been made, significantly reducing system downtime
  3. It utilizes the clone for system recovery, if needed
  4. It rehosts the clone in another system for testing or provisioning purposes in the following devices:
    ♦ Integrity Virtual Machines (Integrity VMs) running either HP-UX 11i v3 LVM or HP-UX 11i v2 LVM
    ♦ Integrity server blades running HP-UX 11i v3 LVM
  5. It performs an OE Update on the clone from an older version of HP-UX 11i v3 to HP-UX 11i v3 update 4 or later

Another normal application of this procedure is to migrate the system bootable drive to larger hard drives avoiding LVM 1.0 Physical Volume restrictions imposed at /dev/vg00 creation time.

Contents


Procedure

For this example, an HP-UX 11i v3 (11.31) system is used, /dev/vg00 is made of physical volume /dev/disk/disk12 that employs LVM mirroring to /dev/disk/disk7 (utilizing agile view nomenclature). The available disk is /dev/disk/disk10 the same size as the /dev/vg00 disks.

# strings /etc/lvmtab
/dev/vg00
/dev/disk/disk12
 
# ioscan -N -fnC disk
Class     I  H/W Path  Driver S/W State   H/W Type     Description
===================================================================
disk      7  64000/0xfa00/0x0  esdisk   CLAIMED     DEVICE       HP 36.4GST336754LC
                      /dev/disk/disk7   /dev/rdisk/disk7
disk     10  64000/0xfa00/0x3  esdisk   CLAIMED     DEVICE       HP 36.4GST336753LC
                      /dev/disk/disk10   /dev/rdisk/disk10
disk     12  64000/0xfa00/0x5  esdisk   CLAIMED     DEVICE       HP 36.4GST336754LC
                      /dev/disk/disk12   /dev/rdisk/disk12
 
# setboot
Primary bootpath : 0/1/1/0.0x1.0x0 (/dev/rdisk/disk12)
 
Autoboot is ON (enabled)
Autosearch is ON (enabled)

Clone a single disk /dev/vg00

# /opt/drd/bin/drd clone -v -x overwrite=true -t /dev/disk/disk10
 
=======  12/10/07 14:06:17 CST  BEGIN Clone System Image (user=root)
         (jobid=delta)
 
       * Reading Current System Information
       * Selecting System Image To Clone
       * Selecting Target Disk
       * The disk "/dev/disk/disk10" contains data which will be overwritten.
       * Selecting Volume Manager For New System Image
       * Analyzing For System Image Cloning
       * Creating New File Systems
       * Copying File Systems To New System Image
       * Making New System Image Bootable
       * Unmounting New System Image Clone
       * System image: "sysimage_001" on disk "/dev/disk/disk10"
 
=======  12/10/07 15:16:51 CST  END Clone System Image succeeded. (user=root)
         (jobid=delta)

Boot from the alternate disk

# /opt/drd/bin/drd activate -x reboot=true
 
=======  12/11/07 09:18:13 CST  BEGIN Activate Inactive System Image
         (user=root)  (jobid=delta)
 
       * Checking for Valid Inactive System Image
       * Reading Current System Information
       * Locating Inactive System Image
       * Determining Bootpath Status
       * Primary bootpath : 0/1/1/0.0x1.0x0 (/dev/rdisk/disk12) before
         activate.
       * Primary bootpath : 0/1/1/1.0xd.0x0 after activate.
       * Alternate bootpath : 0/1/1/1.0x0.0x0 (/dev/rdisk/disk7) before
         activate.
       * Alternate bootpath : 0/1/1/1.0x0.0x0 (/dev/rdisk/disk7) after
         activate.
       * Activating Inactive System Image
       * Rebooting System

Test the current boot enviroment

# strings /etc/lvmtab
/dev/vg00
/dev/disk/disk10
 
# echo boot_string/S|adb /stand/vmunix /dev/mem
 
boot_string:
boot_string:
disk(0/1/1/1.13.0.0.0.0.0;0)/stand/vmunix
 
# setboot
Primary bootpath : 0/1/1/1.0xd.0x0 (/dev/rdisk/disk10)
Alternate bootpath : 0/1/1/1.0x0.0x0 (/dev/rdisk/disk7)
 
Autoboot is ON (enabled)
Autosearch is ON (enabled)
 
# ioscan -m hwpath
Lun H/W Path      Lunpath H/W Path                 Legacy H/W Path
====================================================================
64000/0xfa00/0x0
                  0/1/1/1.0x0.0x0                  0/1/1/1.0.0
64000/0xfa00/0x1
                  0/1/1/1.0x9.0x0                  0/1/1/1.9.0
64000/0xfa00/0x2
                  0/1/1/1.0xb.0x0                  0/1/1/1.11.0
64000/0xfa00/0x3
                  0/1/1/1.0xd.0x0                  0/1/1/1.13.0
64000/0xfa00/0x4
                  0/1/1/1.0xf.0x0                  0/1/1/1.15.0
64000/0xfa00/0x5
                  0/1/1/0.0x1.0x0                  0/1/1/0.1.0
64000/0xfa00/0x6
                  0/0/3/0.0.0x0.0x0                0/0/3/0.0.0.0
 
# ioscan -N -fnkC disk
Class     I  H/W Path  Driver S/W State   H/W Type     Description
===================================================================
disk      7  64000/0xfa00/0x0  esdisk   CLAIMED     DEVICE       HP 36.4GST336754LC
                      /dev/disk/disk7   /dev/rdisk/disk7
disk      8  64000/0xfa00/0x1  esdisk   CLAIMED     DEVICE       HP 36.4GST336753LC
                      /dev/disk/disk8   /dev/rdisk/disk8
disk      9  64000/0xfa00/0x2  esdisk   CLAIMED     DEVICE       HP 36.4GST336753LC
                      /dev/disk/disk9   /dev/rdisk/disk9
disk     10  64000/0xfa00/0x3  esdisk   CLAIMED     DEVICE       HP 36.4GST336753LC
                      /dev/disk/disk10   /dev/rdisk/disk10
disk     11  64000/0xfa00/0x4  esdisk   CLAIMED     DEVICE       HP 36.4GST336753LC
                      /dev/disk/disk11   /dev/rdisk/disk11
disk     12  64000/0xfa00/0x5  esdisk   CLAIMED     DEVICE       HP 36.4GST336754LC
                      /dev/disk/disk12   /dev/rdisk/disk12
NOTE: The strings commands show that the volume group /dev/vg00 is pointing to /dev/disk/disk10.


NOTE: The setboot command shows that the NVRAM changes the primary boot path to 0/1/1/1.13 that corresponds to Lun Hardware Path 64000/0xfa00/0x3 the correct path for /dev/disk/disk10.


Return to the previous boot enviroment

# /opt/drd/bin/drd activate -x reboot=true
 
=======  12/11/07 10:03:06 CST  BEGIN Activate Inactive System Image
         (user=root)  (jobid=delta)
 
       * Checking for Valid Inactive System Image
       * Reading Current System Information
       * Locating Inactive System Image
       * Determining Bootpath Status
       * Primary bootpath : 0/1/1/1.0xd.0x0 (/dev/rdisk/disk10) before
         activate.
       * Primary bootpath : 0/1/1/0.0x1.0x0 after activate.
       * Alternate bootpath : 0/1/1/1.0x0.0x0 (/dev/rdisk/disk7) before
         activate.
       * Alternate bootpath : 0/1/1/1.0x0.0x0 (/dev/rdisk/disk7) after
         activate.
       * Activating Inactive System Image
       * Rebooting System
NOTE: Do not use /opt/drd/bin/drd deactivate -x reboot=true to return to the boot configuration. The default behavior of the deactivate command option is to set the current booted image as the default boot image.


References

Authors

Editor

This page was last modified on 21 April 2011, at 00:29. This page has been accessed 8,362 times.