Dynamic Root Disk A.3.13* Administrator's Guide HP-UX 11i v2, HP-UX 11i v3 HP Part Number: 766142-001 Published: March 2014 Edition: 1.
© Copyright 2014 Hewlett-Packard Development Company, L.P. Confidential computer software. Valid license from HP required for possession, use or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under vendor's standard commercial license. The information contained herein is subject to change without notice.
Contents HP secure development lifecycle......................................................................5 1 About Dynamic Root Disk............................................................................6 Conceptual overview.................................................................................................................6 Terminology.............................................................................................................................6 Commands overview........
8 Troubleshooting DRD................................................................................39 9 Support and other resources......................................................................40 Information to collect before contacting HP.................................................................................40 How to contact HP..................................................................................................................40 New and changed information in this edition..
HP secure development lifecycle Starting with HP-UX 11i v3 March 2013 update release, HP secure development lifecycle provides the ability to authenticate HP-UX software. Software delivered through this release has been digitally signed using HP's private key. You can now verify the authenticity of the software before installing the products, delivered through this release. To verify the software signatures in signed depot, the following products must be installed on your system: • B.11.31.
1 About Dynamic Root Disk Conceptual overview This document describes the Dynamic Root Disk (DRD) toolset, which you can use to perform software maintenance and recovery on an HP-UX operating system with minimum system downtime. DRD enables you to easily and safely clone a system image from a root disk to another disk on the same system and modify the image without shutting down the system. DRD significantly reduces system downtime and allows you to do software maintenance during normal business hours.
image. The drd activate command always sets the primary boot path to the inactive (not booted) system image. • clone Clones a booted system to an inactive system image. The drd clone mode copies the LVM volume group or VxVM disk group, containing the volume on which the root file system (“/”) is mounted, to the target disk specified in the command.
Unmounts all file systems in the inactive system image previously mounted by a drd mount command. • unrehost Removes the system information file, EFI/HPUX/SYSINFO.TXT, from a disk that was rehosted, optionally preserving a copy in a file system on the booted system. For details of DRD commands syntax, including all options and extended options, see DRD commands (page 43).
2 Cloning the active system image This chapter describes how to use the drd clone command to clone the active system image. It also describes where the cloned image is saved. NOTE: You must be logged in as root to use any DRD command. The active system image The drd clone command creates a bootable disk that is a copy of the volume group containing the root file system (/).
Example 1 The ioscan -fnkC disk command output on an HP-UX 11i v2 PA-RISC system # /usr/sbin/ioscan -fnkC disk Class I H/W Path Driver S/W State H/W Type Description ======================================================================= disk 0 10/0/14/0.0.0 sdisk CLAIMED DEVICE TEAC CD-532E-B /dev/dsk/c0t0d0 /dev/rdsk/c0t0d0 disk 1 10/0/15/1.5.0 sdisk CLAIMED DEVICE HP 18.2GMAN3184MC /dev/dsk/c1t2d0 /dev/rdsk/c1t2d0 disk 2 10/0/15/1.6.0 sdisk CLAIMED DEVICE HP 18.
Example 3 The ioscan -fNnkC disk command output on an HP-UX 11i v3 Integrity system # /usr/sbin/ioscan -fNnkC disk Class I H/W Path Driver S/W State H/W Type Description =================================================================== disk 4 64000/0xfa00/0x0 esdisk CLAIMED DEVICE HP 36.4GMAN3367MC /dev/disk/disk4 /dev/rdisk/disk4 /dev/disk/disk4_p1 /dev/rdisk/disk4_p1 /dev/disk/disk4_p2 /dev/rdisk/disk4_p2 /dev/disk/disk4_p3 /dev/rdisk/disk4_p3 disk 5 64000/0xfa00/0x1 esdisk CLAIMED DEVICE HP 36.
In Example 2-1, the disk with the active system image is /dev/dsk/c2t3d0. You need to choose a free disk to be the target of the drd clone command. Your system may have many more disks than Example 2-1 shows. The target disk must: • Be a block device special file. • Be writeable by the system. • Not currently be in use by other applications. • Be large enough to hold a copy of each logical volume in the root group.
NOTE: A selected target disk will not be overwritten if it is part of the root volume. However, the drd clone command will overwrite swap or raw data disks because it does not detect this type of usage. For example, any raw disks in use by databases would be overwritten if given as the target clone disk.
The -x option lets you choose whether to overwrite data on the target disk. The -x overwrite=true option tells the command to overwrite any data on the disk. The -x overwrite=false option tells the command not to write the cloned image if the disk appears to contain LVM, VxVM, or boot records. The default value is false. Cloning creates an inactive system image on the target disk at /dev/dsk/c1t2d0. Figure 2-2 shows the active system image being cloned to the target disk.
system performance when using Ignite to create recovery images, which many system administrators find acceptable. Figure 3 Disk Configurations After Cloning After running drd clone, you have identical system images on the system disk and the target disk. The image on the system disk is the active system image. The image on the target disk is the inactive system image.
Example 9 The drd status command output for SAN disk ======= 06/24/08 12:09:46 MDT * * * * * * * * * BEGIN Displaying DRD Clone Image Information (user=root) Clone Disk: Clone EFI Partition: Clone Creation Date: Clone Mirror Disk: Mirror EFI Partition: Original Disk: Original EFI Partition: Booted Disk: Activated Disk: ======= 06/24/08 12:10:01 MDT (jobid=drdtest14) (jobid=drdtest14) /dev/disk/disk14 AUTO file present, Boot loader present, SYSINFO.
3 Updating and maintaining software on the clone After cloning the active system image, you can use drd runcmd to run a limited set of commands and to apply patches to the inactive system image. This chapter describes this process. For details of the drd runcmd command, including available options and extended options, see The drd runcmd command. NOTE: You must be logged in as root to run any DRD command.
• swjob • kctune • update-ux • view • kcmodule • kconfig • mk_kernel • swm job See the Software Distributor Administrator's Guide, located at http://www.hp.com/go/sd-docs, as well as swinstall(1M), swremove(1M), swlist(1M), swmodify(1M), swverify(1M), swjob(1M), kctune(1M), update-ux(1M), view(1M), kcmodule(1M), kconfig(1M), mk_kernel(1M), and swm(1M) for additional information about these commands.
To determine if you need to update the drd_unsafe_patch_list files, see the Update the drd_unsafe_patch_list File procedure in the DRD Downloads and Patches page at https:// h20392.www2.hp.com/portal/swdepot/displayInstallInfo.do? productNumber=DynRootDisk#download. It is helpful during maintenance planning for system administrators to be able to determine which, if any, patches are not DRD-safe, and to make plans regarding these patches.
drd runcmd swinstall –s depot_server:/var/opt/patches \* • Files referenced in the command line must both: ◦ Reside in the inactive system image ◦ Be referenced in the DRD-safe command by the path relative to the mount point of the inactive system image This applies to files referenced as arguments for the -C, -f, -S, -X, and -x logfile options for an sw command run by drd runcmd and for the update-ux command -f option. • To use update-ux with a media source or local depot, SWM version A.3.5.
4 Accessing the inactive system image This chapter describes how to mount and unmount the inactive system image. IMPORTANT: If you choose to mount the inactive DRD system image, exercise caution to ensure that any actions taken do not impact the running system. You must: • Not stop/kill or restart any processes or daemons. • Only make kernel changes by executing: drd runcmd kctune.
Example 10 The drd mount command output # /opt/drd/bin/drd mount ======= 12/08/06 22:19:31 MST (jobid=dlkma1) BEGIN Mount Inactive System Image (user=root) * Reading Current System Information * Locating Inactive System Image * Mounting Inactive System Image ======= 12/08/06 22:19:52 MST END Mount Inactive System Image succeeded. (user=root) (jobid=dlkma1) The drd mount command automatically chooses the mount point for the inactive system image.
Example 12 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 13 Creating a patch install file Task: Create a file containing a list of patches to be applied to the inactive system image.
Example 14 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.
Example 15 The drd umount command output ======= 12/08/06 22:09:22 MST (jobid=dlkma1) BEGIN Unmount Inactive System Image (user=root) * Reading Current System Information * Locating Inactive System Image * Unmounting Inactive System Image ======= 12/08/06 22:09:48 MST END Unmount Inactive System Image succeeded. (user=root) (jobid=dlkma1) The drd umount command: • Unmounts the file systems in the inactive system image. • Inactivates the inactive system image's volume group.
5 Synchronizing the inactive clone image with the booted system Overview The drd sync command is introduced in release B.11.xx.A.3.5 of Dynamic Root Disk (DRD) to propagate root volume group file system changes from the booted original system to the inactive clone image. Example 16 drd sync scenario Here is a sample scenario that can be improved by using the drd sync command: 1. A system administrator creates a DRD clone on a Thursday. 2.
For a sample shutdown script, see “drd sync system shutdown script” (page 29). Additional information is provided below in the comparison between the booted system and the clone. This information is provided by the preview option on the drd sync command, the preparatory actions that can be used to precisely control what files are synchronized, and the considerations advised when multiple iterations of the drd sync command are run.
filtered_out_by_non_synced_location_filter_sync_phase file, which is refreshed each time drd sync is run, even if the command is run with the -p preview option. 2. Files that have changed on the clone A file residing on the clone might have been changed by a drd runcmd operation, and it may have been updated on the booted system as well. This can occur even if the file is not listed in the Software Distributor Installed Products Database (that is, in the output of swlist –l file).
files_to_be_copied_by_drd_sync, even if the drd sync command is run with the -p preview option. Copying the files to the inactive clone image The drd sync command uses the /usr/bin/pax command to propagate changes from the booted original system to the inactive clone. IMPORTANT: The original system must be booted when drd sync is run, and changes are always propagated from the original system to the clone.
stop) # Synchronize the source disk with the cloned system drd mount >/dev/null 2>&1 # Ignore errors, may already be mounted. drd sync sync_ret=$? set_return $sync_ret "ERROR: Return code from drd sync is $sync_ret" rm -f $0 ${DRD_MOUNT_PT}$0 > /dev/null 2>&1 [[ -x $0 ]] && \ set_return 1 "ERROR: The $0 script (on image being shut down) could not be removed." [[ -x ${DRD_MOUNT_PT}$0 ]] && \ set_return 1 "ERROR: The ${DRD_MOUNT_PT}$0 script ($0 on clone) could not be removed.
6 Activating the inactive system image This chapter describes how to set the inactive system image so it will become the active system image the next time the system boots. For details of the drd activate command, including available options and extended options, see The drd activate command. NOTE: You must be logged in as root to run any DRD command. To make the inactive system image the active system image, run the following command: # /opt/drd/bin/drd activate -x reboot=true This command: 1.
# /opt/drd/bin/drd activate If you are not certain which system image is set to become the active system image when the system boots, execute the following command: # /usr/sbin/setboot -v For additional information, see the setboot(1M) manpage. In the following example on an HP-UX 11i v2 system, a system administrator uses /stand/ bootconf, setboot, and ioscan to determine that, currently, the primary boot disk (the one that will be booted on the next reboot) is the same as the currently booted disk.
booted at the next restart of the system. Executing the drd activate command activates the inactive system image. Executing the drd deactivate command activates the booted image. For more details about the use of drd activate and drd deactivate, see the Using Dynamic Root Disk Activate and Deactivate Commands white paper, at http://www.hp.com/go/drd-docs.
Example 18 Using drd deactivate after activating — legacy DSF In this example, /dev/dsk/c2t3d0 contains your root volume group, and you use drd clone to create an inactive system disk at /dev/dsk/c1t2d0. Next, you execute drd activate.
Example 19 Using drd deactivate after activating — agile DSF In this example, drd activate is executed on a system without performing a reboot, followed by running drd deactivate, and the end result is no change.
7 Rehosting and unrehosting systems A new feature of Dynamic Root Disk (DRD) version B.1131.A.3.2 is rehosting. Rehosting enables you to boot a DRD clone on a system other than the one where it was created. This new functionality is supported on LVM-managed root volumes running on Itanium® systems with HP-UX 11i v3. This capability enables a number of new uses for DRD clones.
Example 20 Provisioning a new system In this example, you have a blade named SALES01 that is running all the correct releases of the correct OE software, and you have another blade (not yet running anything) that you want to set up as SALES02 (a hostname not yet in use), with the identical OE software as SALES01. You would perform the following steps: 1. Clone the SALES01 system to a SAN LUN. 2.
If the rehosted disk is the only disk to be moved to the new system, the disk can be booted by interrupting the boot sequence and booting with the command: hpux –lq /stand/vmunix. The -lq option will disable quorum checking, allowing you to boot from the single copy. Unrehosting overview For details of the drd unrehost command, including available options and extended options, see The drd unrehost command. The drd unrehost command removes EFI/HPUX/SYSINFO.
8 Troubleshooting DRD This chapter provides information about unexpected DRD situations and outcomes. For the most recent troubleshooting information, check the DRD Frequently Asked Questions document at http://www.hp.com/go/drd-docs. 8.8.1.1 Q: Why can't I see the inactive system image file systems when I run the bdf command? A: You have to mount the inactive system image before you can see the file systems using bdf. Use the drd mount command to mount the inactive system image. 8.8.1.
9 Support and other resources This chapter contains support information and the available resources for the HP Dynamic Root Disk software product.
New and changed information in this edition The following chapter has been updated for this edition: • Chapter 8 Troubleshooting DRD Locating this guide This guide is available from the following sources: • The HP-UX Dynamic Root Disk - Manuals page at http://www.hp.
10 Documentation feedback HP is committed to providing documentation that meets your needs. To help us improve the documentation, send any errors, suggestions, or comments to Documentation Feedback (docsfeedback@hp.com). Include the document title and part number, version number, or the URL when submitting your feedback.
A DRD commands term para This appendix describes the DRD commands you can use to clone an image and work with the cloned image. The commands are: • drd-activate(1M) • drd-clone(1M) • drd-deactivate(1M) • drd-mount(1M) • drd-rehost(1M) • drd-runcmd(1M) • drd-status(1M) • drd-sync(1M) • drd-umount(1M) • drd-unrehost(1M) Chapters 2 through 6 describe how to use these commands to perform DRD operations. You must be logged in as root to use any DRD command.
-v -x extended_option=value -x -? -X option_file Increases the verbosity level by one each time it is specified. For example, -v will increase the effective verbosity from the default value of 4 to 5. If both -x verbosity=1 and -vv are included on the command line, the effective verbosity is 3. The maximum verbosity level is 5. (See also the -x verbosity option.) Sets the extended option to a value. Displays the list of possible -x (extended) options. Gets the extended options from a file.
-x preview={true|false} -x reboot={true|false} -x verbosity=3 (Default.) If true, run this command in preview mode only. That is, complete the analysis phase and exit; no changes are committed to disk. This option has the same effect as specifying -p on the command line. The default is false. This option is available on every DRD command except drd runcmd. If true, specifies the system is rebooted at the successful completion of a drd activate operation. The default is false.
When run with the -x overwrite extended option set to true, the drd clone command overwrites any existing data on the target disk. If the target disk contains a mounted inactive system image, run the drd umount command before attempting another clone operation with -x overwrite=true. If other volume groups (not related to DRD) reside on the target disk and you want to overwrite them, use the vgexport(1M) command first to remove any knowledge of them from the booted system.
Extended options The following extended options are available: -x This is the alternate boot disk. The alternate boot disk must alternate_bootdisk=block_device_special_file be specified as a block device special file. -x (Default is true) Controls whether to copy the copy_autofile={true|false}block_device_special_file EFI/HPUX/AUTO file from the active to the inactive system image. -x enforce_dsa={true|false} Usage: Advanced/Dangerous.
-p -q -v -x extended_option=value -x -? -X option_file Sets preview mode. When run with the -p option, a DRD command performs analysis without running the command and reports any errors. Decreases the verbosity level by one each time it is specified. For example, -qq will reduce the verbosity from the default value of 4 to 2. If both -x verbosity=5 and -qqq are included on the command line, the effective verbosity is 2. The minimum verbosity level is 0. (See also the -x verbosity option.
-x preview={true|false} -x reboot={true|false} -x verbosity=3 (Default.) overwritten. The -x overwrite=true allows a disk to be overwritten, even if it contains boot, LVM, or VxVM records. Note that DRD does not overwrite a disk associated with an active LVM volume group or VxVM disk group, regardless of the setting of the overwrite option. If a previously created clone is mounted, use the drd umount command to unmount it before attempting to create a new clone on the disk.
-p -q -v -x extended_option=value -x -? -X option_file Sets preview mode. When run with the -p option, a DRD command performs analysis without running the command and reports any errors. Decreases the verbosity level by one each time it is specified. For example, -qq will reduce the verbosity from the default value of 4 to 2. If both -x verbosity=5 and -qqq are included on the command line, the effective verbosity is 2. The minimum verbosity level is 0. (See also the -x verbosity option.
-x preview={true|false} -x reboot={true|false} -x verbosity=3 (Default.) overwritten. The -x overwrite=true allows a disk to be overwritten, even if it contains boot, LVM, or VxVM records. Note that DRD does not overwrite a disk associated with an active LVM volume group or VxVM disk group, regardless of the setting of the overwrite option. If a previously created clone is mounted, use the drd umount command to unmount it before attempting to create a new clone on the disk.
drd rehost [-?] [-p] -f system_information_file [-q] -t device_special_file [-v] [-x extended option=value] [-x -?] [-X option_file] Options -? -p -f system_information_file -q -t device_special_file -v -x extended_option=value -x -? -X option_file Displays the usage message for a DRD command. This option cannot be used with other options. Sets preview mode. When run with the -p option, a DRD command performs analysis without running the command and reports any errors.
-x log_verbosity=4 (Default.) Specifies the level of log verboseness. Replace 4 with the following values: 0 Only ERRORS and the starting/ending BANNER messages. 1 Adds WARNING messages. 2 Adds NOTE messages. 3 Adds INFO messages (informational messages preceded by the * character.) 4 (Default) Adds verbose INFO messages. 5 Adds additional detailed INFO messages. -x Specifies the target's block device special file of the mirror mirror_disk=block_device_special_file disk.
The drd runcmd command returns the following error codes: 0 Success 1 Error 2 Warning The drd runcmd operation involves two commands: drd runcmd and the HP-UX command that is its argument, but it returns only a single error code. The code reflects the worst result of the two commands. If both commands are successful, the error code is 0. If either command has an error or warning result, the error code is 1 or 2. To determine which command issued the error or warning, examine the messages.
1 Adds WARNING messages. 2 Adds NOTE messages. 3 Adds INFO messages (informational messages preceded by the * character.) 4 (Default) Adds verbose INFO messages. 5 Adds additional detailed INFO messages. -x Specifies the target's block device special file of the mirror mirror_disk=block_device_special_file disk. The block device special file should refer to an entire disk, not to a partition. This option requires that LVM mirroring is installed.
• Original Disk – specifies which disk the original image is on. • Original Disk State – reports whether the boot loader, AUTO file, and SYSINFO.TXT file (Itanium® only) are present on the original disk. • Booted Disk – specifies which disk is currently booted. • Activated Disk – upon reboot, the system will boot off this disk. NOTE: Disk State varies depending on the system's architecture. The drd status command will list either LIF Area or EFI Partition instead of Disk State.
0 Only ERRORS and the starting/ending BANNER messages. 1 Adds WARNING messages. 2 Adds NOTE messages. 3 Adds INFO messages (informational messages preceded by the * character.) 4 (Default) Adds verbose INFO messages. 5 Adds additional detailed INFO messages. -x Specifies the target's block device special file of the mirror mirror_disk=block_device_special_file disk. The block device special file should refer to an entire disk, not to a partition. This option requires that LVM mirroring is installed.
• ◦ /var/adm/sw/* ◦ /var/opt/drd/tmp/* ◦ /var/tmp/* ◦ /etc/lvmconf* ◦ /etc/vx/* ◦ /etc/vxvmconf/* ◦ /dev//* (Where clone_group is the name of the LVM group used to import the clone (usually drd00.) This non-synchronized location does not apply to VxVM-managed roots.
-v -x extended_option=value -x -? -X option_file value of 4 to 2. If both -x verbosity=5 and -qqq are included on the command line, the effective verbosity is 2. The minimum verbosity level is 0. (See also the -x verbosity option.) Increases the verbosity level by one each time it is specified. For example, -v will increase the effective verbosity from the default value of 4 to 5. If both -x verbosity=1 and -vv are included on the command line, the effective verbosity is 3.
image invisible to LVM management commands. For a system with a VxVM root, the inactivate image must remain imported to ensure that it is bootable. The drd umount command syntax is: drd umount [-?] [-p] [-q] [-v] [-x extended option=value] [-x -?] [-X option_file] Options -? -p -q -v -x extended_option=value -x -? -X option_file Displays the usage message for a DRD command. This option cannot be used with other options. Sets preview mode.
-x Specifies the target's block device special file of the mirror mirror_disk=block_device_special_file disk. The block device special file should refer to an entire disk, not to a partition. This option requires that LVM mirroring is installed. The block device special file specified is used to mirror each logical volume in the target of the clone operation. -x overwrite={true|false} Specifies whether drd clone should overwrite existing information on the target disk.
-p -f system_information_file -q -t device_special_file -v -x extended_option=value -x -? -X option_file Sets preview mode. When run with the -p option, a DRD command performs analysis without running the command and reports any errors. Specifies the file containing the system information (hostname, IP address, network information, etc.) to be copied to EFI/HPUX/SYSINFO.TXT on the disk specified by the -t option. See sysinfo(4) for the syntax of this file.
-x Specifies the target's block device special file of the mirror mirror_disk=block_device_special_file disk. The block device special file should refer to an entire disk, not to a partition. This option requires that LVM mirroring is installed. The block device special file specified is used to mirror each logical volume in the target of the clone operation. -x overwrite={true|false} Specifies whether drd clone should overwrite existing information on the target disk.
Glossary Booted system environment The system environment that is currently running — also known as the current, active, or running system environment. CLI Command line user interface Clone * (noun) - clone - a Cloned System Image . * (verb) - clone - to create a Cloned System Image. Cloned system image A copy of the booted volume group from the system image of a booted system environment — produced by the drd clone command.
System image The file systems and their contents that comprise an installation of HP-UX — residing on disk and therefore persisting across reboots. System recovery See Hot recovery Unrehost DRD command that removes the system information file, EFI/HPUX/SYSINFO.TXT, from a disk that was rehosted, optionally preserving a copy in a file system on the booted system.
Index A active system image, 9, 15 B bdf command output, 22 block device special file, 46 block device special files, 10, 11 C choosing target disk, 11 clone creation, 13 maintaining software, 17 cloned image; modifying, 6 cloning operation log, 46 command return values, 15 commands bdf, 22, 25 DRD, 43 drd activate, 6, 31, 43 drd clone, 7, 9, 13, 45 drd deactivate, 7, 47 drd mount, 7, 21, 49, 51 drd rehost, 7, 51 drd runcmd, 7, 53 drd status, 7, 55 drd sync, 7, 57 drd umount, 7, 24, 59 drd unrehost, 8, 61
extended options drd activate, 44 drd clone, 46 drd deactivate, 48 drd mount, 50 drd rehost, 52 drd runcmd, 54 drd status, 56 drd sync, 59 drd umount, 60 drd unrehost, 62 Extensible Firmware Interface (EFI) partitions, 45 F file systems, 22 firmware patches, 19 G guide locating, 41 I idisk partition, 10, 11 inactive system file system unmounting, 59 inactive system image, 9, 15 accessing, 21 activating, 31, 43 administrative tasks, 22 modifying, 21 mount point, 22 mounting, 53 synchronize, 26 undoing act