Skip to content

Instantly share code, notes, and snippets.

@kidmose
Last active November 13, 2017 11:41
Show Gist options
  • Save kidmose/a79dbbb3a49b82c07a8ad1fc879d3cbd to your computer and use it in GitHub Desktop.
Save kidmose/a79dbbb3a49b82c07a8ad1fc879d3cbd to your computer and use it in GitHub Desktop.
AFS installation procedure

AFS installation instructions

Instructions for installing AFS, as used at Electronics Department, Aalborg University, under linux mint 18. This is based on my personal experienced and serves as documentation to me, but might be useful for other. Pull suggestions/PRs welcome.

Based on https://it-wiki.es.aau.dk/wiki/AFS_on_Debian/Ubuntu and adjusted to work based on my experience.

Copyright: GNU GPLv3 https://www.gnu.org/licenses/gpl.html

Install steps

Important: I let my local username be the same as my ES username, as that saves me a lot of headaches. This guide might break if your local user is not the same as

Paths that can be adjusted:

CACHEFILE='/var/cache/openafs-cache.img'
CACHEFOLDER='/var/cache/openafs'

Create and mount cache:

sudo mkdir -p $(dirname $CACHEFILE)
sudo dd if=/dev/zero of=$CACHEFILE bs=1M count=550
sudo mkfs.ext4 $CACHEFILE
sudo tune2fs -c 0 -i 0 -m 0 $CACHEFILE
sudo mkdir -p $CACHEFOLDER
sudo echo "$CACHEFILE $CACHEFOLDER ext4 defaults,loop 0 2" | sudo tee --append /etc/fstab #Only run this once
sudo mount $CACHEFOLDER

Install from PPA. Note that building dkms kernel modules takes a while (minutes) where the process is not producig output after printing Building initial module for 4.4.0-21-generic. AFS cell: ies.auc.dk. Kerberos realm: IES.AUC.DK. Cache size: 500000 (add 0).

sudo apt-get purge openafs-krb5 openafs-modules-dkms openafs-client heimdal-clients && \
sudo add-apt-repository ppa:openafs/stable && \
sudo apt-get update && \
sudo apt-get install -y openafs-modules-dkms && \
sudo apt-get install -y openafs-client && \
sudo apt-get install -y heimdal-clients && \
sudo apt-get install -y openafs-krb5 && \
sudo /etc/init.d/openafs-client restart && \
echo success

Usage etc.

kinit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment