WWC snapshot of http://www.alw.nih.gov/Docs/AFS/AFS_1.html taken on Sat Jun 10 19:13:07 1995

Go to the next section.

AFS is a distributed file system. This file is intended as a fairly short beginners guide to using AFS. A working knowledge of standard UNIX is assumed. Some specific details of the DSG setup are given.

This manual is also available online in the GNU info system. Type `info' for more details.

AFS related discussion may appear in newsgroup `dsg.afs'.

Basics of AFS

AFS, the Andrew File System, is a distributed file system allowing a potentially large set of machines to share access to a set of files in a uniform manner.

AFS uses the client/server model, where all the data is stored on file server machines. File are transferred to client machines as necessary and cached locally.

Cells and filenames

A single administrative group of servers and clients is known as an AFS cell. Our local cell, containing all the machine in the distributed systems group, is called `alw.nih.gov'.

Files within AFS are named as `/afs/<cellname>/filepath', and such path names are uniform on all AFS clients anywhere in the world. So, for example, paths such as

/afs/alw.nih.gov/users/amjudge/.login
or
/afs/transarc.com/common/etc/CellServDB
are valid from any AFS client in the world.

To make local pathnames shorter, a symbolic link exists from `/afs/nih' pointing to
`/afs/alw.nih.gov', so locally `/afs/nih/path' is valid.

Using the system type in a path

If the string `@sys' appears in a file name to be used in AFS, it is automagically replaced with AFS's concept of the type of the machine that the file name is being expanded on.

So, the path `/afs/nih/@sys' is replaced with `/afs/nih/pmax_ul4' if running on a decstation running Ultrix Version 4; on a sun 4 running SunOS 4.1.3, the pathname becomes `/afs/nih/sun4c_413'.

This feature may be used in pathnames or symbolic links to allow them to be machine independent. For example, you may link `bin' in your home directory to `@sys/bin'. As another example, `/usr/local' on most machines is a link to `/afs/nih/@sys/usr/local', and the correct binaries are chosen automatically.

Volumes

UNIX divides disks into partitions. AFS further divides partitions into subsections called volumes. A volume houses a subtree of related files and directories. Normally, volumes are considerably smaller than traditional file systems. For example, each user's home directory would normally be stored in a separate volume. Each major sub-directory of `/afs/nih/work' and `/afs/nih/src' would also be stored in a separate volume. Large sub-directories are further sub-divided.

You do not need to know which file server houses any volume. AFS will locate the volume automatically. Indeed, it may move during its lifetime. If you wish to know where a volume is currently stored, see section Volume location.

Volumes have a size limit, or quota. You may receive error messages if the volume you are writing into exceeds its quota. See section More on Volumes for more details.

Access to volumes is provided through mount points (see section Mount points). Mount points appear in the file system as directories. When you cd into a directory, you may be crossing a mount point and accessing a new volume, which may be stored on a different machine.

Tokens

AFS does not use UNIX user IDs for authentication. In order to access files which are not world accessable using AFS, you must have a valid AFS token. You may see what tokens you currently hold using the `tokens' command.

For example:

% tokens
Tokens held by the Cache Manager:

        [  1]User's (AFS ID 1) tokens for afs@alw.nih.gov
                                              [Expires Dec  5 13:39]
        [  2]   --End of list--
This output says that the user holds a token for the cell `alw.nih.gov' for AFS user ID 1. You may hold extra tokens for different cells, but you may not have more than one token for a particular cell, so if you use `klog' again, you old token will be discarded.

Tokens expire after 25 hours, and may need to be renewed using the `klog' command. See section Authentication for more details.

Checking if the AFS file servers are up

You may check if the AFS file servers for the cell are up using the `fs checkservers' command:

% fs checks
All servers are running.

File protections

File protections do not work the same way in AFS as they do in UNIX. AFS augments the standard UNIX file protection mechanism, using a more precise mechanism for controlling access to files: an access control list (ACL).

See section Access control lists for more details.

The fs command

The most generally useful AFS command is fs. This command is effectively a suite of commands of the form `fs command args'. Type `fs help' for a full list. To find out the syntax for a particular command, you can type `fs help command'. For example:

% fs help listquota
fs listquota: list volume quota
aliases: lq
Usage: fs listquota [-dir <directory>+] [-help ]

The help lists any aliases for the command, and the arguments that the command accepts. In general, the switches to an AFS command may be omitted if the arguments are given in the order listed in the help message. So, valid commands include:

fs lq
fs lq /afs/nih/src
fs lq -dir /afs/nih/src

Go to the next section.

Back up to ALW Home Page