Sie sind auf Seite 1von 4

drd-clone(1M)

drd-clone(1M)

NAME drd clone - clone the root volume group. SYNOPSIS

drd clone [-?] [-p] [-q] [-v] -t target_device_le [-x option=value] [-x -?] [-X option_le ]
DESCRIPTION The drd clone command creates a copy of the LVM volume group or VxVM disk group containing the root le system ("/"). In particular, it creates a new group, creates a volume in the new group for each volume in the root group, congures swap and dump volumes, and copies the contents of each le system in the root group to the corresponding le system in the new group. The Source The source of the drd clone command - the group that is copied - is the group containing the root le system ("/"). The source of the clone may reside on multiple disks, and may be mirrored. However, if a VxVM root resides on multiple disks, each disk must contain the same list of volumes, that is, each disk must be a mirror of every other disk. When the drd clone command is run, DRD records information about the original system image and the newly created, inactive clone image. This information is used when other DRD commands, such as drd mount and drd activate are run. DRD only manages two images, the original disk image and the clone disk image. If the drd clone command is run again, any previously created clone is "forgotten" and the currently booted image and the new clone are recorded for use by future commands. When cloning a VxVM root, some patches to VxVM may be required. Please check the DRD web site, http://www.hp.com/go/DRD, to determine VxVM xes that are needed, as well as any temporary restriction on VxVM roots that can be cloned using DRD. Choosing a target disk The target disk must be specied as a block device le. An appropriate target disk should be writable by the system, not currently in use by other applications and large enough to hold a copy of each logical volume in the root group. The physical disk need not be as large as the disk allocated for the root group as long as there is sufcient space for a copy of each volume in the root group. However, the disk will need to be bigger than the used space in each volume, since each volume will be created with the number of physical extents currently allocated to the corresponding root volume. The HP System Management Homepage, hpsmh(1M), or System Administration Manager, sam(1M), can be used to investigate the disks on the system and their current usage. Alternatively, the following command line utilities may be useful in determining an appropriate target disk: The command ioscan -fknC disk can be used to determine the physical disks on the system. Commands from various volume managers and applications can be used to determine the current usage of disks on the system. For example, vgdisplay -v displays the disks currently in use by the LVM volume manager, usually labeled with the identier PV Name. Similarly, the command vxdisk -o alldgs list can be used to display information about all disks managed by VxVM. The command swapinfo can be used to display information about the disks that are currently used for swap.

Depending on the applications in use on the system, further checks may be needed to ensure that disks are not in use. 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 - 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. CAUTION: It is the administrators responsibility to determine which disks are not currently in use and may therefore be used for a clone of the root group.

HP-UX 11i Version 3: September 2010

Hewlett-Packard Company

drd-clone(1M)

drd-clone(1M)

The drd clone command itself will perform the following checks: If the disk is currently in use by the LVM volume manager, it will be rejected by drd clone. If the disk is currently in use by the VxVM volume manager, it will only be accepted as a drd clone target if the disk is an inactive image managed by DRD and the extended option -x overwrite=true is specied. If the disk is not currently in use by LVM or VxVM, but contains LVM, VxVM, or boot records, it will only be accepted as a drd clone target if -x overwrite=true is specied.

For further information on choosing a target disk for a clone operation, see the Dynamic Root Disk Administrators Guide , available at the http://www.hp.com/go/drd-docs web site. The Target Volume Manager The target volume manager must be the same as the source volume manager. If the source group is an LVM volume group of the form vgnn, the clone is imported with the volume group name drdnn and booted with the original volume name vgnn. For example, if vg00 is cloned, the clone is imported as drd00 and booted as vg00. If the source group is an LVM volume group not of the form vgnn, the clone is imported with a volume group name formed by prexing the source group with drd_. If the source group is a VxVM volume group not beginning with drd_, the clone is imported and booted with a volume group name formed by prexing the source group with drd_. If the source group is a VxVM volume group beginning with drd_, the clone is imported and booted with a volume group name formed by removing the prex drd_. The drd Log The drd log resides at /var/opt/drd/drd.log. During any drd operation, the drd log is written to the booted system. In addition, since the log is part of the /var le system, it is copied by the drd clone command to the target of the drd clone operation. Since the le systems on the clone are unmounted before the log has been completely written, the drd log le on the target of a drd clone operation will be truncated. The messages following the truncated clone log will be those from the rst drd operation run on the clone after it is booted. Options

drd clone recognizes the following options: -? -p -q


Displays the usage message. Sets preview mode. Decreases the verbosity level by one each time it is specied. 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). Increases the verbosity level by one each time it is specied. 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).

-v

-x -? Displays the list of possible -x (extended) options. -x option=value


