Creating Read/write Volumes

A read/write volume is the most basic type of volume, and must exist before you can create read-only or backup versions of it. When you issue the vos create command to create a read/write volume, the VL Server creates a VLDB entry for it which records the name you specify, assigns a read/write volume ID number, and reserves the next two consecutive volume ID numbers for read-only and backup versions that possibly are to be created later. At the same time, the Volume Server creates a volume header at the site you designate, allocating space on disk to record the name of the volume's root directory. The name is filled in when you issue the fs mkmount command to mount the volume, and matches the mount point name. The following is also recorded in the volume header:

To create (and mount) a read/write volume

  1. Verify that you are listed in the /usr/afs/etc/UserList file. If necessary, issue the bos listusers command, which is fully described in To display the users in the UserList file.

       % bos listusers <machine name>
    
  2. Verify that you have the a( administer), i( insert), and l( lookup) permissions on the ACL of the directory where you plan to mount the volume. If necessary, issue the fs listacl command, which is fully described in Displaying ACLs.

       % fs listacl [<dir/file path>]

    Members of the system:administrators group always implicitly have the a( administer) and by default also the l( lookup) permission on every ACL and can use the fs setacl command to grant other rights as necessary.

  3. Select a site (disk partition on a file server machine) for the new volume. To verify that the site has enough free space to house the volume (now, or if it grows to use its entire quota), issue the vos partinfo command.

    Note

    The partition-related statistics in this command's output do not always agree with the corresponding values in the output of the standard UNIX df command. The statistics reported by this command can be up to five minutes old, because the Cache Manager polls the File Server for partition information at that frequency. Also, on some operating systems, the df command's report of partition size includes reserved space not included in this command's calculation, and so is likely to be about 10% larger.

       % vos partinfo <machine name> [<partition name>]

    where

    p

    Is the shortest acceptable abbreviation of partinfo.

    machine name

    Specifies the file server machine for which to display partition size and usage.

    partition name

    Names one partition for which to display partition size and usage. If you omit it, the output displays the size and space available for all partitions on the machine.

  4. Select a volume name, taking note of the information in About Volume Names.

  5. Issue the vos create command to create the volume.

       % vos create <machine name> <partition name> <volume name> \
            [-maxquota <initial quota (KB)>]
    

    where

    cr

    Is the shortest acceptable abbreviation of create.

    machine name

    Specifies the file server machine on which to place the volume.

    partition name

    Specifies the disk partition on which to place the volume.

    volume name

    Names the volume. It can be up to 22 alphanumeric and punctuation characters in length. Your cell possibly has naming conventions for volumes, such as beginning user volume names with the string user and using the period to separate parts of the name.

    -maxquota

    Sets the volume's quota, as a number of kilobyte blocks. If you omit this argument, the quota is set to 5000 kilobyte blocks.

  6. (Optional) Issue the fs mkmount command to mount the volume in the filespace. For complete syntax, see To create a regular or read/write mount point.

       % fs mkmount <directory> <volume name>
  7. (Optional) Issue the fs lsmount command to verify that the mount point refers to the correct volume. Complete instructions appear in To display a mount point.

       % fs lsmount <directory>
  8. (Optional) Issue the fs setvol command with the -offlinemsg argument to record auxiliary information about the volume in its volume header. For example, you can record who owns the volume or where you have mounted it in the filespace. To display the information, use the fs examine command.

       % fs setvol <dir/file path> -offlinemsg  <offline message>
    

    where

    sv

    Is an acceptable alias for setvol(and setv the shortest acceptable abbreviation).

    dir/file path

    Names the mount point of the volume with which to associate the message. Partial pathnames are interpreted relative to the current working directory.

    Specify the read/write path to the mount point, to avoid the failure that results when you attempt to change a read-only volume. By convention, you indicate the read/write path by placing a period before the cell name at the pathname's second level (for example, /afs/.abc.com). For further discussion of the concept of read/write and read-only paths through the filespace, see The Rules of Mount Point Traversal.

    -offlinemsg

    Specifies up to 128 characters of auxiliary information to record in the volume header.