OpenBSD Journal

Using AFS on OpenBSD

Contributed by jose on from the distributed-filesystems dept.

Some time ago, Bob Beck committed some changes to the base system that makes using AFS as easy as a sysctl. No more having to recompile your kernel, you can now just start using AFS when you feel like it.

That said, this is how easy it is to use AFS on OpenBSD.

  1. set "afs=YES" in rc.conf
  2. mkdir /afs
  3. fill in a value into /etc/afs/ThisCell.
    it turns out that this isn't a specific IP or even a hostname, it's just a site name. so i entered file13.ucs.ualberta.ca when all i needed was ualberta.ca. you'll see that these lines start with a ">" ... use those
  4. reboot.
And voila:


$ ls /afs
andrew.cmu.edu      cs.cmu.edu          openafs.org         ua
athena.mit.edu      glue.umd.edu        rpi.edu             ualberta.ca
cern.ch             ipp-garching.mpg.de sks                 umich.edu
citi.umich.edu      nersc.gov           stacken.kth.se      wam.umd.edu


I've used this method to install packages and snag other software mirrored on AFS-available volumes. Now you can play with it, too.

If you're not using OpenBSD-current, you have to recompile your kernel with the option "AFS" enabled.
UPDATE Note that this is only anonymous AFS, which lets you snag files from public AFS servers.

(Comments are closed)


Comments
  1. By Bob Beck () beck@openbsd.org on mailto:beck@openbsd.org

    You don't need to mess with ThisCell unless
    you are going to change to use a different
    cell than "ualberta.ca" as your top level.
    the ThisCell file in current contains "ualberta.ca"

    ThisCell should contain the name of an AFS cell,
    not a hostname as you enter in your example here
    jose - that is just plain wrong.

    Comments
    1. By jsyn () on

      beck, jose's comment correctly stated that his original attempt to use a hostname/ip within ThisCell was incorrect. He was just pointing that idiosyncrasy out.

      jsyn

      Comments
      1. By X () on

        What is AFS ?

        Comments
        1. By Jan J () on

          AFS is a network filesystem with a common namespace.

          This means that /afs/example.com/foo on my machine is the same as /afs/example.com/foo on your machine.

          /afs normally contains alot of so called cells. Each cell has its own set of servers. This gives easy access to files around the globe like this morning I entered my home directory in /afs/example.com/home/janj and confituned to download an OpenBSD snapshot from /afs/stacken.kth.se/ftp/pub with a simple "cp".

          Comments
          1. By X () on

            Thanks for the explanation ;)

  2. By Jim () on

    I want to distribute some of my files accross 5 machines at home (via intranet) and a couple at work (via internet). I was thinking of creating a symlink for a directory from my /home dirs to a subdirectory of /afs.

    I'm curious though if an yone has the OpenAFS server running on OpenBSD. Did you also have to use Kerberos? Are the file syncronizations done securely (does AFS encrypt)? How about the pathing (Transarc versus ?)? Did you mangle the kernel or use the loadable module?

    Thanks for any input/advice you have to offer.

    Comments
    1. By Jan J () on

      I know atleast one cell that is running OpenAFS on OpenBSD.

      AFS can use a very simple crypto (fcrypt?), arla uses this by default nowdays.

      I don't understand what you mean by "How about the pathing (Transarc versus ?)?"

      There is no need to touch the kernel and there is no kernel module needed as GENERIC has support for XFS.

    2. By Anonymous Coward () on


      is there any known way to compile the
      included milko? (/usr/src/usr.sbin/afs/src/milko/)

      Comments
      1. By Jan J () on

        Milko is not near production quality. I think the fileserver is good enough to export CD-ROM (yeah thats readonly impossible to modify). The volume and protection servers are nonexistant or in there infancy.

  3. By Anonymous Coward () on

    is there any known way to compile the
    included milko? (/usr/src/usr.sbin/afs/src/milko/)

Credits

Copyright © - Daniel Hartmeier. All rights reserved. Articles and comments are copyright their respective authors, submission implies license to publish on this web site. Contents of the archive prior to as well as images and HTML templates were copied from the fabulous original deadly.org with Jose's and Jim's kind permission. This journal runs as CGI with httpd(8) on OpenBSD, the source code is BSD licensed. undeadly \Un*dead"ly\, a. Not subject to death; immortal. [Obs.]