QDF - The Quota Data File
The qdf defines the pool of disks that are used in the global quota
system for Uniform Access computers and keeps track of which users
have files on each of the disks. The global quota system works off
of three files:
- qdf.inf
-
Defines the pools and what clusters can use them for home directories.
The qdf.inf file is a text file and has volumes of comments at the
beginning of it. Basically each disk is assigned a unique column
number from 0 to 255. This column number is arbitrary and is used
to index into the qdf.dat file.
- qdf.dat
-
Lists which users have files on each filesystem. This is in the form of
a matrix of one row for each user, one column for each disk. An element
of the matrix consists of 8 bits, only one of which is used indicating
that the user has files on this disk. The qdf data is rebuilt periodically
by the /usr/local/etc/bldqdf script on melville. It is also updated on
the fly by new, newdir and newweb.
- qlf.dat
-
Lists what limits users have on each galaxy. This is another matrix with
one row for each user, one column for each galaxy. An element in the matrix
contains that user's disk quota as a floating point number of megabytes.
Galaxy zero is a global value, the definition of the rest of the
galaxy ordinals is in the idf.dat file for the galaxy and is referenced
in the qdf.dat file.
All of these files exist natively in /sy99/dat on the "QDFHOST".
The idfflags QDFHOST command will display
the current QDFHOST and should be used in scripts. Routines to access
the files through the helper on the QDFHOST exist in libsy99.a.
After making any changes to the qdf.inf file, the helper on the QDFHOST
must be told to reread it. This is done by sending a HUP signal to the
helper2 process or by clicking the "clear" button on the Argus entry for
that helper. Ensure that the helper continues to run, it occasionally
takes a dive when told to reset itself. Do a ps auxww|grep helper,
you should at least see helper and helper2 (helper3 is optional).
When a filesystem is added to the pool of disks that a particular cluster
can use the following steps should be taken:
-
Update the /tulsa/fstab.cfg file and run bldfs on
each of the client systems to ensure that the filesystem is mounted
properly.
-
Update the /sy99/dat/qdf.inf file on the QDFHOST.
-
Select one of the unused columns as defined in the last line of the
comments. Update that comment so it doesn't get reused (you might check
to verify that the last person remembered to update it and your column
is not already in use).
-
Add your entry at an appropriate place (presumably with the rest of the
like filesytems) with your chosen column number.
-
Notify the helper on the QDFHOST.
When a filesystem is deleted from the pool of disks the following
steps should be taken:
-
Make sure the "N" (new) flag in the qdf for the disk to be removed is
set to zero so no new directories get assigned to it. Edit the
/sy99/dat/qdf.inf file and notify the helper if
necessary.
-
Make sure there are no users on the disk. There are some instructions
on how to remove users from a disk around
somewhere.
-
Update the /sy99/dat/qdf.inf file on the QDFHOST.
-
Comment out or delete the appropriate line in the file and add the
column back to the list of unused columns. To comment, simply change
the column to #XXX -- you can pick a new column (or reuse the
previously used column) if you ever put the disk back in service later.
-
Notify the helper on the QDFHOST.
-
Get the filesystem unmounted on all the clients. It's important to
get this done before deleting the entry in the fstab.cfg file. You
may have to use lsof and kill processes if the filesystem shows up
as busy on one or more clients when you try to dismount it.
-
Change the /tulsa/fstab.cfg file from "nfs" to "del" for the filesystem
and run bldfs on all the clients to clean up the mount points. If bldfs
complains about busy filesystems then you didn't do the previous step
properly. Now you'll have to recreate the symbolic link manually
(with "ln -s /nfs/host/xxx /"), get that filesystem
dismounted and rerun bldfs.
-
Delete the entry from /etc/fstab.cfg and then run bldfs on the server
to update the exports file there. Unexport the filesystem and then
manually remove the entry from the top of the /etc/exports file on
the server.
Ken Lowe
Email --
ken@u.washington.edu
Web --
http://staff.washington.edu/krl/