From Wiki-UX.info

Wiki-UX / Dynamic Root Disk / How to install software using Dynamic Root Disk
Jump to: navigation, search

How to install software using Dynamic Root Disk

Abstract

The Dynamic Root Disk allows to install SD-UX software components and system patches on the inactive system image without disrupting the active system image, the running kernel, or the process space. In this way, it is possible to perform changes to the inactive system image without risking the state and configuration of the active system.

Packages to be installed using Dynamic Root Disk must utilize control scripts that do not take any action that affects the booted system. Because the DRD product was not available at the initial release of 11i v2, relatively few non-patch products have the is_drd_safe attribute set to true. For HP-UX 11i v3, however, most products will have the is_drd_safe attribute set to true.

Contents


Verify "DRD-Safe" attribute

DRD-Safe packages implement the fileset level attribute is_drd_safe. By default, packages set this attribute to false. To check that a particular product is DRD-Safe, verified that the fileset has this attribute set to true using the following command.

# /usr/sbin/swlist -l fileset -s <depot_path> -a is_drd_safe <product_name>

Example:

# swlist -l fileset -a is_drd_safe -s `pwd`/FEATURE11i_B.11.31.0709.312.depot PHCO_36126
 
# Initializing...
# Contacting target "delta"...
#
# Target:  delta:/mnt/depots/11iv3/FEATURE11i_B.11.31.0709.312.depot
#
 
# PHCO_36126
  PHCO_36126.TRUEVM-RUN                 true


When product is not DRD-Safe, the attribute value will be false. Packages created without consideration of DRD restrictions will show no value on this attribute. As a precaution, asumme that all packages that require a system reboot and do not have the is_drd_safe attribute explicity set are not DRD-Safe.

Installing software using DRD sage commands

To install software packages to the inactive system image using DRD safe commands, you need to follow this steps.

  1. Mount the DRD "inactive" disk image to access it's filesystems.
  2. Verify the product you need to install.
  3. Translate the product depot from the file or report depot into a local depot file sytem using swcopy.
  4. Verify the traslated product depot.
  5. Copy the depot file system into an "inactive" volume filesystem.
  6. Install the depot into the "inactive" volume image using drd runcmd swinstall.
  7. Unmount the DRD "inactive" volume.

Mount the DRD "inactive" volume

# /opt/drd/bin/drd mount
 
=======  12/12/07 16:43:34 CST  BEGIN Mount Inactive System Image (user=root)
         (jobid=delta)
 
       * Checking for Valid Inactive System Image
       * Locating Inactive System Image
       * Mounting Inactive System Image
 
=======  12/12/07 16:43:53 CST  END Mount Inactive System Image succeeded.
         (user=root)  (jobid=delta)
 
# bdf
Filesystem          kbytes    used   avail %used Mounted on
/dev/vg00/lvol3    1572864  341480 1221816   22% /
/dev/vg00/lvol1    1522232  111336 1258672    8% /stand
/dev/vg00/lvol7    6291456 2065200 4196176   33% /var
/dev/vg00/lvol6    3145728 2151096  986912   69% /usr
/dev/vg00/lvol5     524288   53192  467480   10% /tmp
/dev/vg00/lvol4    6291456 2895256 3369712   46% /opt
/dev/vg00/lvol8     106496    5856   99856    6% /home
/dev/vg01/lvol1    35561472 4647809 28981591   14% /depots
/dev/vg00/lvol9    4194304 2205342 1864667   54% /depot
DevFS                    3       3       0  100% /dev/deviceFileSystem
/dev/drd00/lvol3   1638400  340112 1288168   21% /var/opt/drd/mnts/sysimage_001
/dev/drd00/lvol9   4194304 2206071 1863983   54% /var/opt/drd/mnts/sysimage_001/depot
/dev/drd00/lvol8    106496    5848   99864    6% /var/opt/drd/mnts/sysimage_001/home
/dev/drd00/lvol4   6291456 2876872 3387952   46% /var/opt/drd/mnts/sysimage_001/opt
/dev/drd00/lvol1   1522232  107432 1262576    8% /var/opt/drd/mnts/sysimage_001/stand
/dev/drd00/lvol5    524288   53104  467568   10% /var/opt/drd/mnts/sysimage_001/tmp
/dev/drd00/lvol6   3145728 2149296  988696   68% /var/opt/drd/mnts/sysimage_001/usr
/dev/drd00/lvol7   6291456 2029096 4229088   32% /var/opt/drd/mnts/sysimage_001/var

Installing additional software

For example, to update the SecureShell bundle to the DRD volume, using the following procedure. Dynamic Root Disk only support installing from SD-UX file system depots, not from depot tar files. Thise requires to first use swcopy command to transfer any depot file to SD-UX depot file system to be able to install the product from there.

Verify the product you need to install

# swlist -s `pwd`/SecureShell_A.04.70.005_HP-UX_B.11.31_IA+PA.depot
# Initializing...
# Contacting target "delta"...
# Contacting target "delta"...
#
# Target:  delta:/var/tmp/SecureShell_A.04.70.005_HP-UX_B.11.31_IA+PA.depot
#
 
#
# Bundle(s):
#
 
  SecureShell   A.04.70.005    HP-UX Secure Shell

Translate the product depot

# swcopy -s `pwd`/SecureShell_A.04.70.005_HP-UX_B.11.31_IA+PA.depot SecureShell @ /depots/ssh
 
