drd-clone(1M)drd-clone(1M)NAME
drd clone - clone the root volume group.
SYNOPSIS
target_device_file option_file]
DESCRIPTION
The command creates a copy of the LVM volume group or VxVM disk group
containing the root file system ("/"). In particular, it creates a new
group, creates a volume in the new group for each volume in the root
group, configures swap and dump volumes, and copies the contents of
each file system in the root group to the corresponding file 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 file system ("/").
The source of the clone may reside on multiple disks, and may be mir‐
rored. 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 command is run, DRD records information about the original
system image and the newly created, inactive clone image. This infor‐
mation is used when other DRD commands, such as and are run. DRD only
manages two images, the original disk image and the clone disk image.
If the command is run again, any previously created clone is "forgot‐
ten" 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:docs.hp.comenDRD, to determine VxVM fixes
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 specified as a block device file. An appropri‐
ate target disk should be writeable 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 sufficient space for a copy of each vol‐
ume 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 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, displays the disks currently in use by the LVM volume
manager, usually labeled with the identifier Similarly, the com‐
mand can be used to display information about all disks managed
by VxVM.
-The command 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 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.
The command itself will perform the following checks:
If the disk is currently in use by the LVM volume manager, it will be
rejected by If the disk is currently in use by the VxVM volume manager,
it will only be accepted as a target if the disk is an inactive image
managed by DRD and the extended option is specified. 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 target if is specified.
For further information on choosing a target disk for a clone opera‐
tion, see the Dynamic Root Disk Administrator's Guide, available at the
http://docs.hp.com web site.
The target volume manager
The target volume manager must be the same as the source volume man‐
ager. 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 is cloned, the
clone is imported as and booted as 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 prefixing the source group with If the source group is a
VxVM volume group not beginning with the clone is imported and booted
with a volume group name formed by prefixing the source group with If
the source group is a VxVM volume group beginning with the clone is
imported and booted with a volume group name formed by removing the
prefix
The drd log
The drd log resides at During any drd operation, the drd log is written
to the booted system. In addition, since the log is part of the /var
file system, it is copied by the command to the target of the opera‐
tion. Since the file systems on the clone are unmounted before the log
has been completely written, the drd log file on the target of a opera‐
tion will be truncated. The messages following the truncated clone log
will be those from the first operation run on the clone after it is
booted.
Options
recognizes the following options:
Displays the usage message.
Sets preview mode.
Decreases the verbosity level by one each time it is specified.
For example,
will reduce the verbosity from the default value of 4 to
2. If both and are included on the command line, the
effective verbosity is 2. The minimum verbosity level is
0. (See also the option).
Increases the verbosity level by one each time it is specified.
For example,
will increase the effective verbosity from the default
value of 4 to 5. If both and are included on the command
line, the effective verbosity is 3. The maximum verbosity
level is 5. (See also the option).
Displays the list of possible
(extended) options.
Sets the extended option to a value. See Extended -x Options
definitions below.
Gets the extended options from a file.
Specifies the block device special file of a single physical
disk on which the cloned system image is to be written.
The block device special file must exist on the system
and be writeable. All data previously on the disk will be
unavailable after a clone operation. (See the overwrite
extended option.)
Extended -x Options
recognizes the following (extended) options:
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.
A failure in DSA will result in a failure of Analysis
phase for the entire session. The command will not pro‐
ceed.
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. Attempts to exceed the capac‐
ity will result in a catastrophic failure of the session,
and possibly leave an unusable system.
Usage: Basic
Controls whether a clone fails when an unmounted file system in
the root volume group is detected. This option only applies to
root volume groups that use LVM.
Usage: Basic
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.
Usage: Basic
Specifies the level of message verbosity in the log file (See
also -x verbosity). Legal values are:
Only ERROR messages and the startingending 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.
Usage: Basic
The block device special file of the mirror disk of the target.
The device special file should refer to an entire disk, not to a
partition. This option requires that LVM mirroring be installed.
The block device file specified will be used to mirror each log‐
ical volume in the target of the clone operation.
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.
Allow a disk to be overwritten, even if it contains boot, LVM,
or VxVM records.
Prevent a disk that contains boot, LVM, or VxVM records from
being overwritten.
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.
Usage: Basic
Specifies the level of stderr verboseness:
Only ERROR messages and the startingending 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 ver‐
bosity 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.
Return Values
returns the following values:
Success.
Error.
Warning.
Examples
To display usage for the command:
To clone the root LVM volume group or VxVM disk group to a physical
device:
For 11iv2:
For 11iv3:
To preview the clone of the root LVM volume group or VxVM disk group
to a physical device:
For 11iv2:
For 11iv3:
To display all extended options:
AUTHOR
was developed by Hewlett-Packard Development Company, L.P.
FILES
Log file.
SEE ALSOdrd(1M), drd-activate(1M), drd-deactivate(1M), drd-mount(1M), drd-
rehost(1M), drd-runcmd(1M), drd-status(1M), drd-umount(1M), drd-unre‐
host(1M), ioscan(1M), swapinfo(1M), vgdisplay(1M), vxdisk(1M)
Dynamic Root Disk Administrator's Guide, available at
http:docs/hp.comenDRD.
drd-clone(1M)