InterMezzo is a distributed file system. It allows replication of data stored on a "server" to one or more clients. Unlike other network file systems, e.g. NFS, clients cache the data on a local filesystem. The InterMezzo "server" monitors for changes to its exported filesystem which are then replicated out to the clients. Changes made to the cache on the client can be copied to the server if configured to do so. These properties allow a client system to work without being in contact with the server and without losing the ability to work on files originally stored on the server. As a result, a popular use is allowing laptop users to access their files on both desktops and laptops.

Word of Caution!

I have found the documentation of InterMezzo to be sadly lacking. That is one of the reasons I have written this page. There are many reports of problems with InterMezzo and it does not seem to be being very actively developed. Its mailing list is something of a graveyard for unwanted spam. InterMezzo is developed on (and tested against) RedHat systems, and this sometimes leads to problems when trying to use it with Debian.

Also, as development software, there is always the chance of this doing nasty things to your filesystem. Alternative software that might be worth considering include NFS, rsync, Unison and Coda. There is a well-written, if somewhat old, article on InterMezzo on Linux Planet.

This page describes setting up InterMezzo on a Debian unstable system, with InterSync client version 0.9.5-3 and kernel 2.4.25. It uses one "client" and one "server" system, with the server hosting the exported filesystem and the client importing it using InterMezzo.

There are three elements to the InterMezzo system:

  1. Kernel support for the InterMezzo filesystem

  2. A CGI-enabled webserver (Apache or ghttpd are suggested)
  3. The InterSync client program

Kernel Support

The InterMezzo filesystem is supported by any kernel since 2.4.15. The module is marked as EXPERIMENTAL in 2.4 series kernels, so you will need to ensure that you have enabled the option to show experimental code in your kernel configuration. (Not sure about 2.6 series kernels! Support is in there, but it might no longer be experimental.)

Your distribution may or may not have the module available already (look for the intermezzo.o), but if not, then will need to compile a new kernel for your computer. How you do this will vary from distribution to distribution. Debian users can check out the /KernelCompiling page and others the /KernelBuilding page. When you are compiling your own kernel, the option to configure the module is in the Network File Systems sub-section of the File Systems menu.


The InterMezzo documentation says that any CGI-enabled webserver should be capable of working with InterMezzo, but they suggest either Apache or ghttpd. The recommended web server for InterMezzo is now Apache 2, rather than ghttpd. (There are still some outdated docs that say ghttpd is the preferred web server.)

The RPMs of InterSync available from the [[InterMezzo website]] are configured to use Apache 2.0, although configuring to use Apache 1.3 is fairly easy.

There is no Debian package for the ghttpd webserver, so it is necessary to compile it from source. The configuration of ghttpd is controlled by the ghttpd.conf file. Apparently this can be edited before compilation, but the version with which ghttpd runs seems to be stored in /etc. ghttpd installs to /usr/local/ghttpd by default, which seems fine for Debian users. Compilation is a simple

make clean && make && make install

[[InterSync]] Client

There is no Debian package for the InterSync client, so it is neccesary to compile it from source. The source is available from the [[InterMezzo website]]. There are a number of development packages neccesary to have installed before InterSync will compile. These are:

On Debian, it is simply a case of using apt-get or aptitude to install the packages listed. The InterSync source code should compile successfully using gcc3, specifically gcc-3.3.3.

InterSync should be configured with options specifying the location of the linux kernel source and the destination directory:

./configure --prefix=/usr/local

Need to check this bit! The directory specified with the --enable-linux-dir should have header files available, e.g. you should have run "make dep" on the source tree, without running "make mrproper" afterwards! The configure process ends with the following message:

configure: WARNING: *** not configuring intermezzo kernel module; run configure/make in ./fs24 to configure and make module

This shouldn't be a problem, as we have already compiled the InterMezzo kernel module.

The Intersync client should then compile OK with:

make && su -c 'make install'

Setting up filesystems

It is necessary to mount the filesystems you wish to use with InterMezzo using special flags. For example, to mount the ext3 filesystem on /dev/hdb1 to use with InterMezzo, use

mount -t intermezzo /dev/hdb1 /mnt

Mount points

The documentation for InterMezzo uses mount points like /exports/server and /imports/server. It is important to remember that these mount points are just directories - if you wanted to mount your partition at /home you could do so just as easily.

When mounting an InterMezzo filesystem, you may seem some messages appear in the system log. (If you are working on the first console, you may also see these messages appear on screen.) The messages that appeared on my system were:

