Now I meet a strange problem.<br><br>After the first sync init, it enters to the realtime replication state. I deployed them on 3 machines, and have run near half month. Suddenly one day, a host, I don't know what's wrong, I found fs_mirror get the empty
<br>records from its mirrord agent. In normal conditions, these records should<br>be:<br>"CREATE:/var/www/html"<br>"FWRITE:/var/www/html/index.php"<br>"DELETE:/var/www/html/temp"<br>"MOVE:('/var/www/html/aa', '/var/www/html/bb')"
<br>...<br>But should be no empty records. This lead to fs_mirror to a dead infinite loop.<br><br>I restart the fs_mirror from the broken point, but the problem remains, after DEBUG I found the problem occurs at the same serial number every time(I use Berkeley DB as the log record(wmLog), and serial numbers are the keys), so I suspect that the problem is BDB, but I don't know how to test
<br>and locate to the right place.<br><br>I tried to open the orignal db file in Python:<br>>>> import bsddb<br>>>> x = bsddb.btopen("/var/mirrord/wmlog"<br>>>> len(x)<br>623748<br>>>> x["6854"]
<br>Traceback (most recent call last):<br> File "<stdin>", line 1, in <module><br> File "/usr/lib/python2.5/bsddb/__init__.py", line 223, in __getitem__<br> return _DeadlockWrap(lambda:
self.db[key]) # self.db[key]<br> File "/usr/lib/python2.5/bsddb/dbutils.py", line 62, in DeadlockWrap<br> return function(*_args, **_kwargs)<br> File "/usr/lib/python2.5/bsddb/__init__.py", line 223, in <lambda>
<br> return _DeadlockWrap(lambda: self.db[key]) # self.db[key]<br>KeyError: '6854'<br>>>> x[str(6854)]<br>Traceback (most recent call last):<br> File "<stdin>", line 1, in <module>
<br> File "/usr/lib/python2.5/bsddb/__init__.py", line 223, in __getitem__<br> return _DeadlockWrap(lambda: self.db[key]) # self.db[key]<br> File "/usr/lib/python2.5/bsddb/dbutils.py", line 62, in DeadlockWrap
<br> return function(*_args, **_kwargs)<br> File "/usr/lib/python2.5/bsddb/__init__.py", line 223, in <lambda><br> return _DeadlockWrap(lambda: self.db[key]) # self.db[key]<br>KeyError: '6854'
<br>>>> x.first()<br>Traceback (most recent call last):<br> File "<stdin>", line 1, in <module><br> File "/usr/lib/python2.5/bsddb/__init__.py", line 278, in first<br> rv = _DeadlockWrap(
self.dbc.first)<br> File "/usr/lib/python2.5/bsddb/dbutils.py", line 62, in DeadlockWrap<br> return function(*_args, **_kwargs)<br>_bsddb.DBNotFoundError: (-30990, 'DB_NOTFOUND: No matching key/data pair found
<br><br>Even I have stopped the mirrord daemon, the errors remain.<br><br>Then I tried to copy and move out the database file, and open the new dbfile:<br>>>> import bsddb<br>>>> x = bsddb.btopen("/tmp/wmlog")
<br>>>> len(x)<br>0 <br>the length is 0, and getitem get the same errors above.<br><br>Why this occurs when I copy the db file? Especially the len() is 0?!<br><br>I can only restart the mirrord, to rebuild the BDB data file, and so far,
<br>this problem does not occurs again.<br><br>I don't know why there is a occasional problem like this? Is there any one be familiar with BDB can give me several advices?<br><br>Thanks.<br><br>-- <br><div id="mb_0">------------------------------------------
<br>My Projects: <br> <a href="http://sourceforge.net/projects/crablfs" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://sourceforge.net/projects/crablfs</a><br><a href="http://crablfs.sourceforge.net/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://crablfs.sourceforge.net/</a><br><a href="http://crablfs.sourceforge.net/#ru_data_man" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://crablfs.sourceforge.net/#ru_data_man
</a> <br><a href="http://crablfs.sourceforge.net/tree.html" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://crablfs.sourceforge.net/tree.html</a><br><a href="http://cralbfs.sourceforge.net/sysadm_zh_CN.html" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://cralbfs.sourceforge.net/sysadm_zh_CN.html</a><br>
My Blog:<br><a href="http://chowroc.blogspot.com/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://chowroc.blogspot.com/</a><br><a href="http://hi.baidu.com/chowroc_z/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://hi.baidu.com/chowroc_z/</a><br>Looking for a space and platform to exert my originalities (for my projects)...
</div><br>