HP-UX Reference (11i v3 07/02) - 5 Miscellaneous Topics (vol 9)
q
quota(5) quota(5)
struct dqblk contains the following members:
uint32_t dqb_bhardlimit; /* maximum # of disk blocks +1 */
uint32_t dqb_bsoftlimit; /* preferred limit on disk blocks */
uint32_t dqb_curblocks; /* current block count */
uint32_t dqb_fhardlimit; /* maximum # allocated files +1 */
uint32_t dqb_fsoftlimit; /* preferred file limit */
uint32_t dqb_curfiles; /* current # allocated files */
uint32_t dqb_btimelimit; /* time limit for excessive block use */
uint32_t dqb_ftimelimit; /* time limit for excessive files */
The dqblk64 data structure (defined in
<quota.h>), is used by the quotactl() system call (see quo-
tactl(2)) to get or set quota information for 64-bit filesystems. This structure contains fields that are used
to store a user’s current file and block count and quota limits for a particular file system. Note that VxFS
3.5 will track usage in the dqb64_curblocks field only up to 2 TB.
struct dqblk64 contains the following members:
uint64_t dqb64_bhardlimit; /* maximum # of disk blocks +1 */
uint64_t dqb64_bsoftlimit; /* preferred limit on disk blocks */
uint64_t dqb64_curblocks; /* current block count */
uint64_t dqb64_fhardlimit; /* maximum # allocated files +1 */
uint64_t dqb64_fsoftlimit; /* preferred file limit */
uint64_t dqb64_curfiles; /* current # allocated files */
uint64_t dqb64_btimelimit; /* time limit for excessive block use */
uint64_t dqb64_ftimelimit; /* time limit for excessive files */
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:
392 Hewlett-Packard Company − 2 − HP-UX 11i Version 3: February 2007