HP-UX Reference (11i v1 05/09) - 5 Miscellaneous Topics (vol 9)
q
quota(5) quota(5)
NETWORKING FEATURES
Quotas are not fully supported over NFS file systems. However, the
quota command is able to report
quota statistics on remote
NFS file systems for which disk quotas are in effect, if the remote system pro-
vides the RPC rquotad service (see rquotad(1M)).
rquotad is provided to allow reciprocal support to other systems.
EXAMPLES
Initial Setup
The kernel must be reconfigured to support disk quotas; see the System Administration manuals. Eligible
file systems for disk quota enforcement are those with mount options
rw and quota, as described in
mount(1M) and fstab(4).
For each file system for which quotas are to be enabled, perform the following tasks:
1. Mount the file system.
2. Add
quota to the existing options list in
/etc/fstab . For example, change the string
default for the root (/) entry to
default,quota. Once this is done, quotas will automati-
cally be enabled for all relevant file systems on system reboot.
3. Create the
quotas file in the mount directory of the file system. For example, for the
/mnt
file system, run the command
cpset /dev/null /mnt/quotas 600 root bin
4. Establish one or more prototype user quotas using the
edquota command (see edquota(1M)).
If you want a number of users on your system to have the same limits, use
edquota to set
those quotas for a prototype user; then use the
edquota -p command to replicate those limits
for that group of users.
5. Turn on the quotas on the file system using quotaon
. For example, run the command
/usr/sbin/quotaon /mnt
6. Run quotacheck (see quotacheck(1M)) on the file system to record the current usage statis-
tics.
Adding a new user
To add a new user to the quota system:
1. Use edquota to copy the quotas of an existing user.
2. Run quotacheck .
Adding a new file system to an established system
Repeat steps 1 through 5 above under "Initial Setup" for the new file system.
WARNINGS
The HP-UX default is to allow chown(2). This can interfere with the disk quota mechanism. Quotas can be
defeated if the chown command (see chown(1)) or the chown() system call (see chown(2)) is accessible to
a user. The
setprivgrp command (see setprivgrp (1M)) can be used to limit access to the chown() sys-
tem call so that only a specified group of users are permitted to use the chown command or the chown()
system call.
The sam command (see sam(1M)) does not yet support disk quotas. When adding new users or file sys-
tems, any desired quotas must be established outside of sam.
HP has added features to the original implementation to ensure correctness of the content of the quotas file
when quotas are enabled by mount and disabled by umount (see mount(1M)), thus eliminating the need
to run quotacheck (see quotacheck(1M)). These features are ineffective, however, if quotaoff and
quotaon (see quotaon(1M)) are used to control quotas.
quotacheck should only be run on a dormant file system to ensure accurate usage information. The
-qv options of the fsclean command (see fsclean(1M)) report on the the current viability of the quota
information.
Section 5−−294 Hewlett-Packard Company − 2 − HP-UX 11i Version 1: September 2005