VxFS System Administrator's Guide
The following topics are covered in this chapter:
The system administrator is responsible for assigning hard and soft limits to the users, as well as setting associated time limits. Although file and data block limits can be set individually for each user, the time limits apply to the file system as a whole. Quota information associated with user IDs are stored in a quotas file, as described in Chapter 2, "Disk Layout."
quotas) must exist in the root directory of a file system for any of the quotas commands to work. This is a BSD quotas implementation requirement, and is also applicable to VxFS quotas. The quotas file in the root directory is referred to as the external quotas file. VxFS also maintains an internal quotas file for its internal use.
The quotas administration commands read and write the external quotas file to get or change usage limits. The internal quotas file is used to maintain counts of blocks and inodes used by each user. When quotas are turned on, the quota limits are copied from the external quotas file into the internal quotas file. While quotas are on, all the changes in the usage information as well as changes to quotas are registered in the internal quotas file. When quotas are turned off, the contents of the internal quotas file are flushed into the external quotas file so that all data is in sync between the two files.
ufs) are similar to BSD quotas commands. However, the
quotacheckcommand is an exception--VxFS does not support an equivalent command. This is discussed in more detail in "quotacheck With VxFS."
ufsquota commands. On SCO UnixWare, the available quota commands are
ufsspecific (that is, these commands work only on
ufsfile systems). For this reason, VxFS supports a similar set of commands that work only for VxFS file systems.
VxFS supports the following quota-related commands:
edquota--used to edit quota limits for users. The limit changes made
edquotaare reflected both in the internal quotas file and the external quotas file.
repquota--provides a summary of quotas and disk usage
quot--provides file ownership and usage summaries
quota--used to view quota limits and usage
quotaon--used to turn quotas on for a mounted
quotaoff--used to turn quotas off for a mounted
mountcommand supports a special mount option (
-o quota), which can be used to turn on quotas at mount time.
For additional information on the quota commands, see the corresponding manual pages.
quotacheckon each one.
quotacheckreads all the inodes on disk and calculates the usage for each user. This can be costly, and because the file system is mounted, the usage can change while
VxFS does not support a
quotacheck command. With VxFS,
quotacheck is automatically performed (if necessary) at the time quotas are turned on. A
quotacheck is necessary if the file system has changed with respect to the usage information as recorded in the internal quotas file. This only happens if the file system has been written with quotas turned off or if there has been structural damage to the file system that required a full
quotacheck reads information for each inode off the disk and rebuilds the internal quotas file. It is possible that while quotas were not on, quota limits were changed by the system administrator. These changes are stored in the external quotas file. As part of enabling quotas processing, quota limits are read from the external quotas file into the internal quotas file.
# quotaon mount_pointQuotas can also be turned on for a file system at mount time by giving an option to the
# mount -F vxfs -o quota special mount_point
edquotais a quota editor. User quotas can be set up with the
edquotacommand by the superuser:
# edquota username
edquotacreates a temporary file for the given user; this file contains on-disk quotas for each mounted VxFS file system that has a quotas file. It is not necessary that quotas be turned on for
edquotato work. However, the quota limits will be applicable only after quotas are turned on for a given file system.
The soft and hard limits can be modified or assigned desired values. For any user, usage can never exceed the hard limit.
Time limits can be modified using the command:
# edquota -tModified time limits apply to the entire file system and cannot be set selectively for each user.
The quota command can be used to view a user's disk quotas and usage on VxFS file systems:
# quota -v usernameThis displays the user's quotas and disk usage on all mounted VxFS file systems where the quotas file exists.
To turn off quotas for a mounted file system, enter:
# quotaoff mount_point