PRIMECLUSTER Global File Services Configuration and Administration Guide 4.2 (Solaris(TM) Operating Environment) |
Contents Index |
Part 3 Global File Services Shared File System | > Chapter 22 File System Operations (Command) | > 22.3 Changes (in quota function status) |
This section explains how to set the quota function. Set the quota function as follows:
1. Create the quotas file
2. Set user limit values
3. Copy user limit values
4. Set user limit time
The quota function can only be set during mount operations.
As a super user, create a quotas file with touch(1) in the root directory of the GFS Shared File System that uses the quota function. Set the quotas file access right with chmod(1) to rw-------. The following example shows a quotas file created in the mount point /sfcfs directory.
# touch /sfcfs/quotas # chmod 0600 /sfcfs/quotas
For details on touch(1) and chmod(1), see touch(1) and chmod(1) of the "Solaris X Reference Manual Collection."
For the procedure for restoring and creating a quotas file that is backed up, see Section 24.6, "Backing up and Restoring User Limit Values of the quota function."
To set user limit values, use sfcedquota(1M). An example of setting a limit value for user1 is provided below.
For details on sfcedquota(1M), see Appendix F.2.6, "sfcedquota(1M)."
# sfcedquota user1
When the above example is executed, the editor displays the contents shown below. Change the limit values whose initial values are 0 to the desired values.
fs /sfcfs blocks (soft = 0, hard = 0) inodes (soft = 0, hard = 0)
blocks: Specify the limit value for the number of blocks (in kilobytes).
inodes: Specify the limit value for the number of files (including directories).
soft: Specify a soft limit value (for issuing a warning message).
hard: Specify a hard limit value (actual limit value).
The following example shows that the limit for the number of usable blocks is less than 5 megabytes (warning for 3 megabytes) and the limit for the number of creatable files is 99 (warning for 80).
fs /sfcfs blocks (soft = 3072, hard = 5120) inodes (soft = 80, hard = 100)
To copy limit values set for user1 to another user, use the -p option of sfcedquota(1M). The following example shows that how to copy a limit value set for user1 to user2 and user3.
# sfcedquota -p user1 user2 user3 ----- ----------- | | | +-- User name of the copy destination | +-- User name of the copy source
To set the user limit time, use the -t option of sfcedquota(1M). This setting is intended for all users other than super users. Assume that the soft limit value of a user's limit value is less than or equal to the hard limit value. In this case, a limit time that is equal to or greater than the soft limit value is validated. A user can only perform allocation during this limit time until the maximum hard limit even if the soft limit value is exceeded. The default of the limit time is one week. An example of setting a user limit time is provided below.
# sfcedquota -t
When the above example is executed, the editor displays the contents listed below. Change the limit times whose initial values are 0.
fs /sfcfs blocks time limit = 0 (default),files time limit = 0 (default)
Default "0" indicates one week. Specify the unit following a number. The usable units are month, week, day, hour, min, and sec.
The following example shows that the limit time for the number of blocks is set to two weeks and the limit time for the number of files is set to 16 days:
fs /sfcfs blocks time limit = 2 week, files time limit = 16 day
Contents Index |