JavaScript is required to for searching.
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
search filter icon
search icon

Document Information

Preface

1.  File System Overview

2.  About the Master Configuration File

3.  mcf File Examples

4.  Configuring the File System

5.  Configuring a Shared File System

6.  Administering File System Quotas

About File System Quotas

Types of Quotas, Quota Files, and Quota Records

Soft Limits and Hard Limits

Disk Blocks and File Limits

Enabling Quotas

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

Setting Infinite Quotas

Enabling Default Quota Values

Enabling Limits

How to Enable or Change Limits for Users, Groups, or Admin Sets Using an Existing Quota File

Checking Quotas

Changing and Removing Quotas

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

How to Remove the Quotas for a File System

How to Correct Quotas

7.  Advanced File System Topics

8.  SMB Service in SAM-QFS

9.  Configuring WORM-FS File Systems

10.  Tunable Parameters

11.  Using QFS File Systems with SANergy (SAN-QFS)

12.  Mount Options in a Shared File System

13.  Using the samu Operator Utility

About File System Quotas

File system quotas control the amounts of online and total disk space that can be consumed by a specific user, by a group of users, or by a site-determined group of users called an admin set.

Quotas help control the size of a file system by limiting the amount of space and the number of inodes that each user can consume. Quotas can be especially useful on file systems that contain user home directories. After quotas are enabled, you can monitor usage and adjust the quotas as needs change.

A file system provides a user with blocks for data and inodes for files. Each file uses one inode, and file data is stored in a disk allocation unit (DAU). DAU sizes are determined at the time the file system is created. Quotas account for disk usage in multiples of 512 bytes.

Types of Quotas, Quota Files, and Quota Records

You can set quotas according to user ID, group ID, or an administrator's site-specific grouping. This site-specific grouping is called an admin set ID. You can use an admin set ID, for example, to identify a collection of users working on a project for which file system quotas are imposed.

Quotas are enabled when the quota mount option is in effect and the system detects the presence of one or more quota files in the file system's root directory. The quota mount option is enabled by default. If you mount the file system with noquota in effect, quotas are disabled. For more information about mount options, see the mount_samfs(1M) man page.

Each quota file contains a sequence of records. Record zero is the record for the system administrator's quotas and resource usage. System administrator quotas are never enforced, but you can use any record, including the system administrator's record, as a template for subsequent records in the quota file. For more information about this practice, see How to Enable or Change Limits for Users, Groups, or Admin Sets Using an Existing Quota File.

Record one is the record in the quota file for user one, group one, or admin set ID one, depending on the type of quota file. You can edit record one and all subsequent records in order to set different quotas for different users. The following table shows the quota file names and the quotas they enable in /root.

Table 6-1 Quota File Names

Quota File Name
Quota Type
.quota_u
UID (system user ID)
.quota_g
GID (system group ID)
.quota_a
AID (system admin set ID)

You can set default quota limits for users by editing record zero in the quota file and having those used as the initial quota settings for all other users. By default, if user quota limits have not been set specifically, the system uses the values in record zero.

Each quota file requires 128 bytes of space. To calculate the necessary size for the initial zero quota file, use the following formula:

(*highest-ID* + 1) x 128 = xx / 4096 = zero quota file size

Soft Limits and Hard Limits

You can set both soft and hard limits. A hard limit specifies a fixed amount of system resources available for use, which the system never allows a user to exceed. A soft limit specifies a level of system resource use that can be exceeded temporarily, up to the hard limit. The soft limit is never larger than the hard limit.

If a user attempts to allocate resources beyond the hard limit, the operation fails and generates an EDQUOT error.

After a user exceeds a soft limit, a timer starts, and the user enters a grace period. While the timer is ticking, the user is allowed to operate above the soft limit. After the user goes below the soft limit, the timer is reset. If the grace period ends and the timer stops without the user's having gone below the soft limit, the soft limit is then enforced as a hard limit.

For example, assume that a user has a soft limit of 10,000 blocks and a hard limit of 12,000 blocks. If the user's block usage exceeds 10,000 blocks and the timer exceeds the grace period, this user is no longer able to allocate more disk blocks on that file system until usage drops below the 10,000-block soft limit.

As administrator, you can use the samquota command to set the timer value. The squota command is a user version of the samquota command. The squota user command contains options that users can specify to obtain information about quotas that pertain to them.

Disk Blocks and File Limits

A user could exceed an inode quota without using any blocks by creating all empty files. A user could also use only one inode and still exceed the block quota by creating a file that is large enough to consume all data blocks in the user's quota.

File system quotas are expressed in terms of the number of 512-byte blocks that a user can allocate. However, disk space is allocated to user files in terms of DAUs. The DAU setting is specified by the -a allocation-unit option to the sammkfs command. Setting a block quota to a multiple of the file system DAU is preferable. Otherwise, users can allocate only up to the block count, rounded down to the nearest DAU. See Enabling Default Quota Values for instructions on setting block quotas.