Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
Dynamic Root Disk Administrator's Guide: HP-UX 11i v2, HP-UX 11i v3 > Chapter 4  Accessing the Inactive System Image

Performing Administrative Tasks on the Inactive System Image

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Glossary

 » Index

The following examples show some tasks you can perform on the inactive system image.

TIP: If you have made many changes to the active system image since using drd clone and you want to apply those same changes to the inactive system image, it is more efficient and robust to start fresh with a new drd clone command than to manually apply changes to the inactive system image.

Example 4-3 Checking a Warning Message

You verify software on the inactive system image with drd runcmd swverify and see a warning message.

Task:  Find additional information about the message.

To see detailed information about the warning message supplied by the swagent log, execute the following command:

# /opt/drd/bin/drd runcmd view /var/adm/sw/swagent.log

Example 4-4 Creating a Patch Install File

Task:  Create a file containing a list of patches to be applied to the inactive system image. You want to use the file as the argument of a -f option in a swinstall command run by drd runcmd. Follow this procedure:

  1. Mount the inactive system image:

    # /opt/drd/bin/drd mount
  2. Enter the patches into a file such as

    /var/opt/drd/mnts/sysimage_001/var/opt/drd/my_patch_list

    with the following commands:

    1. # /usr/bin/echo “PHCO_02201” > \
      /var/opt/drd/mnts/sysimage_001/var/opt/drd/my_patch_list
    2. # /usr/bin/echo “PHCO_12134” >> \ /var/opt/drd/mnts/sysimage_001/var/opt/drd/my_patch_list
    3. # /usr/bin/echo “PHCO_56178” >> \ /var/opt/drd/mnts/sysimage_001/var/opt/drd/my_patch_list
      NOTE: If the inactive system image is the original system image, and not the clone, the root file system mount point is /var/opt/drd/mnts/sysimage_000.
  3. Apply the patches using drd runcmd, identifying the file by its path relative to the mount point of the inactive system image root file system:

    # /opt/drd/bin/drd runcmd swinstall -s patch_server:/var/opt/patch_depot \ -f /var/opt/drd/my_patch_list
    NOTE: Because the inactive system image was mounted when drd runcmd was executed, it is still mounted after drd runcmd completes. You can unmount it with the following command:
    # /opt/drd/bin/drd umount

Example 4-5 Looking for Changes to cron Jobs

Task:  Find out if any cron jobs have changed after cloning.

Use the following commands to determine if any cron jobs used by root have changed since the inactive system image was created:

  1. # /opt/drd/bin/drd mount
  2. # /usr/bin/ls -l var/spool/crontab/crontab.root \
    /var/opt/drd/mnts/sysimage_001/var/spool/crontab.root
  3. # /usr/bin/diff /var/spool/crontab/crontab.root \ /var/opt/drd/mnts/sysimage_001/var/spool/crontab/crontab.root

The following is an example output of the diff command:

6,7c6,7 < # log kernel diagnostic messages every 20 minutes < 05,25 45 * * * * /usr/sbin/dmesg- >>/var/adm messages --- > # log kernel diagnostic messages every 10 minutes > 05,15,25,35,45,55 * * * * /usr/sbin/dmesg - >>/var/adm/messages

This output shows that the booted system was updated to run kernel diagnostics every 20 minutes. If you decide that when the clone is booted, diagnostics should run every 20 minutes, as they are on the booted system, you can:

  1. Copy the crontab file from the booted system to the clone:

    # /usr/bin/cp /var/spool/crontab/crontab.root \ /var/opt/drd/mnts/sysimage_001/var/spool/crontab/crontab.root
  2. Unmount the inactive system image:

    # /opt/drd/bin/drd umount

Example 4-6 Editing symlinked Files

Task:  You changed the value of NUM_BK in /opt/VRTS/bin/vxconfigbackup from 5 to 10 by editing the file. You want the change applied to the clone as well.

Execute the following commands:

  1. Mount the inactive system image:

    # /opt/drd/bin/drd mount
  2. Compare vxconfigbackup with the clone copy:

    # /usr/bin/diff /opt/VRTS/bin/vxconfigbackup \ /var/opt/drd/mnts/sysimage_000/opt/VRTS/bin/vxconfigbackup

Surprisingly, the files are equal! What happened?

A long listing shows that the files are symlinks:

# /usr/bin/ll /opt/VRTS/bin/vxconfigbackup \ /var/opt/drd/mnts/sysimage_000/opt/VRTS/bin/vxconfigbackup

The listing shows:

lrwxr-xr-x l bin bin 32 Apr 3 17:34 /opt/VRTS/bin/vxconfigbackup -> /usr/lib/vxvm/bin/vxconfigbackup lrwxr-xr-x 1 bin bin 32 Nov 16 12:45 /var/opt/drd/mnts/sysimage_000/opt/VRTS.bin/vxconfigbackup -> /usr/lib/vxvm/bin/vxconfigbackup

When the clone is booted, the target of the symlink on the clone resides on the clone. However, when the clone is mounted under the booted system, the target of the symlink resides on the booted system.

To change the data on the clone, edit the file that will be the target of the symlink when the clone is booted:

# /usr/bin/vi /var/opt/drd/mnts/sysimage_001/usr/lib/vxvm/vxconfigbackup

and change the value of NUM_BK to 10.

CAUTION: Attempting to edit a path on the clone that is an absolute symlink results in changes on the booted system!
Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2008 Hewlett-Packard Development Company, L.P.