From Wiki-UX.info

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

How to clone rootdg using Dynamic Root Disk

Abstract

This article explains how to use Dynamic Root Disk (DRD) to clone an HP-UX Operating Environment Veritas VxVM system boot drive to an inactive disk. Once the disgroup and boot configuration is 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.

Contents


Procedure

For this example, an Integrity HP-UX 11i v2 (11.23) running VxVM 5.0 system is used. The rootdg disk group is made of /dev/dsk/c0t0d0s2 device. The available disk for the DRD cloning is /dev/dsk/c0t1d0 the same size as the current rootdg device.

# vxprint -rht -g rootdg
 
# ioscan -fnkC disk
Class     I  H/W Path     Driver  S/W State   H/W Type     Description
=======================================================================
disk      0  0/0/2/0.0.0  sdisk   CLAIMED     DEVICE       HP      Virtual Disk
                         /dev/dsk/c0t0d0     /dev/dsk/c0t0d0s3   /dev/rdsk/c0t0d0s2
                         /dev/dsk/c0t0d0s1   /dev/rdsk/c0t0d0    /dev/rdsk/c0t0d0s3
                         /dev/dsk/c0t0d0s2   /dev/rdsk/c0t0d0s1
disk      1  0/0/2/0.1.0  sdisk   CLAIMED     DEVICE       HP      Virtual Disk
                         /dev/dsk/c0t1d0   /dev/rdsk/c0t1d0
 
# setboot

Clone a single disk rootdg disk group

# /opt/drd/bin/drd clone -vv -x overwrite=true -t /dev/dsk/c0t1d0
 
=======  02/09/10 15:00:39 MST  BEGIN Clone System Image (user=root)  (jobid=cloud)
 
       * Reading Current System Information
       * Selecting System Image To Clone
       * Selecting Target Disk
       * The disk "/dev/dsk/c0t1d0" contains data which will be overwritten.
       * Selecting Volume Manager For New System Image
       * Analyzing For System Image Cloning
       * Creating New File Systems
       * The command "vxrootmir" is being invoked. This step will take some time......
       * Copying File Systems To New System Image
       * Making New System Image Bootable
       * Unmounting New System Image Clone
       * System image: "sysimage_001" on disk "/dev/dsk/c0t1d0"
 
=======  02/09/10 15:34:12 MST  END Clone System Image succeeded. (user=root)  (jobid=cloud)
NOTE: Dynamic Root disk cloning under VxVM is implemented using the vxrootmir command to add a disk to the currently running rootdg disk group.


Known issues

1. The drd clone command may fail showing this error message: Information regarding the target disk "/dev/dsk/c#t#d#" cannot be determined by "vxdisk list".

Example:

# drd clone -vv -x overwrite=true -t /dev/dsk/c0t1d0
 
=======  02/09/10 14:55:11 MST  BEGIN Clone System Image (user=root)  (jobid=cloud)
 
       * Reading Current System Information
       * Selecting System Image To Clone
       * Selecting Target Disk
       * Selecting Volume Manager For New System Image
       * Analyzing For System Image Cloning
       * Creating New File Systems
ERROR:   Clone file system creation fails.
         - Creating the target file systems fails.
         - Information regarding the target disk "/dev/dsk/c0t1d0" cannot be determined by
           "vxdisk list".
       * Creating New File Systems failed with 1 error.
       * Unmounting New System Image Clone
       * System image: "sysimage_001" on disk "/dev/dsk/c0t1d0"
       * Cleaning up after clone errors.
 
=======  02/09/10 14:55:35 MST  END Clone System Image failed with 1 error. (user=root)
         (jobid=cloud)

This situation normaly happens because the disk has been entered into the HP-UX system, but VxVM is not aware of its existence.

# ioscan -fnkC disk
Class     I  H/W Path     Driver  S/W State   H/W Type     Description
=======================================================================
disk      0  0/0/2/0.0.0  sdisk   CLAIMED     DEVICE       HP      Virtual Disk
                         /dev/dsk/c0t0d0     /dev/dsk/c0t0d0s3   /dev/rdsk/c0t0d0s2
                         /dev/dsk/c0t0d0s1   /dev/rdsk/c0t0d0    /dev/rdsk/c0t0d0s3
                         /dev/dsk/c0t0d0s2   /dev/rdsk/c0t0d0s1
disk      1  0/0/2/0.1.0  sdisk   CLAIMED     DEVICE       HP      Virtual Disk
                         /dev/dsk/c0t1d0   /dev/rdsk/c0t1d0
# vxdisk list
DEVICE       TYPE            DISK         GROUP        STATUS
c0t0d0s2     auto:hpdisk     rootdisk01   rootdg       online

Use the vxdisk scandisk command to refresh the disk device database.

# vxdisk scandisks
 
# vxdisk list
DEVICE       TYPE            DISK         GROUP        STATUS
c0t0d0s2     auto:hpdisk     rootdisk01   rootdg       online
c0t1d0s2     auto:none       -            -            online invalid


2. The drd clone command may fail on HP-UX 11i v2 system showing this error message: VxVM vxbrk_rootmir ERROR V-5-2-4008 rootdg disk group contains more than 1 disk (2)" cannot be determined by "vxdisk list".

# drd clone -vv -t /dev/dsk/c0t1d0 -x overwrite=true            
 
=======  02/11/10 16:58:36 CST  BEGIN Clone System Image (user=root)
         (jobid=cloud)
 
       * Reading Current System Information
       * Selecting System Image To Clone
       * Selecting Target Disk
       * The disk "/dev/dsk/c0t1d0" contains data which will be overwritten.
       * Selecting Volume Manager For New System Image
       * Analyzing For System Image Cloning
       * Creating New File Systems
       * The command "vxrootmir" is being invoked. This step will take some
         time......
ERROR:   Clone file system creation fails.
         - Creating the target file systems fails.
         - Command "/usr/lib/vxvm/bin/vxbrk_rootmir" fails. The entire output
           from the command is given below:
         - Start of output from /usr/lib/vxvm/bin/vxbrk_rootmir:
         - VxVM vxbrk_rootmir INFO V-5-2-4023 17:36: Checking specified disk(s)
           for presence and type
           VxVM vxbrk_rootmir ERROR V-5-2-4008 rootdg disk group contains more
           than 1 disk (2)
 
         - End of output from /usr/lib/vxvm/bin/vxbrk_rootmir
       * Creating New File Systems failed with 1 error.
       * Unmounting New System Image Clone
       * System image: "sysimage_001" on disk "/dev/dsk/c0t1d0"
       * Cleaning up after clone errors.
 
=======  02/11/10 17:36:41 CST  END Clone System Image failed with 1 error.
         (user=root)  (jobid=cloud)

This is a known VxVM 5.0 Veritas incident according to Veritas Volume Manager fixed issues Veritas Storage Foundation Release Notes - Veritas Volume Manager fixed issues

1158588Breaking off a root disk mirror with vxbrk_rootmir(1M) command fails with the following error messages:
vxbrk_rootmir fails with an error

vxbrk_rootmir: 16:04: Checking specified disk(s) for presence and type
vxbrk_rootmir: ERROR: rootdg disk group contains more than 1 disk (2)

The solution is to rectify the check that verifies whether the volumes on the root disk mirror are the same as those present on the root disk and permit breaking off the mirror. Also, the code is modified to confirm that there is no invalid mirror disk in the boot disk group.

The first HP-UX patch that contains the required fix for that incident is: PHCO_37086 - s700_800 11.23 VRTS 5.0 MP1RP6 VRTSvxvm Command Patch.

(SR:QXCR1000592951)
        SYMANTEC Incident Number: 1158588(1127556)
        Breaking off a root disk mirror with vxbrk_rootmir(1M)
        command fails with the following error messages:
 
        vxbrk_rootmir fails with an error
        vxbrk_rootmir: 16:04: Checking specified disk(s)
        for presence and type
        vxbrk_rootmir: ERROR: rootdg disk group contains
        more than 1 disk (2)

Boot from the alternate disk

# /opt/drd/bin/drd activate -x reboot=true

Return to the previous boot enviroment

# /opt/drd/bin/drd activate -x reboot=true
NOTE: Do not use /opt/drd/bin/drd deactivate -x reboot=true. 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 20 April 2011, at 23:55. This page has been accessed 3,187 times.