(filter_get_filter_fs,l. 234): ops at c04056dc
kjournald starting.  Commit interval 5 seconds
EXT3 FS 2.4-0.9.19, 19 August 2002 on ide0(3,65), internal journal
EXT3-fs: mounted filesystem with ordered data mode.
(journal.c:presto_last_record,l. 1033 392): [[InterMezzo]]: Warning long record tail at 740, rec tail_offset at 0 (size 1079521837)
(filter_setup_journal_ops,l. 166): ops at c04056dc

Configuring Web Server

The author has only used Apache 1.3 with InterSync. Other people are welcome to add their experiences with other web servers.

Configuring Apache 1.3

  1. Install Apache 1.3. On Debian, this is as easy as aptitude install apache. It is not necessary to make any changes to the Apache configuration as InterSync runs another Apache process with its own configuration file.

  2. Because InterSync starts its own Apache process, there is no need for it to be started automatically at system boot. If you do not want Apache to run automatically - TODO!!!!! there is a cool command for editing runlevels IIRC

  3. Attempt to run InterSync from the command line, specifying the mounted filesystem to be expoerted, for example

intersync /exports

Becase InterSync has not been run on that file system before, it will create a directory in /var/intermezzo-0 and populate it with the necessary default configuration files.

  1. InterSync will crash out with error messages relating to the Apache configuration. That's no problem, we'll fix them now.

  2. Change to the /var/intermezzo-0 directory and back up the intersync-httpd.conf file. The default intersync-httpd.conf file should contain this:

Listen *:370

User intermezzo
Group intermezzo

[[LoadModule]] alias_module         /etc/httpd/modules/
[[LoadModule]] cgi_module           /etc/httpd/modules/
[[LoadModule]] log_config_module    /etc/httpd/modules/

[[ErrorLog]] "/var/intermezzo-0/apache_error_log"
[[LogLevel]] warn
[[LogFormat]] "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
[[CustomLog]] "/var/intermezzo-0/apache_access_log" combined

[[PidFile]] /var/intermezzo-0/

<Directory />
 [[AllowOverride]] None

<Directory /usr/local/lib/intermezzo/>

  Options [[ExecCGI]]

ScriptAlias /cgi-bin/ /usr/local/lib/intermezzo/

<VirtualHost _default_:*>

  [[DocumentRoot]] "/var/intermezzo-0"
  1. Edit the [[LoadModule]] lines, changing the paths to reflect the location of the modules on a Debian system:

[[LoadModule]] alias_module         /usr/lib/apache/1.3/
[[LoadModule]] cgi_module           /usr/lib/apache/1.3/
[[LoadModule]] log_config_module    /usr/lib/apache/1.3/
  1. Edit the log_config_module line to read:

[[LoadModule]] config_log_module    /usr/lib/apache/1.3/
  1. Apache's logs and lock files are placed in the /var/intermezzo-0 directory.


Running [[InterSync]]

Having set up the filesystems and configured the web server, the next stage to actually run the InterSync client to begin the process of synchronising files.

  1. On the server system, run the InterSync client using a line similar to:

intersync /exports &

[[Wed|Mar 17 12:29:03 2004]] [alert] apache: Could not determine the server's fully qualified domain name, using for [[ServerName]]
  1. On the client system, run the InterSync client using a line similar to:

intersync --server="" /imports &

where you substitute the relevant IP address or Domain Name of the InterMezzo server. You may see some messages like this:

[[Wed|Mar 17 11:47:23 2004]] [alert] apache: Could not determine the server's fully qualified domain name, using for [[ServerName]]
(request.c:is_get_uuid L534): 
is_client_init_fset: data_on_demand: 0

Automating [[InterMezzo]]

You can configure your system to set up and start sharing a file system using InterMezzo at boot.

  1. Configure /etc/fstab to mount the filesystem on system boot. A line like

/dev/hdb1       /exports        intermezzo defaults             0       0

should do the trick.

  1. Configure your system start up scripts to start the InterSync client on boot.

Problems and Gotchas

Losing your connection

If the connection between the InterMezzo server and client is lost the the mounted filesystem is only availble read-only.

Conflict Handling

The current version of InterMezzo does not support automatic conflict resolution, contrary to the impression given in some documentation. Conflicts occur when both the client and server filesystems are changed when they are disconncted from each other. If InterMezzo detects a conflict, you will see this message:

** ERROR **: peer possibly in conflict, cannot continue.

There does not seem to be any way to get round this - particularly if the filesystem gets set to read-only!

This page was originally written by TonyWhitmore

LinuxHints/InterMezzo (last edited 2005-02-17 00:00:00 by 81)