AFS Basic Usage

Basic Usage

When you login to a CSAIL Linux machine or have AFS installed and setup correctly on Windows or Mac, you obtain a “token” that verifies your identity to the file system. This token has a lifetime of 10 hours. If your token expires you lose access to your AFS directories.

To check if you have a token, type:

tokens

To obtain a new token, type:

aklog

To create your Kerberos ticket, type:

kinit

If you remain logged-in to a computer for over 10 hours you may find that the computer won’t let you write to your own files. This is because your token has expired, or you may have lost network connection or been timed out. Run

kinit && aklog

(or, equivalently, our convenience script renew, which is probably in your $PATH).

Long-running jobs

If you require credentials which last longer then 10 hours, please see the longjob, longscreen, or longtmux command. You can get more info by simply running the commands with -h or --help:

longjob -h
longscreen -h
longtmux -h
    More information about these commands...
    
    </span>
</div>
<div class="expand-content" style="display: none;">

All of these work by starting a new Kerberos "process authentication group", running your work inside that, and also inside that automatically renewing your tickets for up to a week, which is the maximum limit they can be renewed without you retyping your password. (If you need longer access than that, see below.)

longjob runs the job you specify in the background (so there's no real way to reauthenticate before the week is up, or to interact with the job). It's good if you know your job will take less than a week and doesn't need any interaction.

longscreen and longtmux both start a shell session (under screen or [tmux] respectively), and arrange to renew the tickets in that session as long as possible. You then connect to the session (using screen -r or tmux a) and start your job, which can be interactive. Also, if you're approaching a week and you need to let your job run longer than longscreen/longtmux can keep it going for you, you can suspend the job with Control-Z and run kinit && aklog (or, equivalently, our convenience script renew) and then resume your job with fg to get another week's authentication.

If you're familiar with screen already, you'll be comfortable with longscreen. If you're not familiar with either screen or tmux, longtmux may be a better choice, as tmux is a little fancier and more user-friendly; there are lots of tutorials about it and https://tmuxcheatsheet.com/quick-start/ has the basics (and a link to a cheat-sheet with more advanced commands).

</div>

On a CSAIL Linux machine these should already be in your $PATH; they’re in /usr/local/csail/bin (as is the renew script mentioned above).

AFS quotas

By default, most volumes are set initially at 20G. If you, your group, or project requires more personal storage than this, please contact help@csail.mit.edu

To list your volume quota, type:

fs listquota