=======  12/12/07 17:10:41 CST  BEGIN swcopy SESSION (non-interactive)
         (jobid=delta-0053)
 
       * Session started for user "root@delta".
 
       * Beginning Selection
       * "delta:/depots/ssh":  This target does not exist and will be
         created.
       * Source:
         /var/tmp/SecureShell_A.04.70.005_HP-UX_B.11.31_IA+PA.depot
       * Targets:                delta:/depots/ssh
       * Software selections:
             SecureShell,r=A.04.70.005,a=HP-UX_B.11.31_IA/PA,v=HP
             Secure_Shell.SECSH-CMN,r=A.04.70.005,a=HP-UX_B.11.31_IA/PA,v=HP,fr=A.04.70.005,fa=HP-UX_B.11.31_IA/PA
             Secure_Shell.SECURE_SHELL,r=A.04.70.005,a=HP-UX_B.11.31_IA/PA,v=HP,fr=A.04.70.005,fa=HP-UX_B.11.31_IA
             Secure_Shell.SECURE_SHELL,r=A.04.70.005,a=HP-UX_B.11.31_IA/PA,v=HP,fr=A.04.70.005,fa=HP-UX_B.11.31_PA
       * Selection succeeded.
 
 
       * Beginning Analysis and Execution
       * Session selections have been saved in the file
         "/.sw/sessions/swcopy.last".
       * The analysis phase succeeded for "delta:/depots/ssh".
       * The execution phase succeeded for "delta:/depots/ssh".
       * Analysis and Execution succeeded.
 
 
NOTE:    More information may be found in the agent logfile using the
         command "swjob -a log delta-0053 @ delta:/depots/ssh".
 
=======  12/12/07 17:10:43 CST  END swcopy SESSION (non-interactive)
         (jobid=delta-0053)

Verify the traslated product

# swlist -l depot
# Initializing...
# Target "delta" has the following depot(s):
  /var/spool/sw
  /depots/ssh


Copy the depot file system into an "inactive" volume file system

# fbackup -0i ./depots/ssh -f - | ( cd /var/opt/drd/mnts/sysimage_001; frecover -rvf - )

Install the depot into the "inactive" volume

# /opt/drd/bin/drd runcmd swinstall -s /depots/ssh SecureShell \*
 
=======  12/14/07 16:41:32 CST  BEGIN Executing Command On Inactive System Image (user=root)  (jobid=delta)
 
       * Checking for Valid Inactive System Image
       * Analyzing Command To Be Run On Inactive System Image
       * Locating Inactive System Image
       * Accessing Inactive System Image for Command Execution
       * Setting Up Environment For Command Execution
       * Executing Command On Inactive System Image
       * Using unsafe patch list version 20061206
       * Starting swagentd for drd runcmd
       * Executing command: "/usr/sbin/swinstall -s /depots/ssh SecureShell *"
 
=======  12/14/07 16:41:42 CST  BEGIN swinstall SESSION
         (non-interactive) (jobid=delta-0056) (drd session)
 
       * Session started for user "root@delta".
 
       * Beginning Selection
       * Target connection succeeded for "delta:/".
       * Source connection succeeded for "delta:/depots/ssh".
       * Source:                 /depots/ssh
       * Targets:                delta:/
       * Software selections:
             SecureShell,r=A.04.70.005,a=HP-UX_B.11.31_IA/PA,v=HP
             Secure_Shell.SECSH-CMN,l=/opt/ssh,r=A.04.70.005,a=HP-UX_B.11.31_IA/PA,v=HP,fr=A.04.70.005,fa=HP-UX_B.11.31_IA/PA
             Secure_Shell.SECURE_SHELL,l=/opt/ssh,r=A.04.70.005,a=HP-UX_B.11.31_IA/PA,v=HP,fr=A.04.70.005,fa=HP-UX_B.11.31_PA
       * Selection succeeded.
 
 
       * Beginning Analysis and Execution
       * Session selections have been saved in the file
         "/.sw/sessions/swinstall.last".
       * "delta:/":  There will be no attempt to mount filesystems that
         appear in the filesystem table.
       * The execution phase succeeded for "delta:/".
       * Analysis and Execution succeeded.
 
 
NOTE:    More information may be found in the agent logfile using the
         command "drd runcmd swjob -a log delta-0056 @ delta:/".
 
=======  12/14/07 16:41:48 CST  END swinstall SESSION (non-interactive)
         (jobid=delta-0056) (drd session)
 
       * Command "/usr/sbin/swinstall -s /depots/ssh SecureShell *" completed with the return code "0".
       * Stopping swagentd for drd runcmd
       * Cleaning Up After Command Execution On Inactive System Image
 
=======  12/14/07 16:41:49 CST  END Executing Command On Inactive System Image succeeded. (user=root)  (jobid=delta)

Unmount the DRD "inactive" volume

# /opt/drd/bin/drd umount
 
=======  12/12/07 16:44:54 CST  BEGIN Unmount Inactive System Image (user=root)  (jobid=delta)
 
       * Checking for Valid Inactive System Image
       * Locating Inactive System Image
       * Unmounting Inactive System Image
 
=======  12/12/07 16:45:14 CST  END Unmount Inactive System Image succeeded. (user=root)  (jobid=delta)

Reference

Authors

This page was last modified on 30 April 2011, at 02:38. This page has been accessed 2,379 times.