[an error occurred while processing this directive]

NCSA Solaris AFS Client Installation Guide

This document is for installing the AFS client on machines running Solaris 2.x in the NCSA environment. Please read through these instructions once before installing AFS so you are familiar with some of the setup options. The commands shown below will need to be executed as "root". If there are any questions or problems with this document, or an installation, then please contact afs@ncsa.uiuc.edu. If this is the first time installing AFS on this machine, then it is going to require a reboot.

Notes on Solaris 2.7:
AFS is supported only for machines running the 32-bit version of Solaris 2.7. To verify the installed version, issue the Solaris isainfo -v command. The following output indicates that the 32-bit version of the operating system is installed:

   32-bit sparc applications

The following output indicates that the 64-bit version of the operating system is installed:

   64-bit sparcv9 applications
   32-bit sparc applications
If you want to change your system into 32-bit mode so you can run a native afs client, run the following command as root:

	# eeprom boot-file=kernel/unix
	# reboot

If you need to have your system running in 64bit mode please email afs@ncsa.uiuc.edu and we can give you further information about running a beta afs client



Loading client files onto the local disk

The first step in installing a client is to load AFS binaries onto the local disk - namely, the afsd binary and files needed to incorporate AFS using a dynamic kernel loader (modload). These files must reside on the local disk of every client machine.

Create the following directories for the local files:

  # mkdir -p /usr/vice/etc/modload
Now
  # cd /usr/vice/etc
We need to determine what architecture type the machine is. If you do a
  # uname -m
it should tell you whether it is a sun4c, sun4m, sun4d, or sun4u machine.

Now in the /usr/vice/etc directory, ftp to the anonymous afs distribution server where you can access AFS install files.

  # ftp solaris.ncsa.uiuc.edu
  # user: ftp
  # passwd: 
Once the ftp session is established then go to one of the following directories depending on the version of Solaris you are using and the system type: Once you are in one of the above directories then
  ftp> cd usr/afsws/root.client/usr/vice/etc
Warning: Make sure you do not cd to /usr/afsws/root.client/usr/vice/etc above, (the / is in front of the usr) or else you could get the wrong versions of the binaries.

Now get the following files from this directory (make sure you are doing a binary transfer):

  ftp> bin
  ftp> get afsd
Then cd to the modload directory on both the local and remote machines to get the next set of files.
  ftp> cd modload
  ftp> lcd modload
Now get the following files:
  ftp> get libafs.o
  ftp> get libafs64.o
If you get an error on the file that is fine (It isn't present in all versions of AFS.)

On the local machine go back up a directory to /usr/vice/etc.

  ftp> lcd ..
On the remote machine
  ftp> cd /service/etc
Then get the following files:
  ftp> get ThisCell
  ftp> get CellServDB
This is all the local files you are going to need to retrieve for the AFS client.
  ftp> quit
Now make sure the correct permissions are set for all of the files:
  # chmod 755 /usr/vice/etc/afsd
  # chmod 644 /usr/vice/etc/CellServDB
  # chmod 644 /usr/vice/etc/ThisCell
  # chmod 755 /usr/vice/etc/modload/lib*

Loading AFS into the kernel

Before we load the AFS library into the kernel we first need to create an entry for AFS in the /etc/name_to_sysnum file. This will allow the kernel to make AFS system calls. Note that the slot numbers differ for Solaris 2.7.

In order for the kernel to recognize this entry we need to reboot.
  # reboot
When the machine comes back up, log in and we are now ready to load the AFS library into the kernel. After that is done run:
  # /usr/sbin/modload /kernel/misc/nfssrv
  # /usr/sbin/modload /kernel/fs/afs
If you wish to verify that AFS loaded correctly, use the modinfo comand:
  # /usr/sbin/modinfo | grep afs

Setting up the cache

Every AFS client must have a cache in which to store local copies of files brought over from file server machines. The cache manager is set up on local disk. When setting up the local cache you need to figure out how much cache do I need, and how much local disk space do I have for the cache? A typical cache size for a normal user is 80 to 100 MB, and if you are going to be using AFS heavily then 150 to 200MB should be used.

First create the cache directory and set the correct permissions:

  # mkdir /usr/vice/cache
  # chmod 700 /usr/vice/cache
Now create the cache configuration file:
  # echo "/afs:/usr/vice/cache:80000" > /usr/vice/etc/cacheinfo
The above is the standard mount location, /afs, and the standard cache location, /usr/vice/cache. It also is setting a cache size of 80MB. This can be increased or decreased as needed. The best method for setting up the cache area is creating a seperate partition of a local disk and mount it at /usr/vice/cache. Otherwise just use a portion of the /usr partition.

If you are having problems then contact us at afs@ncsa.uiuc.edu.

Starting the cache manager

We are now going to start the cache manager which will initailize the cache files in /usr/vice/cache and mount /afs.

First create the mount point for AFS:

  # mkdir /afs
  # chmod 777 /afs
Now make sure the cache manager mode bits are set correctly and invoke the cache manager:
  # chmod 755 /usr/vice/etc/afsd
  # /usr/vice/etc/afsd -verbose
You should now see it creating all the cache files. This may take awhile depending on the size of your cache.

Setting up AFS binary path

Now you need to set up the path to access all of the afs binaries.
  # ln -s /afs/ncsa/(hw type)/usr/afsws /usr/afsws
Replace (hw type) with the architecture type of the machine, which was determined above by uname -m (ie. /afs/ncsa/sun4x_57/usr/afsws).

Enabling AFS to start on boot

Put the standard Solaris startup file in the /etc/init.d directory as afs. You can copy this from the following location:
  # cp /afs/ncsa/service/etc/rc/solaris_afs.rc /etc/init.d/afs
Then set the permissions:
  # chmod 755 /etc/init.d/afs
Now set the following links for proper startup and shutdown:
  # ln -s /etc/init.d/afs /etc/rc3.d/S99afs
  # ln -s /etc/init.d/afs /etc/rc2.d/K66afs

Other configurations

At this point the AFS client should be running and it should start up and shut down properly on reboot. There are a few more items that may need to be configured to have access to other resources in the NCSA environment.

AFS binaries
If you want access to the AFS binaries then make sure that /usr/afsws/bin and /usr/afsws/lib are in your PATH environment variable.

Setting up /usr/ncsa
In order to have access to other binaries we make available in AFS create the following link:

  # ln -s /afs/ncsa/packages/.link/SunOS_5.(Solaris minor rev level) /usr/ncsa
Replace (Solaris minor rev level) with the minor rev level of Solaris you are using. (i.e. 4, 5, 6, or 7)
Then make sure that /usr/ncsa/bin and /usr/ncsa/lib are in your PATH environment variable.

AFS login on console
If you want to be able to log onto the the console of the machine and use your AFS password, use your AFS home directory, and get an AFS token, then refer to the Setting up Solaris console login page.

/etc/passwd entries
If you need to add user entries to the local /etc/passwd file then you can find most users in the following file:
/afs/ncsa/common/etc/passwd
Grep for the user in the above file and copy the line to the local passwd file.

Altering file system cleanup scripts
Add the -local flag to the existing command in /usr/lib/fs/nfs/nfsfind, so that it looks like:

  find $dir -local -name .nfs\* -mtime +7 -mount -exec rm -f {} \;
This prevents the find from traversing the AFS tree.

[an error occurred while processing this directive]