Hi every one am new the clear case I need to keep synchronized the already replicated vobs how do I do that can any one help me in steps wise I appreciate your time and help
Thanks
If the Vob is already replicated (meaning with ClearCase multisite), then it mostly is a matter of running multitool syncreplica:
host1:
multitool syncreplica -export -fship replica:<replica_tag>#\aPVob
host2:
cd /opt/rational/clearcase/shipping/ms_ship/incoming
sudo -u vobadm /opt/rational/clearcase/bin/multitool syncreplica -import /opt/rational/clearcase/shipping/ms_ship/incoming/sync_*_2015-07-16T07*
Related
I'm trying my level best to reduce server space by deleting the unnecessary file and I come across with this file with huge space after running this command
[root$]# du -a / 2>/dev/null | sort -n -r | head -n 5
98926364 /
64453368 /var
63947356 /var/lib
63816012 /var/lib/pgsql
47322196 /var/lib/pgsql/db_log_archive
Does anyone know the importance of this file /var/lib/pgsql/db_log_archive in my centos 7 server ? I want to delete this
This is your WAL archive. I am not aware of CentOS 7 doing this automatically (but I've never used 7). Someone has probably gone out of their way to create this directory and then configure archive_command (from postgresql.conf) to copy WAL to it.
If the person who set up your database is still around, you should ask them what their intentions were.
These could be part of a valid backup strategy. Or they could be part of an invalid backup strategy. Or they could be left over from a no-longer-used backup strategy. You would have to describe what your current backup system is for anyone to know.
This is not a standard directory created by PostgreSQL on CentOS.
Check your postgresql.conf for any reference for this name if it is directly used by PostgreSQL (maybe for backing up WAL).
This is a follow on from op - Moving Vobs between Win and AIX
Due to the aix and win vob servers sharing resources (common CC reg & Common Admin PVOB on the Aix box) we need to amalgamate these vob servers onto the AIX server as a precursor to our ultimate move to new servers at CC8.
on the Win VOb Server we have locked the vob, run vob_siddump then a reformat dump of the vob.
Then using xcopy we copied the dumped vob.vbs from Windows to AIX vob server run the fix_prot on the new server.
But when we run the reformatvob -load it goes through it's steps Shows "Loader Done" then shows the following errors
Error from vob database /vobstore/vobs/vobname.vbs.
Error Trouble Opening the VOB Database /vobstore/vobs/vobname.vbs,
Error Trouble Loading versioned object base /vobstore/vobs/vobname.vbs.
Because of the shared registry is this due to the existing registry entry and we need to unregister and then rmtag before registering and tagging fresh or do we need to do anything further?
Clearcase logs on aix vob server show:
DB Log - Error process not running on registery specified hostname (old win vob server)
Vob Log - shows unix UID and GID messange and Warning unable to verify mount options in vob tag registry Clearcase Object not found
David, there are a few things you need to do here:
unregister the VOB and remove all the tags that refer to the old server
reregister and retag the vobs at the new location.
If you can't register the VOB, run fix_prot -r -root ... to reset the ownership and try again.
run vob_sidwalk to remap object ownership.
run it again with -recover_filesystem to reset container ownership. Alternatively run checkvob -pool -protections -fix -force {vob storage dir}.
The last step really needed to be started on the Windows side before this started. Essentially, you needed a sid dump file to turn into the map file that the sidwalk needs (unless you want to remap everything to the VOB owner...)
The complete procedure to follow is at Moving VOBs between Operating system types You may want to start fresh from there if you still have the VOB located in the old location.
We have a ClearCase server installed on Solaris box and there are several vobs replicated in a multi-site environment. Now as this Clearcase server is becoming old we have setup an new Server on Windows and able to bring that new server into multi-site with all the required vobs. Now we would like to remove/decommission the vobs from old solaris box and want to free up the space occupied by those vobs.
Can any one suggest the best procedure to do this and also point us to the links for that procedure?
You can:
follow the technote "Moving a VOB using ClearCase MultiSite", which basically:
creates a replica on the source vob server:
import the replica on the destination vob server:
multitool mkreplica -export -workdir c:\\
[-maxsize 100m] -fship :
#
Import:
multitool mkreplica -import -workdir /var/tmp/doesntexist/ -tag
/your/new/vobtag/ -stgloc -auto -npreserve -public /var/adm/atria/
shipping/ms_ship/incoming/
simply rmtag and unregister the vob on the solaris box, in order to remove it completely from the central registry server.
See "How to remove a VOB or View from the ClearCase registry"
The alternative, to delete that vob, and to follow "Deleting a replica"
Then you can simply delete the vob and get back that disk space.
How to know an incoming sync packet is inteded for a particular vob?
multitool lspacket -l doesn't tell for which vob this is intended.
I have several incoming packets intended for my replica but when I import them using this command i am getting the below error:
C:\Program Files\IBM\RationalSDLC\ClearCase\var\shipping\ms_ship\incoming>multitool syncreplica -import sync_usal_unix_2012-11-29T23.00.17-05.00_2296
multitool: Error: Sync. packet C:\Program Files\IBM\RationalSDLC\ClearCase\var\shipping\ms_ship\incoming\sync_usal_unix_2012-11-29T23.00.17-05.00_2296 is not applicable.
Actually, multitool lspacket is the right command to check initially:
The OP vchitta initially thought:
The lspacket gave the below out put which shows that the intended replica name is correct but it doesn't reveal the VOB details.
multitool lspacket sync_usal_unix_2012-12-01T23.01.06-05.00_19957
Packet is: C:\Program Files\IBM\RationalSDLC\ClearCase\var\shipping\ms_ship\incoming\sync_usal_unix_2012-12-01T23.01.06-05.00_19957
Packet type: Update Packet fragment: 1 of 1
VOB family identifier is: 360ab8c4.661e11d3.a49e.00:01:80:a9:b5:ec
To which I argued:
Did you search '360ab8c4.661e11d3.a49e.00:01:80:a9:b5:ec' in the vob registry?
(or simply cleartool lsvob -l)
Is there any other Vob which would have the same uid?
See VOB objects and VOB replica objects.
Yes or no, this is your answer right there.
THE IBM documentation clearly mentions:
Each replica is a VOB, but the VOB object and VOB-replica object are different objects in the VOB database.
Specifically:
VOB object: The database has a single VOB object.
This object’s UUID is listed as the VOB family uuid in a lsvob –long listing.
VOB-replica object (or replica object): The database has a VOB-replica object for each of the VOB’s replicas.
This object’s UUID is listed as the Vob replica uuid in a lsvob –long listing.
The OP adds:
No.
No vob is having family identifier with the above UUID.
Now I am able to find which vob a packet is intended for with the help of family UUID.
I found this particular packet is for Platfom vob which I didn't replicated yet.
Original answer
See first "Packet is not applicable to any local replicas"
To verify that the host-name property of a VOB replica is wrong, enter the following command:
cleartool describe –fmt "%[replica_host]p\n"
replica:importing-replica-name#VOB-tag
For example:
cleartool describe –fmt "%[replica_host]p\n" replica:newyork#/vobs/tests
manhattan
If the host name is incorrect, use the chreplica command to change it. At the master replica of the importing replica, enter a chreplica command:
multitool chreplica –c "comment" –host new-host
replica:importing-replica-name#VOB-tag
For example:
multitool chreplica –c "change host name" –host brooklyn
replica:newyork#/vobs/tests
Updated replica information for "newyork".
Send an update packet to the other replicas in the family.
You can have multiple causes, as describes in this technote
Cause
The import command may have been run from a host other than the VOB server.
The hostname associated with the replica may have changed and MultiSite has not been updated.
The VOB server may have multiple host names and or multiple network cards and MultiSite is not properly configured to work with them.
Resolving the problem
For cause 1:
Make sure the syncreplica -import command is being run on the VOB server host.
The syncreplica -import command must be run on the VOB server host as it is a server operation.
For cause 2:
Check the hostnames associated with the replica and compare the outputs using the two commands below.
The VOB and the replica should show identical "host" output. If they do not, this is likely to be the problem.
Use the multitool chreplica -host command to resolve the problem.
Review the MultiSite Administrator's Guide on the topic of chreplica (multitool man chreplica) for more details.
cleartool lsvob -long <vob tag>
multitool lsreplica -long <replica-name>
For cause 3:
If the import is in fact being run on the correct server host, check to see how many hostnames that machine has.
Maybe the server has more then one network card, or several aliases.
If there is more than one name, make sure that the alternate_hostnames file exists.
It should contain each and every hostname the machine has, one per line.
Note: The alternate_hostnames file is supported on UNIX® and Linux® only.
My EC2 database server failed, preventing SSH or other access (not sure why ... grrr AWS ... that's another story).
I was able to make a snapshot of the EBS root volume. I can not boot a new instance from this volume (I'm guessing the boot partition is corrupt). However, I can attach and mount the volume on a new instance.
Now I need to get the PostgreSQL 8.4 on the new machine (Ubuntu 10.04) to load the data from the mounted volume. Is this possible? I've tried:
pg_ctl start -D /<mount_dir>/etc/postgresql/8.4/main/
But no joy ... PostgreSQL just starts with empty tables.
Is /etc/postgresql/8.4/main/ the correct location for PostgreSQL data files?
Is there a way to recover the data from the mounted volume in a way that PostgreSQL can read again?
(You should really specify your distro and version, etc, with this sort of system admin question.)
Running Pg via pg_ctl as shown above should work, assuming the original database was from Pg 8.4 and so are the binaries you're trying to use to start it. Perhaps you forgot to stop the instance of PostgreSQL automatically started by the distro? Or connected on the wrong port, so you got the distro's default instance instead of your DB on another port (or different unix socket path, for unix sockets)?
Personally I wouldn't do what you're doing anyway. First, before I did anything else, I'd make a full backup of the entire data directory because you clearly don't have good backups, otherwise you wouldn't be worrying about this. Take them now, because if you break something while restoring you're going to hate yourself. As demonstrated by this fault, trusting Amazon's storage (snapshot or otherwise) probably isn't good enough.
Once you've done that: The easiest way to restore your DB will be to, on a new instance you know you don't have any important data on that has the same major version (eg "8.4" or "9.0") of postgresql as your original instance did installed:
/etc/init.d/postgresql-8.4 stop
datadir=/var/lib/postgresql/8.4/main
rm -rf "$datadir"
cp -aR /<mount_dir>/etc/postgresql/8.4/main/ "$datadir"
chown -R postgres:postgres "$datadir"
/etc/init.d/postgresql-8.4 start
In other words: take a copy, fix the permissions, start the DB.
You might need to edit /etc/postgresql/8.4/main/postgresql.conf and/or /etc/postgresql/8.4/main/pg_hba.conf because any edits you made to the originals aren't there anymore; they're on your corrupted root FS. The postgresql.conf and pg_hba.conf in the datadir are just symlinks to the ones in etc under Debian - something I understand the rationale behind, but don't love.
Once you get it running, do an immediate pg_dumpall and/or just a pg_dump of your important DB, then copy it somewhere safe.