Dynamic Root Disk A.3.10.* Administrator's Guide HP-UX 11i v2, HP-UX 11i v3 HP Part Number: 5900-2100 Published: January 2012 Edition: 1.
© Copyright 2012 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.
Table of Contents 1 About Dynamic Root Disk............................................................................7 1.1 Conceptual overview............................................................................................................7 1.2 Terminology.......................................................................................................................7 1.3 Commands overview.....................................................................................................
7 Rehosting and unrehosting systems..............................................................39 7.1 Rehosting overview............................................................................................................39 7.2 Rehosting examples...........................................................................................................39 7.3 Rehosting a mirrored image................................................................................................40 7.
List of Figures 2-1 2-2 2-3 6-1 Preparing to Clone the Active System Image........................................................................13 Cloning the Active System Image.......................................................................................14 Disk Configurations After Cloning......................................................................................15 Disk Configurations After Activating the Inactive System Image...............................................
List of Examples 2-1 2-2 2-3 2-4 2-5 2-6 2-7 2-8 2-9 4-1 4-2 4-3 4-4 4-5 4-6 5-1 6-1 6-2 6-3 7-1 7-2 A-1 6 The ioscan -fnkC disk command output on an HP-UX 11i v2 PA-RISC system...................10 The ioscan -fnkC disk command output on an HP-UX 11i v2 Integrity system....................10 The ioscan -fNnkC disk command output on an HP-UX 11i v3 Integrity system..................11 The ioscan -m dsf command output on an HP-UX 11i v3 Integrity system...........................
1 About Dynamic Root Disk 1.1 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.
• deactivate If the drd activate command (which invokes setboot(1M)) has previously been utilized and set the clone as the primary boot path, but the system has not yet been rebooted, the drd deactivate command can be used to “undo” the drd activate command. That is, the drd deactivate command will set the original system image to be the primary boot path. The drd deactivate command always sets the primary boot path to the active (currently booted) system image.
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. 2.1 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 2-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 2-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.
2.3 Choosing a target disk CAUTION: It is the system administrator's responsibility to identify a target disk that is not currently in use! Cloning a disk removes all current data on the target disk. 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.
• • If the disk is currently in use by the LVM Manager, it is rejected by the drd clone operation.
Use the following command to clone the system image, substituting your target disk identifier for the one shown in the command: # /opt/drd/bin/drd clone -v -x overwrite=true -t /dev/dsk/c1t2d0 On HP-UX 11i v3 systems, you can also use the agile device file to the target disk, substituting your target disk identifier for the one shown in the following command: # /opt/drd/bin/drd clone -v -x overwrite=true -t /dev/disk/disk10 NOTE: For descriptions of the drd clone command, see The drd clone command.
Example 2-7 The drd clone command output ======= 12/01/06 11:07:28 MST (jobid=drdtest2) * * * * * * * * * * ======= BEGIN Clone System Image (user=root) 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 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/c1t2
Example 2-8 The drd clone command output for SAN disk ======= 06/24/08 11:55:58 MDT * * * * * * * * * * ======= BEGIN Clone System Image (user=root) (jobid=drdtest14) Reading Current System Information Selecting System Image To Clone Selecting Target Disk The disk "/dev/disk/disk14" contains data which will be overwritten.
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. 3.
• • • • • • • 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.
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. See the DRD-Safe Concepts for HP-UX 11i v2 and Later white paper, located at http://www.hp.com/go/drd-docs, for information about identifying such patches and alternatives on how to manage them without using the drd runcmd operation. 3.2.
• • 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.1 or later must be present on the clone.
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 4-1 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.
TIP: it. HP recommends that a clone be deployed shortly after creating and (optionally) modifying 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.
Example 4-5 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.
• • • Unmounts the file systems in the inactive system image. Inactivates the inactive system image's volume group. For an LVM-based system, exports the volume group. If you run the bdf command after the drd umount command, you no longer see the inactive system image in the output. 4.
5 Synchronizing the inactive clone image with the booted system 5.1 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 5-1 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 31). 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. 5.
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. 5.3.3 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.
5.5 drd sync system shutdown script To run the following script during system shutdown, create the script in the /sbin/init.d directory and create a symlink to it from /sbin/rc[n].d/K[mmm]. The system administrator can choose values for n and mmm to ensure that file updates made during shutdown occur before the script is run. The script must be run before file systems are unmounted, which is generally done by /sbin/ rc0.d/K900localmount. See rc(1) for further information on rc script numbering.
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.
NOTE: The following example does not correspond to any of the figures in this guide. Example 6-1 Booting the primary boot disk with an alternate boot disk (HP-UX 11i v2) # /usr/bin/more /stand/bootconf l /dev/dsk/c2t0d0s2 # # /usr/sbin/setboot Primary bootpath : 0/1/1/0.0.0 HA Alternate bootpath : 0/1/1/1.2.0 Alternate bootpath : 0/1/1/1.2.
TIP: If you have already booted the (previously) inactive image, you can use drd activate to return to the (previously) active image. Example 6-2 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 6-3 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 7-1 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. 2. 3. 4. 5. 6. Clone the SALES01 system to a SAN LUN.
3. 4. The rehosted disk should be chosen from the EFI menus for boot. After the system is booted, the DRD registry can be removed by issuing the command: # rm /var/opt/drd/registry/registry.xml 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. 7.
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 8.8.1.2 8.8.1.3 8.8.1.4 8.8.1.5 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.
9 Support and other resources This chapter contains support information and the available resources for the HP Dynamic Root Disk software product. 9.
NOTE: HP cannot provide product support through this web page. To obtain product support, see “Contacting HP” (page 45). For a forum with other DRD users, visit the HP_UX_Docs twitter page: http://twitter.com/HP_UX_Docs 9.
find(1) HP-UX manpage. In this example, “find” is the manpage name and “1” is the manpage section. 9.
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. A.
-v 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.) -x extended_option=value Sets the extended option to a value. -x -? Displays the list of possible -x (extended) options. -X option_file Gets the extended options from a file.
command line. The default is false. This option is available on every DRD command except drd runcmd. -x reboot={true|false} If true, specifies the system is rebooted at the successful completion of a drd activate operation. The default is false. -x verbosity=3 (Default.) Specifies the level of stdout/stderr verboseness. Replace 3 with the following values: 0 1 2 3 4 5 Only ERRORS and the starting/ending BANNER messages. Adds WARNING messages. Adds NOTE messages.
is installed. The block device special file specified will be used to mirror each logical volume in the target of the clone operation. A log of the cloning operation is available at /var/opt/drd/drd.log. This log is written to the booted system. Because it is located in the /var file system, it is copied during the clone operation to the /var file system on the clone.
-x enforce_dsa={true|false} Usage: Advanced/Dangerous. Controls whether or not a failure in the disk space analysis (DSA) part of the analysis phase is fatal to the session. true: A failure in DSA will result in a failure of Analysis phase for the entire session. The command will not proceed. false: A failure in DSA will be logged, but the session will be allowed to proceed. There is a risk of filling a mounted disk or volume to its maximum capacity at some point during the session.
2 3 4 5 Adds NOTE messages. (Default) Adds INFO messages (informational messages preceded by the * character.) Adds verbose INFO messages. Adds additional detailed INFO messages. A.1.3 The drd deactivate command The drd-deactivate(1M) command invokes the setboot(1M) command to set the primary boot disk to the active (booted) system image the next time the system is booted. NOTE: drd deactivate is a mechanism for “undoing” a drd activate command.
-x logfile=/var/opt/drd/drd.log This is the path to the log file for this command. Each time DRD is run, this file will grow larger. This can be changed, for example, to a month-specific location for easier archiving, off-host backup, and rotation. -x log_verbosity=4 (Default.) Specifies the level of log verboseness. Replace 4 with the following values: 0 1 2 3 4 5 Only ERRORS and the starting/ending BANNER messages. Adds WARNING messages. Adds NOTE messages.
Example A-1 File system mount points /var/opt/drd/mnts/sysimage_001 /var/opt/drd/mnts/sysimage_001/var /var/opt/drd/mnts/sysimage_001/usr /var/opt/drd/mnts/sysimage_001/tmp /var/opt/drd/mnts/sysimage_001/stand /var/opt/drd/mnts/sysimage_001/opt /var/opt/drd/mnts/sysimage_001/home If the inactive system image was created by the drd clone command, the mount point for the root file system, chosen automatically by the mount command, is /var/opt/drd/mnts/ sysimage_001.
-x HA_alternate_bootdisk=block_device_special_file This is the High Availability alternate boot disk. The High Availability alternate boot disk must be specified as a block device special file. High Availability alternate boot disk is supported only on Itanium-based architecture and for PA-RISC systems that support hardware partitions. -x ignore_unmounted_fs={true|false} (Default is false) Controls whether a clone fails when an unmounted file system in the root volume group is detected.
• Patches to the auto_parms utility are needed to process the SYSINFO.TXT file during the boot of the disk. Please refer to the Download DRD and Patches webpage at https:// h20392.www2.hp.com/portal/swdepot/ displayInstallInfo.do?productNumber=DynRootDisk#download for information about the appropriate patches to install. • A system administrator can execute the drd rehost command after cloning a system image to setup the clone to run on another system.
-x extended_option=value Sets the extended option to a value. -x -? Displays the list of possible -x (extended) options. -X option_file Gets the extended options from a file. Extended options The following extended options are available: -x alternate_bootdisk=block_device_special_file This is the alternate boot disk. The alternate boot disk must be specified as a block device special file. -x HA_alternate_bootdisk=block_device_special_file This is the High Availability alternate boot disk.
-x verbosity=3 (Default.) Specifies the level of stdout/stderr verboseness. Replace 3 with the following values: 0 1 2 3 4 5 Only ERRORS and the starting/ending BANNER messages. Adds WARNING messages. Adds NOTE messages. (Default) Adds INFO messages (informational messages preceded by the * character.) Adds verbose INFO messages. Adds additional detailed INFO messages. A.1.
Extended options The following extended options are available: -x alternate_bootdisk=block_device_special_file This is the alternate boot disk. The alternate boot disk must be specified as a block device special file. -x HA_alternate_bootdisk=block_device_special_file This is the High Availability alternate boot disk. The High Availability alternate boot disk must be specified as a block device special file.
A.1.7 The drd status command The drd-status(1M) command displays system-specific information about the clone (the inactive system image) and the original disk (the active system image). The drd-status command provides the following convenient information: • Clone Disk – specifies the target disk used to create the clone of the original image. • Clone Disk State – reports whether the boot loader, AUTO file, and SYSINFO.TXT file (Itanium® only) are present on the clone disk.
-x alternate_bootdisk=block_device_special_file This is the alternate boot disk. The alternate boot disk must be specified as a block device special file. -x HA_alternate_bootdisk=block_device_special_file This is the High Availability alternate boot disk. The High Availability alternate boot disk must be specified as a block device special file. High Availability alternate boot disk is supported only on Itanium-based architecture and for PA-RISC systems that support hardware partitions.
A.1.8 The drd sync command The drd-sync(1M) command propagates file system changes—whose modification time is newer than the clone creation time—from the booted original system to the inactive clone image. NOTE: The initial implementation of drd sync only supports refresh of the inactive clone from the booted original system.
Options -? Displays the usage message for a DRD command. This option cannot be used with other options. -p Sets preview mode. When run with the -p option, a DRD command performs analysis without running the command and reports any errors. -q 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.
The drd umount command fails: • If the inactive system image was created by a drd clone command and no file system is mounted at /var/opt/drd/mnts/sysimage_001. • If the inactive system image was the original source system when a drd clone command was run and no file system is mounted at /var/opt/drd/mnts/sysimage_000. If a cloned file system is mounted, drd umount unmounts the file systems, unmounting the root file system (/) last.
-x logfile=/var/opt/drd/drd.log This is the path to the log file for this command. Each time DRD is run, this file will grow larger. This can be changed, for example, to a month-specific location for easier archiving, off-host backup, and rotation. -x log_verbosity=4 (Default.) Specifies the level of log verboseness. Replace 4 with the following values: 0 1 2 3 4 5 Only ERRORS and the starting/ending BANNER messages. Adds WARNING messages. Adds NOTE messages.
drd unrehost[-?] [-p] -f system_information_file [-q] -t device_special_file [-v] [-x extended option=value] [-x -?] [-X option_file] Options -? Displays the usage message for a DRD command. This option cannot be used with other options. -p Sets preview mode. When run with the -p option, a DRD command performs analysis without running the command and reports any errors. -f system_information_file Specifies the file containing the system information (hostname, IP address, network information, etc.
-x logfile=/var/opt/drd/drd.log This is the path to the log file for this command. Each time DRD is run, this file will grow larger. This can be changed, for example, to a month-specific location for easier archiving, off-host backup, and rotation. -x log_verbosity=4 (Default.) Specifies the level of log verboseness. Replace 4 with the following values: 0 1 2 3 4 5 Only ERRORS and the starting/ending BANNER messages. Adds WARNING messages. Adds NOTE messages.
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, 52 block device special files, 10, 11 C choosing target disk, 12 clone creation, 13 maintaining software, 17 cloned image; modifying, 7 cloning operation log, 52 command return values, 15 commands bdf, 22, 25 DRD, 49 drd activate, 7, 33, 49 drd clone, 7, 9, 13, 51 drd deactivate, 8, 54 drd mount, 8, 21, 55, 57 drd rehost, 8, 57 drd runcmd, 8, 60 drd status, 8, 62 drd sync, 8, 64 drd umount, 8, 24, 65 drd unrehost, 8, 67
E exclude_list, 65 extended options drd activate, 50 drd clone, 52 drd deactivate, 54 drd mount, 56 drd rehost, 59 drd runcmd, 60 drd status, 62 drd sync, 65 drd umount, 66 drd unrehost, 68 Extensible Firmware Interface (EFI) partitions, 51 F file systems, 22 firmware patches, 19 G guide locating, 46 I idisk partition, 10, 11 inactive system file system unmounting, 66 inactive system image, 9, 15 accessing, 21 activating, 33, 49 administrative tasks, 22 modifying, 21 mount point, 22 mounting, 60 synchron