Sets the extended option to a value. See Extended -x Options denitions below.

-X option_file
Gets the extended options from a le.

-t device_special_file
Species the block device special le of a single physical disk on which the cloned system image is to be written. The block device special le must exist on the system and be writable. All data previously on the disk will be unavailable after a clone operation. (See the -x overwrite extended option.) Extended -x Options drd clone recognizes the following -x (extended) options:

-x enforce_dsa=true
Usage: Advanced/Dangerous Controls whether or not a failure in the disk space analysis (DSA) part of the analysis phase is fatal 2 Hewlett-Packard Company 2 HP-UX 11i Version 3: September 2010

drd-clone(1M)

drd-clone(1M)

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. risk of lling a mounted disk or volume to its maximum capacity at some point during the session. Attempts to exceed the capacity will result in a catastrophic failure of the session, and possibly leave an unusable system.

false: A failure in DSA will be logged, but the session will be allowed to proceed. There is a

-x ignore_unmounted_fs=false
Usage: Basic Controls whether a clone fails when an unmounted le system in the root volume group is detected. This option only applies to root volume groups that use LVM.

-x logfile=/var/opt/drd/drd.log
Usage: Basic This is the path to the log le for this command. Each time DRD is run, this le will grow larger. This can be changed, for example, to a month-specic location for easier archiving, off-host backup, and rotation.

-x log_verbosity=4
Usage: Basic Species the level of message verbosity in the log le (See also -x verbosity). Legal values are:

0 1 2 3 4 5

Only ERROR messages and the starting/ending BANNER messages. Adds WARNING messages. Adds NOTE messages. Adds INFO messages (informational messages preceded by the * character). Adds verbose INFO messages. Adds very-verbose INFO messages.

-x mirror_disk=
Usage: Basic The block device special le of the mirror disk of the target. The device special le should refer to an entire disk, not to a partition. This option requires that LVM mirroring be installed. The block device le specied will be used to mirror each logical volume in the target of the clone operation.

-x overwrite=false
Usage: Basic Controls whether or not a disk containing boot, LVM, or VxVM records can be overwritten. Note that DRD will 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.

true:

Allow a disk to be overwritten, even if it contains boot, LVM, or VxVM records.

false: Prevent a disk that contains boot, LVM, or VxVM records from being overwritten. -x preview=false
Usage: Basic If true, run this command in preview mode only (i.e., complete the analysis phase and exit; no changes are committed to disk). Setting this option to true has the same effect as specifying -p on the command line.

-x verbosity=3
Usage: Basic Species the level of stderr verboseness:

0 1 2 3 4 5

Only ERROR messages and the starting/ending BANNER messages. Adds WARNING messages. Adds NOTE messages. Adds INFO messages (informational messages preceded by the * character). Adds verbose INFO messages. Adds very-verbose INFO messages.

Note: The -v option is equivalent to increasing verbosity by 1 (e.g., from 3 to 4) and the -q option is equivalent to decreasing verbosity by 1. The -v and -q options can be used more than once. 3

HP-UX 11i Version 3: September 2010

Hewlett-Packard Company

drd-clone(1M)

drd-clone(1M)

RETURN VALUE drd clone returns the following values:

0 1 2

Success. Error. Warning.

EXAMPLES To name a le specifying extended options:

drd <mode> [options] -X /tmp/extendedOptions


where the example /tmp/extendedOptions le has this content: logfile=/tmp/robsDRD.log log_verbosity=5

To display usage for the drd clone command:

drd clone -?
To clone the root LVM volume group or VxVM disk group to a physical device: For 11iv2:

drd clone -t /dev/dsk/c1t1d0


For 11iv3:

drd clone -t /dev/disk/disk1


To preview the clone of the root LVM volume group or VxVM disk group to a physical device: For 11iv2:

drd clone -p -t /dev/dsk/c1t15d0


For 11iv3:

drd clone -p -t /dev/disk/disk7


To display all drd clone extended options:

drd clone -x -?
AUTHOR drd was developed by Hewlett-Packard Development Company, L.P. FILES

/var/opt/drd/drd.log

Log le.

SEE ALSO drd(1M), drd-activate(1M), drd-deactivate(1M), drd-mount(1M), drd-rehost(1M), drd-runcmd(1M), drdstatus(1M), drd-sync(1M), drd-umount(1M), drd-unrehost(1M), ioscan(1M), swapinfo(1M), vgdisplay(1M), vxdisk(1M) Dynamic Root Disk Administrators Guide , available at http://www.hp.com/go/drd-docs.

Hewlett-Packard Company

HP-UX 11i Version 3: September 2010

Das könnte Ihnen auch gefallen