6.824 - Fall 2007

Lab Information

Lab overview

In this sequence of labs, you'll build a multi-server file system called Yet-Another File System (yfs) in the spirit of Frangipani. At the end of all the labs, your file server architecture will look like this:

----------------     -------------
|              |     |           |
|   App   yfs--|-----|extent srvr|----- yfs on other hosts
|    |    |    |  |  |           |  |
|--------------|  |  -------------  |
|    |    |    |  |  -------------  |
|    Kernel    |  |  |           |  |
|  FUSE module |  ---| lock srvr |---
|              |     |           |
----------------     -------------
You'll write a file server process, labeled yfs above, using the FUSE toolkit. Each client host will run a copy of yfs. yfs will appear to local applications on the same machine by registering via FUSE to receive file system events from the operating system. The yfs extent server will store all the file system data on an extent server on the network, instead of on a local disk. yfs servers on multiple client hosts can share the file system by sharing a single extent server.

This architecture is appealing because (in principle) it shouldn't slow down very much as you add client hosts. Most of the complexity is in the per-client yfs program, so new clients make use of their own CPUs rather than competing with existing clients for the server's CPU. The extent server is shared, but hopefully it's simple and fast enough to handle a large number of clients. In contrast, a conventional NFS server is pretty complex (it has a complete file system implementation) so it's more likely to be a bottleneck when shared by many NFS clients.

Lab assignments

Lab 1 - Lock Server
Lab 2 - Basic File Server
Lab 3 - File Server: Reading, Writing and Sharing Files
Lab 4 - MKDIR, REMOVE, and Locking
Lab 5 - Caching Lock Server
Lab 6 - Caching Extent Server + Consistency
Lab 7 - Replicated lock server
Lab 8 - Paxos
Lab 9 - Project

Programming Environment

You should be able to do Lab 1 on any Unix-style machine, including your own Linux/FreeBSD desktops, MacOS laptops, or any Athena SunOS/Linux workstation.

For Labs 2 and beyond, you'll need to use a computer that has the FUSE module, library, and headers installed. You should be able to install these on your own machine by following the instructions at fuse.sourceforge.net. However, the official programming environment for this class will be the Athena Linux machines (you can find a list of Athena Linux workstation locations here). What we mean by official is that we will be testing your assignments using that environment, so please make sure your code passes the tests on an Athena Linux machine.

However, these machines do not have FUSE installed on them by default. We have created a 6.824 locker that includes all the necessary FUSE files, as well as installation scripts. Note that you must be root to run these scripts. To install FUSE on an Athena Linux workstation, do the following:

% attach 6.824
% tellme root
% su -
  [Now enter the root password shown in the previous command to become root]
% /mit/6.824/install-fuse.sh
% exit

Now you should be able to compile your FUSE-based programs and run them without any problems. When you are finished with a session and are about to log out, MIT asks that you please clean up after yourself by uninstalling the FUSE programs. Do this as follows:

% tellme root
% su -
  [Now enter the root password shown in the previous command to become root]
% /mit/6.824/uninstall-fuse.sh
% exit

Note that you if you have your own FreeBSD or MacOS machines that you prefer to use for programming, you should be able to use them for the majority of the work. However, there are minor annoying differences between FUSE on Linux and FUSE on other operating systems that may cause your code to fail our tests when it seems to pass for you. As an example, on Linux FUSE passes file creation operation to the file system using the MKNOD call, while on other systems it uses CREATE. Please ensure that your assignment passes the tests in the Athena Linux environment, and there shouldn't be any problems when we test it.

NEW: Linux VMWare image with FUSE

We've created a VMWare Linux image based on the Debian 4.0r0 server image from Thought Police. It has FUSE pre-installed on it, and should have everything you need to compile and run the labs. You can download it here:

6.824-debian-40r0-i386.zip (566 MB)
Non-root account: username=notroot, password=6.82fork
Root account: password=6.82fork

You should be able to run this with VMWare Player, which is available for free from VMWare. We have tested it on Windows and Linux; it should work for Intel Macs as well, but we haven't verified this (though be aware there is no free VMWare Player for Mac).

Note that the official environment for the labs is still the Athena Linux workstations, and that's where we will be testing your code. However this VMWare image is using the same version of FUSE and roughly the same operating system version; please note, though, that it appears that to create a file, the VMWare Linux/FUSE combo in the kernel uses the CREATE operation, rather than the MKNOD sent by the Athena Linux/FUSE combo, so you must test your labs at least once on an Athena Linux machine before submitting. Also note that we don't really have the energy or expertise to debug any VMWare problems you might have. This is just meant to be helpful for those of you who don't have personal Linux machines, and find it inconvenient to sit at an Athena workstation.

There has been at least one report that running the code in VMWare is much slower than running it directly on hardware, and as a result, RPCs timeout more often even when RPC_LOSSY is unset. Be on the lookout for errors related to this.

You may find that the network doesn't work when you boot the image up for the first time. This is a known problem with the Thought Police image. To fix this, run the following command as root:

$ rm /etc/udev/rules.d/z25_persistent-net.rules && reboot 

Aids for working on labs

There are a number of resources available to help you with the lab portion of this course:

Questions or comments regarding 6.824? Send e-mail to 6.824-staff@pdos.csail.mit.edu.

Top // 6.824 home //