Operating system version:
testterm1:/#oslevel-R
5300-00
Disk quota system, which is based on the Berkeley disk quota system and provides an effective way to control the use of disk space. Define a quota system for individual users or groups, and maintain a quota system for each type of file system.
The disk quota system establishes quotas based on the following parameters, which can be changed using the Eduqota command:
. Soft limit for user or group
. Hard limit for user or group
. Limit width of delay between
1. Enable user and group quotas for a file system, using the CHFS command. (This article takes the/home file system as an example)
testterm1:/#chfs-A "Quota=userquota,groupquota"/home
The above command essentially adds a quota field to the/home file System Definition section in the/etc/filesystems file, the following red section:
/home:
dev =/dev/hd1
VFS = JFS
Log =/dev/hd8
Mount = True
Check = True
vol. =/home
Free = False
Quota = Userquota,groupquota
2. Specify disk quota file name
The Quota.user and Quota.group file names are the default names and are located in the root directory of the applied disk quota file system.
testterm1:/#chfs-A "userquota=/home/myquota.user"-A "groupquota=/home/myquota.group"/home
The above command essentially adds the UserQuota and Groupquota fields in the/home file System Definition section in the/etc/filesystems file, the following red section:
/home:
dev =/dev/hd1
VFS = JFS
Log =/dev/hd8
Mount = True
Check = True
vol. =/home
Free = False
Quota = UserQuota
UserQuota =/home/myquota.user
Groupquota =/home/myquota.group
3. Generate disk Quota file
Testterm1:/home#quotacheck-a-V
Checking user and group quotas FOR/DEV/HD1 (/home)
Creating quota File/home/myquota.user
/home:root fixed:inodes 0-> 784 blocks 0-> 2100834
/home:bin fixed:inodes 0-> 1 blocks 0-> 1
/home:guest fixed:inodes 0-> 1 blocks 0-> 1
/home:netinst fixed:inodes 0-> blocks 0-> 57
/home:hlrterm fixed:inodes 0-> 493 blocks 0-> 42386
/home:quan fixed:inodes 0-> 2 blocks 0-> 2
/home:1000 fixed:inodes 0-> blocks 0-> 1234
/home:4050-109 User ID 4294967294 (nobody) is too large, quotas are not maintained
Creating quota File/home/myquota.group
/home:system fixed:inodes 0-> 787 blocks 0-> 2100853
/home:staff fixed:inodes 0-> blocks 0-> 58
/home:bin fixed:inodes 0-> 1 blocks 0-> 1
/HOME:USR fixed:inodes 0-> 1 blocks 0-> 1
/home:hlrterm fixed:inodes 0-> 490 blocks 0-> 42368
/home:513 fixed:inodes 0-> blocks 0-> 1234
/home:4050-109 User ID 4294967294 (nobody) is too large, quotas are not maintained
The Myquota.user and myquota.group two files are generated at this point in the/home file system root:
Testterm1:/home#ls-l/home/myquota*
-rw-r-----1 root system 16448 Aug 22:15/home/myquota.group
-rw-r-----1 root system 32032 Aug 22:15/home/myquota.user
Be sure to execute the quotacheck-a-v command each time you modify the quota configuration.