j2edlimit Command
Purpose
Manages quota Limits Classes for JFS2 file systems.
Syntax
To edit Quota Limits Classes:
j2edlimit [ -e ] [ -u | -g ] Filesystem
To list Quota Limits Classes:
j2edlimit -l [ -u | -g ] Filesystem
To Set an Existing Limits Class as the Default Limits Class:
j2edlimit -d LimitsClassID [ -u | -g ] Filesystem
To Assign a User or Group to a Limits Class:
j2edlimit -a LimitsClassID [ -u UserName | -g GroupName ] Filesystem
Description
Quotas are managed in JFS2
file systems through the use of Limits Classes. Each Limits Class
has hard and soft limits for disk space and file, and grace periods
for exceeding the soft limits. Individual users and groups may be
assigned to a Limits Class and are then subject to the quotas defined
by that class. Any user or group not assigned to a class is subject
to the quotas defined by the default class (Class ID 0). Quota limits
for all users or groups in a particular class can be changed by using j2edlimit to
modify the Limits Class, without having to change or duplicate quotas
for each user or group. By default, or when used with the -e flag,
the j2edlimit command edits the User Limits
Classes for the file system specified on the command line. When used
with the -g flag, the j2edlimit command
edits the Group Limits Classes for the specified file system. The
command creates a temporary file that contains the file system's current
limits classes, then invokes the vi editor
(or the editor specified by the EDITOR environment variable) on the
temporary file so that the limits classes can be added and modified.
When the editor is exited, the command reads the temporary file and
modifies the binary quota files to reflect any changes.
Note: If
you specify an editor in the EDITOR environment variable, you must
use the full pathname of the editor.
Fields displayed
in the temporary file are:
- Block Hard Limit
- The total amount of 1KB blocks the user or group will be allowed to use, including temporary storage during a quota grace period.
- Block Soft Limit
- The number of 1KB blocks the user or group will be allowed to use during normal operations.
- File Hard Limit
- The total number of files the user or group will be allowed to create, including temporary files created during a quota grace period.
- File Soft Limit
- The number of files the user or group will be allowed to create during normal operations.
- Block Grace Period
- Amount of time a user can exceed the Block Soft Limit before it becomes enforced as a hard limit.
- File Grace Period
- Amount of time a user can exceed the File Soft Limit before it becomes enforced as a hard limit.
Note:
- A hard limit with a value of 1 indicates that no allocations are permitted. A soft limit with a value of 1, in conjunction with a hard limit with a value of 0, indicates that allocations are permitted only on a temporary basis. Hard or soft limits can be specified in kilobytes (the default), megabytes, or gigabytes.
- A user can exceed established soft limits for the length of the corresponding grace period. Upon expiration of the grace period, the soft limit is enforced as a hard limit. The grace period can be specified in days, hours, minutes, or seconds. A value of 0 indicates that the default grace period is imposed; a value of 1 second indicates that no grace period is granted.
- After changing a grace period using the j2edlimit command, users who have already reached their old grace period must reduce their file system usage to a level below their soft limits in order to use the new grace period. In the future, when these users exceed their soft limits, the new grace period will be in effect.
Flags
Item | Description |
---|---|
-a | Assigns the User or Group specified by the -u or -g flag to the indicated Limits Class in the file system specified on the command line. |
-d | Sets the indicated Limits Class as the default for the file system specified on the command line. By default, or with the -u flag, the default is set for User quotas. With the -g flag, the default is set for Group quotas. |
-e | Edits the Limits Classes for the file system specified on the command line (this is the default operation for the j2edlimit command). By default, or with the -u flag, the default is set for User quotas. With the -g flag, the default is set for Group quotas. |
-g | When used with the -d, -l
or optional -e flag, performs the operation on the Group Limits Classes
for the file system specified on the command line. When used with the -a
flag, assigns the associated Group to the specified Limits Class. Note: If the parameter contains
all numbers then it will be treated as a Group ID, and the Group ID will be assigned to the Limits
Class.
|
-l | Lists the Limits Classes for the file system specified on the command line. By default, or with the -u flag, User limits classes are listed. With the -g flag, Group limits classes are listed. The format of the listing is the same as found in the temporary file when editing Limits Classes. |
-u | When used with the -d, -l or
optional -e flag, performs the operation
on the User Limits Classes for the file system specified on the command
line. When used with the -a flag, assigns
the associated User to the specified Limits Class. Note: If the parameter
contains all numbers then it will be treated as a User ID, and the
User ID will be assigned to the Limits Class.
|
Security
Access Control: Only the root user can execute this command.
Attention RBAC users and Trusted AIX users: This command can perform privileged operations. Only privileged users can run privileged
operations. For more information about authorizations and privileges, see Privileged Command
Database in Security. For a list of privileges and the
authorizations associated with this command, see the lssecattr command or the
getcmdattr subcommand.
Examples
- To edit User Limits Classes for the /home file
system:
j2edlimit /home
- To list Group Limits Classes for the /home file
system:
j2edlimit -l -g /home
- To set User Limits Class ID 2 as the default for the /foo file
system:
j2edlimit -d2 /foo
- To assign user markg to Limits Class ID 1 in the /home file system:
j2edlimit -a 1 -u markg /home
Files
Item | Description |
---|---|
quota.user | Contains usage and Limits information for users. |
quota.group | Contains usage and Limits information for groups. |
/etc/filesystems | Contains file system names and locations. |