Typically, volumes consist of a single users data objects or other logically connected groups of data objects. Four factors should be used in dividing the file system tree into volumes.
The volume is the unit of quota enforcement and, potentially, accounting.
The rename command is prohibited across volume boundaries. Thus, manipulation of the tree structure at a granularity other than a whole volume (e.g. moving the mount point) or less than a volume (e.g. moving directories or files within a volume) is expensive. Moving a subtree of a volume to another volume requires copying every byte of data in the subtree.
The size of the volume should be small enough that moving volumes between partitions is a viable approach to balancing server disk utilization and server load. Thus, volumes should be small relative to the partition size.
Finally, the size of a volume must not exceed the capability of the backup media.
A volume naming convention should also be used by those administrators who create volumes. Volume names are restricted to 32 characters and should be chosen so that given a volume name, a system administrator (who knows the naming conventions) can determine its correct location in the file system hierarchy. The convention used by the Coda project is to name volumes by their function and location. Thus, a replicated volume named u.hbovik is mounted in /coda/usr/hbovik and contains hboviks data. A project volume is prefixed by p. and a system volume is prefixed by s. Similarly, volumes containing machine specific object files are prefixed by the machine type. For instance, p.c.alpha.pmax.bin contains project coda binaries for our current alpha release and is mounted on /coda/project/coda/alpha/pmax_mach/bin .
Use the command createvol_rep (8) to create read-write replicated volumes respectively. This command is actually a script which ultimately invokes the volutil (8) command with the create_rep option at the appropriate server. The volume will contain an access list initialized to System:Administrators rlidwka and System:AnyUser rl . Creating the volume does not mount the volume within the file system hierarchy. Mounting the volume as well as changing the access list or the quota must be done using the cfs (1) command from a client. A new volume may not be visible at client workstations for some time (see Section 9.6 below).
A few concrete examples should clarify the use of some of these
commands. On the SCM, the
createvol_rep
u.hbovik
E0000107
/vicepa
will
create a replicated volume named
u.hbovik
on each server in the Volume Server Group (VSG) identified by
E0000107
. The file
/vice/db/VSGDB
contains the mapping between VSGs
and servers. The names of the replicas will be
u.hbovik.
n
,
where
n
is a number between
0
and
|VSG| -
1
.