Self-Solve Knowledge Search

Minimize Maximize
To cleanup cisam datastore
Title :
To cleanup cisam datastore
Document ID :
KM00991201
Product - Version:
temip framework ;
OS :
Updated :
Tue Jun 10 16:37:11 GMT 2014
Summary :
sometimes the datastore corrupted and it cannot be repaired. The corrupted datastore might cause normal operation of the OC.
Problem

when temip_ds_repair and dpack cannot repair the corrupted datastore, and the customer don't have backup copy of the datastore,  the corrupted datastore need to be rebuilt or cleanup for getting the OC back to normal operation.

i.e.

[root_iran]/> dpack /usr/users/lee/vodafone/aMP _OC
rebuilding /usr/users/lee/vodafone/aMP_OC - 300393 records -    00%00%Memory fault(coredump)
[root_iran]/> 

[root_iran]/> temip_ds_repair -v /usr/users/lee/vodafone/aMP _OC
Error in CISAM Datastore Information

CISAM Number of records         : 231244
CISAM Max object id             : 0
CISAM Database size             : 633837039
CISAM Records size              : 0
/usr/users/lee/vodafone/aMP_OC structure
 variable length data
 maximum record length: 30720
 fixed header length: 1024
 index block size: 1024
 index dup width: 4
 index 1: uniq long@0/4
 index 2: dups dc lc tc long@4/4 long@12/4 long@16/4
 index 3: dups dc lc tc long@8/4 long@12/4 long@16/4
 data file: 300393 slots allocated, 69149 free
 index file: 316535 slots allocated, 20109 free

checking data..failed
data free list is corrupt
rebuilding..ok
checking index 1..failed
key out of order
index count mismatch
index/data mismatch
replacing..failed 100/0
checking index 2..failed
key out of order
index count mismatch
index/data mismatch
replacing..ok
checking index 3..failed
key out of order
index count mismatch
index/data mismatch
replacing..ok
checking variable length..failed
mangled link in hash list

 

Fix

The following is example procedure for cleaning the datastore:

 

1.      Login as temip

 

2.      $ cd /var/opt/temip

 

3.      Backup the datastore

 

$ temip_ds_copy  aMP_OC  aMP_OCBK

 

4.      Suspend the oc

 

TeMIP> suspend oper mp_oc

 

5.      Cleanup datastore

 

$ temip_ds_repair  –c  aMP_OC

 

6.      Resume the oc

 

TeMIP> resume oper mp_oc

 

7.      If the alarm count of the oc  is not correct, alarm handling fm need to be restarted for getting the correct alarm count; the incorrect alarm count won’t affect the normal operation of the oc.  This action can be performed later.