Home | UNC | CS Dept. | Rose-Hulman | Bandar | Contact
Research

Courses

Schedule

Resume

Biography

T-Files

How To: AFS Client - Linux

This is a very basic step by step description of how to install the OpenAFS client on most Linux machines. The purpose of this document is not to replace the OpenAFS documenation but to fill in some gaps that the OpenAFS documentation overlooks.

Assumptions

This howto assumes that you plan to connect to an existing AFS cell. It in no way tells you how to set up an AFS cell.

The Steps

  1. Download the latest versions of the following RPM's from OpenAFS: openafs-XXXX, openafs-kernel-XXXX, openafs-kernel-source-XXXX, openafs-compat-XXXX, openafs-client-XXXX. Note that you'll probably want to pick the RedHat version.

  2. Install the openafs-XXXX, openafs-kernel-XXXX, openafs-kernel-source, openafs-client-XXXX, and openafs-compat-XXXX in that order using the command: rpm -i RPM_NAME.

  3. Now, unless you have the specific RedHat version of Linux that matches the files you just downloaded you must recompile the AFS kernel (not the linux one). And don't get freaked out about compiling. It's 2 very easy steps that follow.

  4. cd to /usr/src/openafs-kernel-XXXX

  5. View the README file to make sure nothing has changed.

  6. cd to src/ and type "./configure" to configure your system for compiling the AFS kernel.

  7. Type "make" to compile your kernel.

  8. Copy the built module to the right location:

    cp MODLOAD-XXXS/libafs-XXXS.o /usr/vice/etc/modload/

  9. cd to /usr/vice/etc/modload

  10. Add your new module to the AFS SymTable:
    ../afsmodname -f SymTable -g libafs-XXXX.o

  11. We're almost there! In /usr/vice/etc open ThisCell and add the cell name you want your client to join.

  12. Now you will probably have to update the CellServDB. It comes preloaded with a bunch of AFS cells, but not nearly all of them. The easiest thing to do is get this file from a client that already exists in you AFS cell. If this client is Linux it will likely be located at /usr/vice/etc/CellServDB. If it is Windows look in c:\WINDOWS_DIR\afsdcell.ini. If it's the windows file just rename it to "ThisCell" when you copy it over. If you can't access any existing files you'll have to do it on your own. It's easy. Just open "ThisCell" for editing and add at least two lines:

    >CELL_NAME # Comment what the cell name is
    IP_OF_SERVER # Comment the servers name.

    Note that you can have more than one server in your cell. You'll understand better when you open the file.

  13. One more setting! Open the "cacheinfo" file in /usr/vice/etc and make sure it has a line like this: "/afs:/usr/vice/cache:100000"
    The first part the "/afs" is where the AFS system will be mounted on this machine. The next part, "/usr/vice/cache", is where the AFS cache will reside. The last part is the number of 1024byte blocks that the cache can use. If your cache info file has more than this after it, that's fine but it may not work. If it works, leave it alone. If it doesn't just use what you see above.

  14. You're there. Now let's start everything up! Type:

    /etc/rc.d/init.d/afs start

  15. All you have to do now is log in. Type:

    klog USERNAME

  16. You should be in. cd into your AFS file system now:

    cd /afs/CELL_NAME/SOME_DIRECTORY

  17. On subsequent reboots and logins all you should have to do is login using klog and cd to the right directory.

Links

This site has many current versions of AFS already in RPM formats for various Linux distributions: ftp://linux.fnal.gov/linux/contrib/openafs

Feedback

Please send me some feedback on how this worked for you. This is my best shot at remembering how I just set up my machine. I'd be happy to help you figure it out on yours. The OpenAFS documentation was pretty good, but not very coherent for setting up just a single client using the RPMs on a non-Redhat machine. (I run Mandrake).
Last Modifed December 31st, 1969
Copyright c 2003 - Travis Sparks - All Rights Reserved


DISCLAIMER: All usage of content on this site is subject to the UNC Honor Code. All contect on this site is posted with the express purpose of collaboration and general information.