Skip Navigation Links | |
Exit Print View | |
![]() |
Sun QFS File System 5.3 Configuration and Administration Guide Sun QFS and Sun Storage Archive Manager 5.3 Information Library |
2. About the Master Configuration File
4. Configuring the File System
5. Configuring a Shared File System
6. Administering File System Quotas
Types of Quotas, Quota Files, and Quota Records
Guidelines for Setting Up Quotas
How to Configure a New File System to Use Quotas
How to Configure an Existing File System to Use Quotas
How to Assign Admin Set IDs to Directories and Files
How to Enable or Change Limits for Users, Groups, or Admin Sets Using an Existing Quota File
How to Change the Grace Period
Changing the Grace Period Expiration
Inhibiting Additional File System Resource Allocations
How to Inhibit Additional File System Resource Allocations
7. Advanced File System Topics
9. Configuring WORM-FS File Systems
11. Using QFS File Systems with SANergy (SAN-QFS)
You can change quotas to adjust the amount of disk space or number of inodes allocated to users. You can also remove quotas from users or from an entire file system.
See How to Enable or Change Limits for Users, Groups, or Admin Sets Using an Existing Quota File for instructions.
The following example retrieves information about group sam and shows that this group is over its soft limit.
# samquota -G sam /sam6 Online Limits Total Limits Type ID In Use Soft Hard In Use Soft Hard /sam6 Files group 101 32 2000 2000 32 2000 2000 Blocks group 101 41888* 40000 60000000 43208 60000000 60000000 Grace period 1w 1w ---> Online soft limits under enforcement (since 30s ago)
# samquota -U user-ID -t interval file # samquota -G group-ID -t interval file # samquota -A admin-ID -t interval file
The arguments for these commands are as follows:
user-ID is the numeric user ID or user name of the user whose quotas are being changed.
group-ID is the numeric group ID or the group name for the group of users whose quotas are being changed.
admin-ID is the numeric admin set ID of the administrator set whose quotas are being changed.
interval is the duration of the grace period. Specify an integer to indicate the quantity and specify a unit of time, if desired. The default unit is s, which indicates seconds. You can specify w for weeks, d for days, h for hours, or m for minutes.
file is the file system for the specified user, group, or admin set. The file argument can also be the name of any file in the file system. Typically, file is the name of the root directory of the file system.
Example 6-1 Changing the Grace Period
To change the grace period for user memil, first verify the quotas.
# samquota -U memil /sam6 Online Limits Total Limits Type ID In Use Soft Hard In Use Soft Hard /sam6 Files user 130967 4 500 750 4 500 750 Blocks user 130967 41016+ 40000 50000 41016 50000 50000 Grace period 3d 0s ---> Warning: online soft limits to be enforced in 2d23h59m7s
Shorten the grace period.
# samquota -U memil -t 1d /sam6
Verify the new quotas.
# samquota -U memil /sam6 Online Limits Total Limits Type ID In Use Soft Hard In Use Soft Hard /sam6 Files user 130967 4 500 750 4 500 750 Blocks user 130967 41016+ 40000 50000 41016 50000 50000 Grace period 1d 0s ---> Warning: online soft limits to be enforced in 23h58m31s
If a user has exceeded the soft quota limit, changing the grace period itself does not modify the expiration timer of any grace periods that have already started. If the grace period is already in effect, you can use the samquota command to modify the grace period in one of the following ways:
Clear the grace period timer. The next time the user allocates a file or block while still over a soft limit, the grace period timer is reset and the grace period restarts.
The following example shows the command used to clear the timer so it starts counting the next time a user in group sam attempts to allocate a block or file in /sam6.
# samquota -G sam -x clear /sam6 Setting Grace Timer: continue? y # samquota -G sam /sam6 Online Limits Total Limits Type ID In Use Soft Hard In Use Soft Hard /sam6 Files group 101 32 2000 2000 32 2000 2000 Blocks group 101 41888+ 40000 60000000 43208 60000000 60000000 Grace period 1w 1w ---> Warning: online soft limits to be enforced in 6d23h59m56s
Reset the grace period timer. When an expiration period is reset, the timer is reset and the grace period restarts. The following example resets the grace period.
# samquota -G sam -x reset /sam6 Setting Grace Timer: continue? y # samquota -G sam /sam6 Online Limits Total Limits Type ID In Use Soft Hard In Use Soft Hard /sam6 Files group 101 32 2000 2000 32 2000 2000 Blocks group 101 41888 40000 60000000 43208 60000000 60000000 Grace period 1w 1w ---> Warning: online soft limits to be enforced in 6d23h59m52s
Set the grace period to a value. The timer is set to a value, and it starts counting down immediately from that value. There are no restrictions on this value. The value can be larger than the grace period. The following example sets a very long expiration period.
# samquota -G sam -x 52w /sam6 Setting Grace Timer: continue? y # samquota -G sam /sam6 Online Limits Total Limits Type ID In Use Soft Hard In Use Soft Hard /sam6 Files group 101 32 2000 2000 32 2000 2000 Blocks group 101 41888+ 40000 60000000 43208 60000000 60000000 Grace period 1w 1w ---> Warning: online soft limits to be enforced in 51w6d23h59m54s
Expire the grace period timer. The timer is set to expire immediately. The following example expires the grace period.
# samquota -G sam -x expire /sam6 Setting Grace Timer: continue? y # samquota -G sam /sam6 Online Limits Total Limits Type ID In Use Soft Hard In Use Soft Hard /sam6 Files group 101 32 2000 2000 32 2000 2000 Blocks group 101 41888 40000 60000000 43208 60000000 60000000 Grace period 1w 1w ---> Online soft limits under enforcement (since 6s ago)
When the file system detects that quota values are not consistent for a user, group, or admin set, it prevents that user, group, or admin set from using any more system resources. You can inhibit file system resource allocations by creating inconsistent quota values. For example, you can inhibit further allocation if the hard block or file limits are lower than the soft block or file limits, or if a user's soft limit is larger than the user's hard limit.
The file system treats an inconsistent quota setting as a special quota. You can set inconsistent quota values into record zero of the user, group, or admin set ID quota files. They can then become the default values for new users, groups, or admin set IDs.
The following example shows how to retrieve current group quota information for group sam and write it to a backup file.
# samquota -G sam -e /sam6 | & tee restore.quota.sam # Type ID # Online Limits Total Limits # soft hard soft hard # Files # Blocks # Grace Periods # samquota -G 101 \ -f 2000:s:o -f 2000:h:o -f 2000:s:t -f 2000:h:t \ -b 40000:s:o -b 60000000:h:o -b 60000000:s:t -b 60000000:h:t \ -t 1w:o -t 1w:t \ -x 51w6d23h59m:o -x clear /sam6
To obtain quota information about a user quota, specify the -U user-ID option in place of the -G option. To obtain quota information about an admin set quota, specify the -A admin-ID option in place of the -G option.
The following command sets the quotas for group sam to be inconsistent.
# samquota -G sam -f 1:s -f 0:h -b 1:s -b 0:h /sam6
To make the quotas for users or admin sets inconsistent, specify the -U userID or-A adminID option in place of the -G option.
# samquota -G sam /sam6 Online Limits Total Limits Type ID In Use Soft Hard In Use Soft Hard /sam6 Files group 101 32! 1 0 32! 1 0 Blocks group 101 41888! 1 0 43208! 1 0 Grace period 1w 1w ---> Quota values inconsistent; zero quotas in effect.
In this output, a zero quota is in effect. The exclamation point characters (!) indicate the over-quota condition in the output.
The following example shows these commands.
# sh restore.quota.sam Setting Grace Timer: continue? y Setting Grace Timer: continue? y # samquota -G sam /sam6 Online Limits Total Limits Type ID In Use Soft Hard In Use Soft Hard /sam6 Files group 101 32 2000 2000 32 2000 2000 Blocks group 101 41888+ 40000 60000000 43208 60000000 60000000 Grace period 1w 1w ---> Warning: online soft limits to be enforced in 6d23h59m54s
To perform this operation on a user quota, specify the -U user-ID option in place of the -G option. To perform this operation on an admin set quota, specify the -A admin-ID option in place of the -G option.
To remove or disable quotas for a file system, disable quotas in the mount process.
As an alternative, you can specify noquota as an option when you issue the mount command. See Step 4.
# umount /myfs
For more information, see Unmounting File Systems in Sun QFS and Sun Storage Archive Manager 5.3 Installation Guide.
If you did not perform Step 2, include the noquota option with the mount command. For example:
# mount -o noquota /myfs
If you expect to reinstate the quota feature later and therefore do not want to destroy the quota files, unmount the file system, run the samfsck command with its -F option on the file system, and remount the file system with the noquota option removed.
If you do not expect to reinstate the quota feature or if you want to reclaim the space consumed by the quota files, use the rm command to remove the .quota_u, .quota_g, and .quota_a files. For example:
# rm /myfs/.quota_[agu]
For example:
# umount /myfs
If you have difficulty unmounting the file system, see Unmounting File Systems in Sun QFS and Sun Storage Archive Manager 5.3 Installation Guide.
The samfsck command updates records allocated in the quota files with correct, current usage information. For example:
# samfsck -F myfs
For example:
# mount /myfs