[Csync2] asymetric database sizes

Vincent Régnard vregnard at tbs-internet.com
Fri Mar 14 13:15:45 CET 2008


Vincent Régnard a écrit :
> Lars Ellenberg a écrit :
>> On Wed, Mar 12, 2008 at 05:31:35PM +0100, Vincent Régnard wrote:
>>> Hi all,
>>>
>>> I am a bit surprised with csync databases (/var/lib/csync2/*db) sizes 
>>> which are very different on two hosts that are actually in sync !
>>>
>>> Tables on both sides have the same record numbers (lines), but 
>>> database files are very different in size:
>>>
>>> host 1 (master):
>>>
>>> # ls -lh /var/lib/csync2/ total 442M
>>> -rw-r-----    1 root     root         412M Mar 12 15:06 or4.pitux.com.db
>>> -rw-r-----    1 root     root         9.9M Mar 12 15:19 
>>> or4.pitux.com_dotqmail.db
>>> -rw-r-----    1 root     root          20M Mar 12 16:08 
>>> or4.pitux.com_sys.db
>>>
>>> host 2 (slave):
>>> total 541M
>>> -rw-r-----    1 root     root         533M Mar 12 15:06 op1.pitux.com.db
>>> -rw-r--r--    1 root     root         3.3M Mar 12 15:19 
>>> op1.pitux.com_dotqmail.db
>>> -rw-r-----    1 root     root         4.9M Mar 12 16:08 
>>> op1.pitux.com_sys.db
>>>
>>> Same configurations, same hardware, same operating system !
>>>
>>> Something strange ? Shouldn't these databases have the same size on 
>>> both sides ?
>>
>> maybe you have large subtrees no longer in the configuration?
>> # csync2 -R
> 
> That is done on a regular basis (cron every hour)
> 
>>
>> maybe you have large unsynced subtrees, and you managed to
>> let csync2 think they are in sync?
>> # csync2 -TIUX?
>>
>> or maybe you just need some sqlite maintenance?
>> # for d in /var/lib/csync2/*.db ; do
>> #     ls -l $d ; sqlite $d vaccum ; ls -l $d
>> # done
> 
> sqlite vacuum helped, size differences have reduced a lot.
> 
> Probleme actually pesists. Playing with csync2 -TIUX I realize symlinks
> are causing problemes and are not syncronized properly. I let you know
> more about this when I finish my investigations.
> 
> NB: csync2 has also problems to handle sockets and pipes (I have to
> exclude them manually in the config file which is not really handy).
> 

So after checking everything properly. There is no probleme with 
symlinks (my fault) csync2 is doing well. Everything is in perfect 
synchronisatin state from csync point of view, but databases still have 
slightly different sizes after sqlite vacuum:

host1 (master):

db1: 392805376
db2: 4424704
db3: 6182912

host2 (spare backup):

db1: 398752768
db2: 3448832
db3: 5072896

For each DB:
csync2 -C XXX -TIUX and csync2 -C XXX -M report no differences.

all db tables exept file are empty and file tables contains exct same 
record numbers both sides !

Something odd ! Any clue ? Do you experience the same ?

-- 
Vincent Régnard
vregnard at tbs-internet.com
TBS-internet.com
027 630 5902

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5793 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.linbit.com/pipermail/csync2/attachments/20080314/12e36243/smime.bin


More information about the Csync2 mailing list