| United States-English |
|
|
|
![]() |
Dynamic Root Disk Administrator's Guide: HP-UX 11i v2, HP-UX 11i v3 > Chapter 2 DRD CommandsDRD Command Syntax |
|
This section explains DRD command syntax, including the options that are specific to certain commands.
The following options are available for DRD commands. Not all options are used by all commands. Extended optionsThe following extended options are available:
The following sections describe each DRD command syntax. The drd-clone(1M) command creates a copy of the volume group containing the root file system (/). It does not clone the entire disk configuration. The drd clone command:
The drd clone command syntax is: drd clone [-?] [-p] [-q] [-v] -t target_device_file [-x extended option=value] [-x -?] [-X option_file]
The drd clone command performs the following checks:
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. When run with the -x mirror_disk=block_device_special_file, you must specify the target's block device special file of the mirror disk. The block device special file should refer to an entire disk, not to a partition. For a system with an LVM root, this option requires that LVM mirroring 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. However, because the clone file systems must be unmounted before the final ending banner message of the operation is written to the log, the record of the clone operation in the log on the clone is truncated at the message indicating that file systems are being copied. The next message in the log on the clone is issued by the next DRD command run on the clone itself after it is booted. The log on the booted system is complete, ending with the final banner message. The drd-runcmd(1M) command runs a DRD-Safe command on the cloned (inactive) system image. The drd runcmd command syntax is: drd runcmd [-?] [-v] [-x extended option=value] [-x -?] [-X option_file] command <args>
The drd runcmd command runs the designated command on the inactive system image. Several commands, known as DRD-Safe commands, can be executed with drd runcmd . See Maintaining Software on the Cloned Image for more information about the DRD-Safe commands. The drd runcmd command mounts the inactive system image if it has not been mounted. Generally, when drd runcmd completes, it unmounts the inactive system image. However, if the inactive system image was mounted before the command, drd runcmd leaves it mounted after completion of drd runcmd. 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. For additional information, see the drd-runcmd(1M) manpage (man drd-runcmd) The drd-activate(1M) command invokes the setboot(1M) command to set the primary boot disk to the target of the drd clone operation. It also optionally sets the alternate and High Availability alternate boot disks to values specified on the command line. The drd activate command syntax is: drd activate [-?] [-p] [-q] [-v] [-x extended option=value] [-x -?] [-X option_file]
The drd activate command causes the inactive system image to boot either immediately or the next time the system boots. Immediate or delayed booting is controlled by the -x reboot={true|false} extended option. The default is false. 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.
The drd deactivate command syntax is: drd deactivate [-?] [-p] [-v] [-x extended option=value] [-x -?] [-X option_file]
The drd-mount(1M) command mounts all the file systems in the cloned system image. The drd mount command syntax is: drd mount [-?] [-p] [-v][-x extended option=value] [-x -?][-X option_file]
If the booted volume group contains the file systems /, /var, /usr, /tmp, /stand, /opt, and /home, the cloned file systems are mounted at the mount points shown in Example 2–1. Example 2-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. If the currently-booted system was created by the drd clone command, the mount point of the root file system of the original system (now inactive) is /var/opt/drd/mnts/sysimage_000. The drd-umount(1M) command unmounts all the file systems in the cloned system image. The drd umount command syntax is: drd umount [-?] [-p] [-q] [-v] [-x extended option=value] [-x -?] [-X option_file]
The drd umount command fails:
If a cloned file system is mounted, drd umount unmounts the file systems, unmounting the root file system (/) last. For a system with an LVM root, drd umount uses deactivate and vgexport to export the inactive volume group from the system. This makes the unmounted inactive system 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-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:
The drd status command syntax is: drd status [-?] [-q] [-v] [-x extended option=value] [-x -?] |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||