This version of lessfs introduces a brand new tool: replogtool
replogtool makes it possible to manually synchronize a lessfs slave server with the master server by simply copying the masters replogfile to the slave and apply it with replogtool like this:
lessfs-184.108.40.206/examples# ./restart.sh lessfs-220.127.116.11/examples# umount /slave lessfs-18.104.22.168/examples# cp /data/boot.img /master lessfs-22.214.171.124/examples# umount /master lessfs-126.96.36.199# ./replogtool -r /data/master/dta/replog.dta -c /etc/lessfs.cfg-slave The replication log has been processed lessfs-188.8.131.52# ./lessfs /etc/lessfs.cfg-slave /slave/ lessfs-184.108.40.206# md5sum /data/boot.img md5sum0d8f9a783e3444135d33c4e19f63bc64 /data/boot.img lessfs-220.127.116.11# md5sum /slave/boot.img 0d8f9a783e3444135d33c4e19f63bc64 /slave/boot.img
For now both the master and the slave need to be unmounted before the replication logfile can be copied to the slave. replogfile does not truncate the replication logfile after processing it. So do not forget to truncate or delete the masters replogfile after the file has been committed on the slave.
If you want a lessfs server to produce a replication logfile without using the lessfs replication protocol you can just specify these parameters in the configuration of the master:
REPLICATION=masterslave REPLICATION_PARTNER_IP=-1 REPLICATION_PARTNER_PORT=201 REPLICATION_ROLE=master
Setting REPLICATION_PARTNER_IP to -1 indicates that lessfs should not attempt to connect to a slave server.
replogtool can also be used to analyze a replication log file. See the manual for more details.