Hi Everyone,
Let me share these steps regarding how to recover a missing pool_id file from source container in a Vob.
### NOTE ###################
On the example below we have:
Vob tag: /vobs/john-vob3
Vob Storage Path: /vobstore/john-vob3.vbs
##########################################
#### Index ########
I - Symthom
II - Verify if you have remote pools.
III - Recreating the file.
##############
I - Symthom
By running a "cleatool protectvob", for instance, you get a message telling s/sdft/pool_id is missing:
cleartool protectvob -chown john -chgrp abc /vobstore/john-vob3.vbs
This command affects the protection on your versioned object base.
While this command is running, access to the VOB will be limited.
If you have remote pools, you will have to run this command remotely.
cleartool: Warning: Versioned object base owner is already "john".
cleartool: Warning: Versioned object base group is already "abc".
Pool "sdft" appears to be protected correctly.
Pool "ddft" appears to be protected correctly.
Pool "cdft" appears to be protected correctly.
Protect versioned object base "/vobstore/john-vob3.vbs"? [no] yes
Do you wish to protect the pools that appear not to need protection? [no] yes
Protecting "/vobstore/john-vob3.vbs/db/logs"...
Protecting "/vobstore/john-vob3.vbs/db"...
Protecting "/vobstore/john-vob3.vbs/admin/vob_space"...
Protecting "/vobstore/john-vob3.vbs/admin/do_space"...
Protecting "/vobstore/john-vob3.vbs/admin"...
Protecting "/vobstore/john-vob3.vbs/s/sdft/42/3b"...
Protecting "/vobstore/john-vob3.vbs/s/sdft/42"...
Protecting "/vobstore/john-vob3.vbs/s/sdft"...
cleartool: Error: unable to access file /vobstore/john-vob3.vbs/s/sdft/pool_id: No such
file or directory
cleartool: Error: Trouble protecting versioned object base "/vobs/john-vob3".
II - Verify if you have remote pools.
1) You must be sure you are not running on NOT accessible remote pools, so look for symbolic links on the Related Vob Store:
cd <vob-store>
find . -type l -exec ls -l {} \;
1.1) If you have empty results that means you have NO remote pools, so you can go ahead to item III below.
cd /vobstore/john-vob3.vbs/
find . -type l -exec ls -l {} \;
Note: On my example I have empty results.
1.2) In other hand if you have symbolic links, that means you have remote pools.
For instance:
cd /vobstg/libpub.vbs
find . -type l -exec ls -l {} \;
lrwxrwxrwx 1 root 12 Dec 30 1999
d/ddft_2 ->/net/vobsvr5/pools/libpub/d/ddft_2
On this case DON'T go to item III. Instead stop here and verify what is going wrong with the Network Share that provides the remote pools.
III - Recreating the file.
NOTE: Is NOT necessary to lock the vob to restore that file (on source container).
If you are sure you have NO remote pools (see item 1.1 above), in order to restore the pool_id inside the source container you should do:
1.1) Get the details necessary on pool_id file, i.e:
poolkind=s # We already know is the "s".
pool_oid= # We will get i by running "cleartool dump pool:sdft inside a view context and inside the Vob.
replica_uuid= # We will get it from the replica_uuid file in the vbs.
vob_oid= # We will get it from the vob_oid file in the vbs.
1.1.1) Geeting pool_oid
cleartool setview john-dyn-view
Note: If the vob is NOT mounted, mount it.
cd /vobs/john-vob3
cleartool dump pool:sdft |grep oid
oid=3ee0f993.dcd511e2.9399.00:50:56:98:72:93 dbid=33 (0x21)
So the pool_oid is 3ee0f993.dcd511e2.9399.00:50:56:98:72:93
1.1.2) Getting replica_uuid.
cd /vobstore/john-vob3.vbs
cat replica_uuid
3eb0f90f.dcd511e2.9399.00:50:56:98:72:93
1.1.3) Getting vob_oid
cd /vobstore/john-vob3.vbs # Probably you stil there after after 1.1.2 item above.
cat vob_oid
3eb0f90b.dcd511e2.9399.00:50:56:98:72:93
1.2) Creating the pool_id file
As Vob owner:
cd /vobstore/john-vob3.vbs # Probably you stil there after after 1.1.3 item above.
Create a file on the path pool_id file inside "s/sdft/" its contents must be:
poolkind=s pool_oid=<pool_oid from item 1.1.1> replica_uuid=<replica_uuid from item 1.1.2> vob_oid=<vob_oid from item 1.1.3>
For instance:
poolkind=s pool_oid=3ee0f993.dcd511e2.9399.00:50:56:98:72:93 replica_uuid=3eb0f90f.dcd511e2.9399.00:50:56:98:72:93 vob_oid=3eb0f90b.dcd511e2.9399.00:50:56:98:72:93
Set the permission 444 to the file
chmod 444 s/sdft/pool_id
2) Finally verify the Vob healthy by running "cleartool checkvob"
cleartool checkvob -pool -source /vobstore/john-vob3.vbs
...
The VOB's source pools are healthy.
Regards,
Pedro Moura
##########################################Disclaimer ##############################################
"The postings on this site are my own and don't necessarily represent IBM's positions, strategies or opinions." #
#################################################################################################