Mac OS & AFS

From BrainImagingCenter
Jump to: navigation, search

Using OpenAFS on Mac OS X

  • First, download the OpenAFS package from [openafs.org]
  • Open a Terminal.app window (Applications/Utilities) and sudo to root (you will be asked for your Mac OS X login password):
[jed@dynamo ~]$ sudo -s
  • As root, use the pico editor to open /private/var/db/openafs/ThisCell
  • Insert 'dbic.dartmouth.edu', save, and exit.
  • Again, use the pico editor to open /private/var/db/openafs/config/openafs.options
  • Insert '-afsdb -stat 2000 -dcache 800 -daemons 3 -volumes 70 -fakestat', save, and exit.
  • Reboot

After the reboot you should be able to open another Terminal.app window and execute the klog command with your username as the second argument:

[jed@dynamo ~]$ klog jed@dbic.dartmouth.edu
Password:

to obtain an AFS token. The default token will last for 24 hours and will give you read/write access to your home directory.

You can verify that you have a token and check the time left with the tokens command:

[jed@dynamo ~]$ tokens

Tokens held by the Cache Manager:

User's (AFS ID 10167) tokens for afs@dbic.dartmouth.edu [Expires Aug  6 20:44]
   --End of list--

You might want to place a link on your desktop for accessing your AFS home directory with the Finder. To do this, open Terminal.app again and execute (under your normal account--without sudo):

ln -s /afs/dbic.dartmouth.edu/usr/LABNAME/USERNAME ~/Desktop/AFS-HOME

That command will place a link on your desktop.