We have a rational multisite setup. There are two sites. Production and Disaster Recovery. Production is the primary site and DR is used as a backup. We access Prod on a daily basis and make our changes and check-in the codes. There was an issue with DR server, becuase of which rational services were starting and stopping randomly. We had scheduled a job to import sync packets from Production to DR, that seems to have failed.There are many packets which are still in shipping/ms_ship/incoming path.
Now when i check epoch values at DR and prod, its different
I run the following commands at DR for a replica and find the epoch values.
multitool lsepoch -actual
output: oid:7f91c2bd.f6114e79.b84e.0d:40:04:99:4c:81=945162 (ReplicaPROD oid:26e9d5a9.f57f4078.afb1.cb:28:b2:42:d8:bb=129184 (ReplicaDR
multitool lsepoch
output:
oid:7f91c2bd.f6114e79.b84e.0d:40:04:99:4c:81=886978 (ReplicaPROD
oid:26e9d5a9.f57f4078.afb1.cb:28:b2:42:d8:bb=129184 (ReplicaDR
How can I sync the DR replica with Prod Replica?
I honestly don't try (too much) to reconcile epoch in that case.
I simply re-export the all vobs and recreate a new remote vob.
multitool mkreplica -export -maxsize 200m -nc -workdir D:\tmp -fship remote.server:vobname_uk@\aPvob
/opt/rational/clearcase/bin/multitool mkreplica -import -workdir /tmp/avobname -tag /vobs/avobname -vob /archive_02/vobstore/avobname.vbs -host ahostname -hpath /vobstore/avobname .vbs -gpath /archive_02/vobstore/avobname.vbs -npreserve -nc -public -password apassword
multitool syncreplica -export -fship replica:avobname@\aPVob
/opt/rational/clearcase/bin/multitool chmaster -nc avobname_uk replica:avobname_uk@/vobs/aPvob
You would have to rmtag the vob on the server first, but other than that, you can quickly rebuild a replica that way (unless the vob is really huge)
The first priority is figuring out if the imports are failing at the DR site or "just" not happening. If you have shell access over there, and can become root or sudo, run this command as root:
multitool syncreplica -import -receive
This will attempt to individually import each pending sync packet. If you get errors, and they aren't something like "depends on changes not yet received" then you should probably pick up the phone and call IBM.
Another option is to:
- Move all the packets out of the "incoming" bay at the DR site
- Run "multitool chepoch -actual ReplicaDR@\myvob
- Run "multitool syncreplica -export -fship ..." for that VOB only.
- Manually import that packet (multitool syncreplica -import {packet name}"
- If that works, repeat steps 2-4 for the next VOB.
Things to watch out for:
- "gap in oplog entries" on export in step 3. If that happens, you'll have to find out how long the sync has been not working, and you may have to manually import one or moe of the pending packets (which is why we moved them instead of deleting them) and retry from the chepoch -actual.
- Database errors on import or export. (most likely import since you're working fine in the production VOBs) That's a "pick up the phone and call IBM" issue.
来源:https://stackoverflow.com/questions/26629942/different-epoch-values