16.3. Introduction to InterMezzo

16.3.1. Architecture

InterMezzo uses a special file system type. The files are stored locally on the hard disks of the individual hosts. One of the file systems available in Linux is used for this purpose, preferably ext3 or one of the other journaling file systems. Following the preparation of the partition, the file system is mounted with the type intermezzo. The kernel loads a module with InterMezzo support and all changes performed in this file system are written to a log file.

Following these preliminary steps, InterSync can be started. This program starts a web server, such as Apache, other hosts can access to exchange data. When configuring a client, the name of the server must be specified in InterSync. This server will be contacted. A freely selectable designation for the file system — the “fileset” — is used to identify the file system.

InterSync is the next generation of the older InterMezzo system, which used a perl daemon called lento for the file synchronization. The documentation of InterSync still refers to this older system occasionally. However, this system has been replaced by InterSync. Unfortunately, the module included in standard kernels still supports lento and does not work with InterSync. A newer module is available in the SUSE kernel. For custom kernels, the kernel module should be built with km_intersync.

The configuration of InterMezzo requires system administrator permissions. As indicated above, the configuration of InterMezzo is relatively difficult and should therefore be performed by an experienced system administrator. The configuration described below does not provide any protective mechanisms. Thus, others can easily intercept and manipulate the data synchronized with InterMezzo. For this reason, the configuration should only take place in a trustworthy environment, such as a wired private network protected by a firewall.

16.3.2. Configuring an InterMezzo Server

One of the hosts, preferably one having a good network connection, is assigned the role of the server. The entire data synchronization traffic traverses this server.

A separate file system must be set up for the data storage. If you do not have a spare partition and do not use LVM, the easiest way is to set up the file system in the form of a loop device, which enables the use of a file in the local file system as a separate file system.

In the following example, an InterMezzo/ext3 file system with a size of 256 MB is set up in the root directory. The file set is assigned the designation fset0.

dd if=/dev/zero of=/izo0 bs=1024 count=262144
mkizofs -r fset0 /izo0  # The warning can be ignored

This file system is mounted to /var/cache/intermezzo.

mount -t intermezzo -ofileset=fset0,loop /izo /var/cache/intermezzo

To do this automatically when the system is booted, an entry must be made in the file /etc/fstab. Now InterSync can be configured by customizing /etc/sysconfig/intersync. The following is entered in this file:


Now InterSync can be started with /etc/init.d/intersync start. To do this automatically when the system is booted, the service can be entered in the list of services to start with insserv intersync.

16.3.3. Configuring InterMezzo Clients

The configuration of the clients (one server can serve multiple clients) is virtually the same as that of the server. The only difference is that the name of the server must be specified in the variable INTERSYNC_CLIENT_OPTS when configuring /etc/sysconfig/intersync:

INTERSYNC_CLIENT_OPTS="--fset=fset0 --server=sun.example.com"

sun.example.com must be replaced with the network name of the server. If possible, the file systems on all computers should have the same size.

16.3.4. Troubleshooting

As soon as a client is started, changes to files located in the directory /var/cache/intermezzo/ should also be visible on the server and all other clients. If this is not the case, this is usually because no connection can be established to the server or due to a configuration error, such as a wrong “fileset” designation. To find the error, analyze the log messages in the system log /var/log/messages. The web server started logs its data to /var/intermezzo-X/. The log file of the kernel, which records changes to the file system, is located in /var/cache/intermezzo/.intermezzo/fset0/kml and can be viewed with kmlprint.

When a conflict occurs, normally one of the InterSync processes is aborted. If the file synchronization is no longer performed, look for indications in the log file and use /etc/init.d/intersync status to check if the synchronization service is still active.

If necessary, refer to the package documentation: