Using the InterMezzo Distributed Filesystem - page 8
Getting Connected in a Disconnected World
The procedure for importing an InterMezzo filesystem on a client system is very similar to the procedure described in the previous section.
First, you must create or identify the journaling filesystem that will hold the cached InterMezzo data that you plan to import from the server onto your client. This section uses an ext3 filesystem as an example, though you can also use any journaling filesystem or even an ext2 filesystem in a pinch. Using an ext2 filesystem is not as robust as using a journaling filesystem because it increases the possibility that InterMezzo synchronization data and log information may be lost if you system crashes.
If you have a free ext3 partition that you want to use for InterMezzo, skip ahead to the instructions for creating its mount point and mounting the client's cache filesystem. If not, create an ext3 filesystem on an unused partition by executing the command
mke2fs -t ext3 partition-name, where
partition-name is the name of your partition.
If you do not have a dedicated partition to use for testing InterMezzo, you can create a 10 MB loopback device filesystem for testing purposes by executing commands like the following (where
filename is the name of the file that you want to contain the loopback filesystem):
dd if=/dev/zero of=filename bs=1024 count=10000k /sbin/losetup /dev/loop0 filename /sbin/mke2fs -j /dev/loop0
NOTE: If you have created a loopback filesystem for use with InterMezzo, you should use /dev/loop0 as the name of your filesystem in the remainder of this section. Also, using a small loopback device for your cache limits the number of files that you can keep in the cache on the fileserver. Optimally, the size of your client cache and the size of the filesystem that InterMezzo exports from the server should be the same.
Next, create the mount point for the InterMezzo filesystem using the command
mkdir -p /imports/server. This can be anywhere, but /imports/server is the most commonly-used location. After creating the mount point, mount the InterMezzo filesystem using the command
mount -t intermezzo partition-name /imports/server. If you are using a loopback device for testing purposes, the command should be
mount -t vintermezzo partition-name /imports/server. For the purposes of this article, change the mode of the root of the filesystem to 777 (making it publicly writable) by using the command
chmod 4777 /imports/server. You would not want to do this in most production environments.
If you are going to be experimenting with InterMezzo for a while, you should add an appropriate entry for this filesystem to the end of your systems /etc/fstab file so that your system automatically mounts this filesystem each time it boots. If you are using a loopback device for longer-term testing, you will need to add a command such as
/sbin/losetup /dev/loop0 filename to your system's startup scripts so that the mapping between the loopback device and the file that contains the loopback filesystem is done before the system attempts to mount it.
Finally, start the InterSync synchronization server using a command like
intersync --server="server-name" /imports/server &, where
server-name is the name of your InterMezzo server. After a few seconds, you should be able to list the /imports/server directory and see that the files which you copied into /exports/server on the InterMezzo fileserver are now available in the /imports/server directory.
If you installed InterSync on a Red Hat system from the RPM described earlier in this article, a startup file for InterSync was installed in your system's startup directory. On InterMezzo client systems, you can automatically start InterSync (and load the InterMezzo loadable kernel module) each time you boot your system by creating a symbolic link to the file /etc/rc.d/init.d/intersync in the startup directory for your system's default run level (as shown in the file /etc/inittab). For example, on a Red Hat Linux system that starts run level 5 by default, you could do this by creating a symbolic link named /etc/rc.d/rc5.d/S99intersync that points to this file.
Before attempting to automatically start InterMezzo on client systems, you must also edit the file /etc/rc.d/init.d/intersync and supply correct values for the CLIENT_OPTS and CACHE environment variables. The CLIENT_OPTS variable should contain the string
servername is the name of your InterMezzo server, with the name of the server surrounded by double quotation marks. The CACHE variable should contain the name of your system's InterMezzo cache directory, which is /imports/server if you followed the suggestions given in this section.
- Skip Ahead
- 1. Getting Connected in a Disconnected World
- 2. Getting Connected in a Disconnected World
- 3. Getting Connected in a Disconnected World
- 4. Getting Connected in a Disconnected World
- 5. Getting Connected in a Disconnected World
- 6. Getting Connected in a Disconnected World
- 7. Getting Connected in a Disconnected World
- 8. Getting Connected in a Disconnected World
- 9. Getting Connected in a Disconnected World
- 10. Getting Connected in a Disconnected World
Sponsored by BlackBerry
BlackBerry® Enterprise Server Express enables businesses of any size to quickly and easily get started with the BlackBerry solution. It provides advanced BlackBerry smartphone features with no additional software or user license fees, and works with any Internet-enabled BlackBerry data plan or a BlackBerry enterprise data plan. Download now!