Product | Command type |
---|---|
MultiSite | multitool subcommand |
Platform |
---|
UNIX |
Windows |
Duplicate an existing VOB replica, generating a replica-creation packet:
Use a replica-creation packet to create a new VOB replica:
NOTE: The -ncaexported and -tape options are valid only on UNIX.
The creation of a new VOB replica is a two-phase process. Both phases require you to enter a mkreplica command:
The mkreplica -export command duplicates the contents of the current VOB replica (the originating replica). This generates a single logical replica-creation packet for transmission to one or more other sites. As described in REPLICA-CREATION PACKETS, it may be divided into multiple physical packets. (If you use -fship or -ship, mkreplica also generates a shipping order file for each physical packet.)
This command also creates a new replica object in the VOB database.
The VOB is locked for the entire length of time the mkreplica -export command runs.
NOTE: Creating multiple replicas in one mkreplica -export command is more efficient than using multiple mkreplica -export commands.
At another site, a mkreplica -import command uses the replica-creation packet to create a new VOB replica. The user who enters this command becomes the VOB owner of the new replica.
When a VOB is first replicated, creating a second replica, the VOB's oplog (operation log) is enabled. All ClearCase and MultiSite operations to be replicated are recorded in the oplog. Logging of operations continues until all but one of the VOB's replicas are deleted. Note that creation of additional replicas is recorded in oplog entries. Existing replicas learn about a newly created replica through the standard synchronization mechanism. (See the syncreplica reference page.)
NOTE: Before entering a mkreplica -export command, make sure MultiSite licenses are installed at the original site. After you enable replication in the original VOB, developers cannot access the VOB without a MultiSite license (in addition to a ClearCase license).
When you enter a mkreplica -import command, you must choose whether to make the new replica ownership-preserving or non-ownership-preserving. In either case, the user who enters the mkreplica -import command becomes the owner of the new VOB replica. Ownership preservation affects only element ownership and permissions. For more information on ownership preservation, see Element Ownership and Ownership Preservation.
Creating an ownership-preserving replica is appropriate only if its site supports the same user and group accounts as the originating site. On Windows, therefore, if replicas in a VOB family are not all in the same Windows domain, the entire set of replicas cannot be ownership-preserving. However, you can maintain ownership preservation on the subset of replicas in the same domain.
Windows: The primary group of the user who enters the mkreplica -import command must be the same as the originating replica's group assignment.
UNIX: The user who enters the mkreplica -import command must belong to all the groups on the originating replica's group list.
NOTE: We recommend that you run syncreplica -export immediately after creating a new replica with mkreplica -import -preserve, to inform other replicas in the VOB family that the new replica is ownership-preserving.
Each invocation of mkreplica -export creates a single logical replica-creation packet. (This is true even if you create several new replicas with one mkreplica command.) Each packet carries one or more replica specifications, each of which indicates the host on which a new replica is to be created, along with the new replica's name.
The -maxsize option divides the single logical packet into multiple physical packets to conform with limitations of the transfer medium.
Replica-creation packets are not deleted after import. The VOB owner at the new replica site must delete replica-creation packets after importing them with mkreplica -import.
If the VOB you are replicating is linked to an administrative VOB, mkreplica -export prints a reminder that you must replicate all administrative VOBs in the hierarchy above the VOB you are replicating. The output lists the administrative VOBs. The command does not check whether these administrative VOBs are replicated, so you can ignore the message if you have already replicated them.
Identities: For mkreplica -export, you must have one of the following identities:
VOB owner
root (UNIX)
Member of the ClearCase administrators group (Windows)
Locks: An error occurs if one or more of these objects are locked: VOB.
Mastership: No mastership restrictions.
You must execute mkreplica -export on the host where the VOB storage directory resides.
You cannot replicate a VOB to a host running an earlier major version of MultiSite. (However, you can replicate a VOB to a host running a later major version of MultiSite.)
The following sections describe the options and arguments for use with mkreplica -export.
SPECIFYING TEMPORARY WORKSPACE. Default: None.
SPECIFYING THE REPLICA-CREATION PACKET SIZE. Default: When you do not specify -maxsize, the default packet size depends on the shipping method you use:
Packets created with -ship or -fship are no larger than the maximum packet size specified in the shipping.conf file (UNIX) or the MultiSite Control Panel (Windows).
Packets created with -out are no larger than 2 GB.
Packets created with -tape have no default size limit.
The mkreplica command fails if it tries to create a packet larger than the size supported by your system or by the tape.
500k 20m 1.5g | 500 kilobytes 20 megabytes 1.5 gigabytes |
EVENT RECORDS AND COMMENTS. Default: Creates one or more event records, with commenting controlled by the standard ClearCase user profile (default: -cqe). See EVENT RECORDS AND COMMENTS in the multitool reference page. To edit a comment, use cleartool chevent.
DISPOSITION OF THE REPLICA-CREATION PACKET. Default: None. You must specify how the replica-creation packet created by mkreplica -export is to be stored and/or transmitted to other sites.
HANDLING PACKET-DELIVERY FAILURES. Default: If a packet cannot be delivered, it is sent through the store-and-forward facility back to the administrator at the site of the originating replica. A mail message is sent to the store-and-forward administrator. This occurs after repeated attempts to deliver the packet have all failed, and the allotted time has expired; it can also occur when the destination host is unknown or a data file does not exist. The store-and-forward configuration settings specify the expiration period and the e-mail address of the administrator).
date | := | day-of-week | long-date |
time | := | h[h]:m[m][:s[s]] [UTC [ [ + | - ]h[h][:m[m] ] ] ] |
day-of-week | := | today |yesterday |Sunday | ... |Saturday |Sun | ... |Sat |
long-date | := | d[d]-month[-[yy]yy] |
month | := | January |... |December |Jan |... |Dec |
REPLICA SPECIFICATIONS. Default: None.
hostname | Names the machine where the new replica's storage directory will be created. hostname must be usable by hosts in different domains. It is used by the ClearCase store-and-forward mechanism to determine how to route update packets to the replica. However, keep this information accurate even if your site does not use store-and-forward. (See the chreplica reference page.) hostname can be either the IP address of the host or the computer name, for example, minuteman. You may have to append an IP domain name, for example, minuteman.purpledoc.com. On UNIX, use the uname -n command to display the computer name. On Windows NT, the computer name is displayed in the Network Settings dialog box, which is accessible from the Network icon in the Control Panel. On Windows 2000, the computer name is displayed on the Network Identification tab in the System Properties dialog box, which is accessible from the System icon in the Control Panel. |
replica-name | Name of the replica You must compose the name according to these rules:
| |
vob-selector | VOB family of the replica; can be omitted if the current working directory is within the VOB. Specify vob-selector in the form [vob:]pname-in-vob | |
pname-in-vob | Pathname of the VOB-tag (whether or not the VOB is mounted) or of any file-system object within the VOB (if the VOB is mounted) |
The following sections describe the options and arguments for use with mkreplica -import.
SPECIFYING TEMPORARY WORKSPACE. Default: None.
SPECIFYING VOB-CREATION PARAMETERS. Default: Because mkreplica -import executes a cleartool mkvob command, you can use many of the options used with mkvob. The -tag option is required, and one of -vob or -stgloc is required. See the mkvob reference page in the Command Reference for detailed descriptions of these options.
PROTECTION FAILURES ON CONTAINERS. Default: During import, if any data containers have a group that is not the primary group of the VOB, a failure occurs when mkreplica tries to set the protection of those containers. The import fails if protection failures occur.
OWNERSHIP PRESERVATION. Default: None.
POOL CREATION FOR THE NEW REPLICA. Default: The new replica is created with the same set of storage pools as the originating replica, and the assignments of elements to pools are preserved. The new replica's storage pools are created within its storage directory, even if some of the originating replica's pools are remote; the new pools have the default scrubbing parameters.
NAME OF VOB REPLICA. Default: If the replica-creation packet includes one replica specification, you are prompted to confirm the replica name. If the packet includes multiple replica specifications, you are prompted to select one of the replica names.
SPECIFYING THE LOCATION OF THE REPLICA-CREATION PACKET. Default: None.
In these examples, the lines are broken for readability. You must enter each command on a single physical line.
Generate a replica-creation packet, which will be used at remote host goldengate to create a new replica named sanfran_hub. Place the packet in a file in directory /tmp.
multitool mkreplica -export -workdir /tmp/ms_workdir
-c "make a new replica for sanfran_hub" -out /tmp/sanfran_hub_packet
goldengate:sanfran_hub
Generating replica creation packet /tmp/sanfran_hub_packet
Dumping database...
...
Dumper done.
Generate a replica-creation packet and place it in a storage bay.
multitool mkreplica -export -c "make a new replica for sanfran_hub"
-workdir /tmp/ms_workdir -ship goldengate:sanfran_hub
Generating replica creation packet
/var/adm/atria/shipping/ms_ship/outgoing/repl_boston_hub_18-May-99.15:50:00_1
- shipping order file is
/var/adm/atria/shipping/ms_ship/outgoing/sh_o_repl_boston_hub_18-May-99.15:50:
00_1
Dumping database...
...
Dumper done.
Generate a replica-creation packet that can be used to create two new replicas, bangalore and buenosaires. Ship the packet to its destinations immediately, using store-and-forward.
multitool mkreplica -export -workdir /tmp/ms_workdir
-nc -fship ramohalli:bangalore mardelplata:buenosaires
Generating replica creation packet
/usr/atria/shipping/ms_ship/outgoing/repl_boston_hub_15-Aug-00.14.26.17_6011_1
- shipping order file is
/usr/atria/shipping/ms_ship/outgoing/sh_o_repl_boston_hub_15-Aug-00.14.26.17_6
011_1
Dumping database...
...
Dumper done.
Attempting to forward/deliver generated packets...
-- Forwarded/delivered packet
/usr/atria/shipping/ms_ship/outgoing/repl_boston_hub_15-Aug-00.14.26.17_6011_1
Using a packet file in /tmp, create the storage directory for replica sanfran_hub. Make the replica ownership-preserving, and immediately after creating the new replica, run syncreplica -export to update the other replicas in the VOB family.
multitool mkreplica -import -workdir /tmp/ms_workdir
-tag /vobs/dev -vob /net/goldengate/vobstg/dev.vbs
-preserve -c "create sanfran_hub replica" /tmp/sanfran_hub_packet
The packet can only be used to create replica "sanfran_hub"
- VOB family is c3f47cf3.71b111cd.a4f2.00:01:80:31:7a:a7
- replica OID is 0c39c3b8.727b11cd.abb5.00:01:80:31:7a:a7
Should I create this replica? [no] yes
Processing packet /tmp/sanfran_hub_packet...
Loading database...
...
Loader done.
Registering VOB mount tag "/vobs/dev"...
VOB replica successfully created.
Host-local path: goldengate:/vobstg/dev.vbs
Global path: /net/goldengate/vobstg/dev.vbs
VOB ownership:
owner ...
group ...
multitool syncreplica -export -c "ownership-preserving" -fship boston_hub bangalore
buenosaires
...
Similar to preceding example, but create the replica as a public VOB and non-ownership-preserving. Specify the VOB-tag password and mount options on the command line.
multitool mkreplica -import -workdir /tmp/ms_workdir
-tag /vobs/dev -vob /net/goldengate/vobstg/dev.vbs
-npreserve -c "create sanfran_hub replica" -options rw,soft
-public -password xxxxxx -vreplica sanfran_hub /tmp/sanfran_hub_packet
Processing packet /tmp/sanfran_hub_packet...
...
Registering VOB mount tag "/vobs/dev"...
VOB replica successfully created.
...
Create the storage directory for a new replica, using a packet that was generated by existing replica boston_hub and sent through store-and-forward. Specify storage pool parameters for the new replica.
multitool mkreplica -import -workdir c:\tmp\workdir -tag \dev
-vob \\ramohalli\vobs\dev.vbs -npreserve -c "create bangalore replica"
-pooltalk -vreplica bangalore "c:\Program
Files\Rational\ClearCase\var\shipping\ms_ship\incoming\repl_boston_hub_15-Aug
-00.14.26.17_6011_1
Processing packet c:\Program
Files\Rational\ClearCase\var\shipping\ms_ship\incoming\repl_boston_hub_15-
Aug-00.14.26.17_6011_1
The initial storage pools that will be used in the replica are:
source pool sdft
derived pool ddft
cleartext pool cdft
Configuration for pool "sdft" (source pool):
Full pathname of directory to which pool "sdft"
should be linked (none = not linked)? [none] <RETURN>
Configuration for pool "ddft" (derived pool):
Full pathname of directory to which pool "ddft"
should be linked (none = not linked)? [none] <RETURN>
Maximum size (in Kbytes) for the storage directory of pool "ddft"
(0 = no maximum)? [0] <RETURN>
Space (in Kbytes) to reclaim from pool "ddft"
during scrubbing (0 = none)? [0] <RETURN>
Minimum age (in hours) of objects to scrub from pool "ddft"
(0 = none)? [0] 12
Command to invoke if scrubbing does not reduce pool "ddft"
below maximum size (none = no command)? [none] <RETURN>
Comment for pool "ddft" (none = none)? [none] <RETURN>
. . . (accept defaults for cleartext pool, cdft)
Max. Reclaim Min. Link To
Pool Name Kind Size Size Age Directory
--------- ---- ---- ---- --- ---------
sdft source pool n/a n/a n/a
ddft derived pool 0K 0K 12
cdft cleartext pool 0K 0K 96
Is this the correct configuration for the pools (yes/no/abort)? [no] yes
...
Registering VOB mount tag "\dev"...
...
chmaster, chreplica, lspacket, lsreplica, mkorder, MultiSite Control Panel, shipping.conf, syncreplica, mkvob (in the Command Reference)
Chapter 10, Troubleshooting MultiSite Operations
Feedback on the documentation in this site? We welcome any comments!
Copyright © 2001 by Rational Software Corporation. All rights reserved. |