Tertiary Manager Quotas
Note: This feature is only supported using the CLI.
The quota system of the StorNext Tertiary Manager supports tracking and limiting the use of tertiary storage. When enabled, the quota system maintains running totals of storage usage in database records. Records are kept for all the permutations of consumers and storage resources. Quota definitions allow the system to reference the database to determine when limits have been reached. Automatic notifications may be sent to the administrator. Reports allow the administrator to view the status of quotas. Administrative tools support the remediation of storage-usage concerns.

The quota system has three types of consumers, three types of resources, and three types of limits.
Consumers are:
- System Users
- System Groups
- Quota-system Projects
Resources are:
- Managed File Systems
- Storage-media Identifier (ID)
- Storage-media Type
Limits are a number of bytes and are:
- Soft (warning)
- Hard (blocking)
- Soft for a grace period (warning during the grace period, then blocking)
Consumer users and groups are the operating-system users and groups. Consumer projects are administrator-defined sets of directories. Any number of directories may be added to a project.
Note: This is a notable difference versus the StorNext File System Quota single-directory Directory Quota Name Space.
Every sub directory of a project directory is automatically added to the project. Directories cannot be in more than one project.
Resources vary according to the configuration of each StorNext system metadata controller (MDC). All three types exist for every system, but their values, such as file-system name, are configured on the MDC. The set of media-type values is fixed, but the values that exist for a system is also configured on the MDC. The set of managed file systems is in the /usr/adic/TSM/config/filesystems file. The set of storage-media IDs can be viewed with the fsmedlist command. The set of storage-media types can be viewed with the vsmedtypeqry command.
Limits are specified as a number of bytes, and grace periods are specified as a number of seconds.
- A consumer that has less storage than the soft limit has the status: good.
- A consumer that has more storage than the soft limit and less storage than the hard limit has the status: grace.
- A consumer that has more storage than the soft limit for longer than the grace period has the status: exceeded.
- A consumer that has storage at or above the hard limit has the status: exceeded.
- When the hard limit is reached, further store operations for that consumer's quota are blocked.
- When the soft limit is reached, store operations continue to succeed until the soft limit has been exceeded for longer than a quota-defined grace period.
The quota system does not guarantee that quota status is up to date at all times. When storage operations are made, updates are scheduled for asynchronous completion. This is done for the performance and efficiency of the Tertiary Manager as a whole. When the quota system is not up to date, it is possible that hard limits can be exceeded.
When remediating exceeded-limit issues, the fsrmversions command removes all copies of the selected versions for the affected files.

Projects are collections of directories and are created with the smproject command. When a directory is assigned to a project, all of its sub directories are assigned to that project. When a new directory is created in a project directory after the smproject command has finished, the new directory is automatically assigned to the project.
Although projects are defined by collections of directories, it is the file copies that are tracked. So, listing projects with the smproject -l displays the top-level directories and directories that contain files having stored copy versions. The other directories in the hierarchy below the top-level directories are not listed until they have files with stored copy versions.

Quota definitions are the mechanism for enforcing limits on tertiary-storage usage. They provide information to compute usage data with database queries on the tracking tables and compare that with usage limits. A quota definition comprises:
- Quota Name
- Consumer Type (user, group, or project)
- Optional single values for
- Consumer
- Media ID
- Media Type
- File System name
- Hard Limit Value
- Soft Limit Value
- Grace Period Value
When an optional value for consumer, media ID, media name, or file system is not specified, all values for that field are selected with the database query. The non-specific attribute is referred to as <any> for consumers or resource. When evaluating if a set of copies can be created for a file that has been updated, there may be several quota definitions that apply. For example, the file could match quota definitions for eight permutations of a specific consumer or <any> and sixteen permutations of specific resources or <any>. The most-restrictive quota definition is used to determine if a threshold has been exceeded and file copies cannot be created. Quantum recommends you limit the number of permutations for reasons of understandability and performance.
Grace-period values are specified in seconds with an optional multiplier suffix for convenience.
The suffixes are:
- - s (1x)
- - m (60x)
- - h (3600x)
- - d (86,400x)
- - w (604,800x = 7 days)
- - M (2,592,000 = 30 days)
- - y (31,536,000 = 365 days)
Note: You cannot use the Media ID resource for individual tape media, hard limits, or soft limits with grace periods.

Tracking of tertiary-storage usage is done with records in a collection of StorNext database tables.
There are tables for each of the types of consumers:
- Projects in total and by directory paths
- Users
- Groups
Within each of these tables are fields for the tracked resources:
- File System
- Media Type
- Media ID
These tables are updated periodically in batches for efficiency. Other tables track the pending updates.
Tracking can be enabled and disabled per file system through the smusage command:
- The -e option enables tracking of all managed file systems.
- The -r option disables tracking of all managed file systems.
- The -f option can be used to limit the enabling or disabling to a single managed file system. When the command is enabling tracking, the command may finish before the tables are fully updated.
- The -c option can be used to check the status of tracking for all file systems or for a single file system if the -f option is used.

When an allocation of storage is needed to create a file-copy version, the tracking tables are queried to get current usage amounts according to the quota definitions. Current usage is evaluated based on the file copy’s project, user, and group consumer values and for its file system, media type, and media ID resource values. When any of the related quota definitions’ hard limits has been exceeded or any of the soft limits has been exceeded for longer than their grace periods, that quota definition has the exceeded status and the allocation is not allowed. Otherwise, the allocation is allowed if all the related quota definitions have the good status or some of them are in grace status.
Storage allocations may be allowable for some file copies and not allowable for others. In this case, none of the allocations is allowed and there would be no Tertiary Manager copies for the current version of the file. Quota-definition statuses can be viewed at any time by using the -r option to the smquota command. When any of the quota-definition statuses is exceeded, steps should be taken quickly to remediate the issues.

Quota definition statuses can be restored to good status in several ways.
- The hard and soft quota limits and the grace period can be increased as needed.
- The fsrmversions command can be used to remove file copy versions that are inactive. The command has a set of filters for selecting copy-version candidates for removal and a set of qualifiers to regulate the removal operations. The command will not remove active copies, which may be the only copy of a file’s data if the disk copy is truncated.
-
The fsclean command may also be used to remove inactive copies. It is run as a scheduled process by the fsschedule daemon. The fsclean command can also be used to remove active copies in cases where files have been removed from the file system name space.
Caution: This makes the files unrecoverable.

Reports can be produced each time the quota daemon runs if a quota-definition status is in or beyond the configured minimum quota-status level. There are four levels:
- Good
- Grace (or soft)
- Exceed (or hard)
- None
One of these is selected by the QUOTA_DAEMON_NOTIFY_STATUS_THRESHOLD system parameter, and the default setting is exceed. When a report is produced, it is sent as a StorNext alert message to the administrator’s configured e-mail address.
The system will not send another report for the same quota definition level until a configured number of seconds has elapsed, which is the QUOTA_DAEMON_NOTIFY_STATUS_INTERVAL system parameter and the default setting is 86400 seconds (one day).
Full quota-system reports are also produced by the quota_report feature of the fsschedule Tertiary Storage scheduler subsystem. Production of these reports is controlled by configurable quota-status levels. They can be sent as a system-alert e-mail and also written to files organized by date under the /usr/adic/TSM/reports file-system path.
- The QUOTA_FEATURE_FILE_STATUS_THRESHOLD system parameter controls the production of report files, and its default setting is good.
- The QUOTA_FEATURE_NOTIFY_STATUS_THRESHOLD system parameter controls the production of system-alert reports, and its default setting is grace.

The Tertiary Manager quota system is a standard feature of StorNext that is automatically installed on new systems and upgraded systems. The USAGE_TRACKING system parameter enables the quota system. It is off (false) by default for new systems and is off (false) by default for upgraded systems. When it is enabled, fully updating the tracking tables may take a substantial amount of time. The Tertiary Manager subsystem must be stopped during the transition from disabled to enabled quotas. This ensures that production cannot be severely impacted by the sudden increase in database activity that can occur.
Note: If you enable USAGE_TRACKING, small file store performance might be impacted by approximately 5% due to the increased tracking activity being done.

The following system parameters control operations of the Tertiary Manager quota system. Their effects and default values are described in the /usr/adic/TSM/config/fs_sysparm.README file. Their values can be changed in the /usr/adic/TSM/config/fs_sysparm_override file.

The Tertiary Manager quota system can be enabled or disabled by the setting of this parameter. Its default setting is false (false) for new StorNext systems and false (off) for systems upgraded to StorNext 6.2 (or later).
Note: If you enable USAGE_TRACKING, small file store performance might be impacted by approximately 5% due to the increased tracking activity being done.

The frequency of repeating real-time reports for the same quota definition level is regulated by this system parameter. Its default setting is 86400 seconds (one day).

When the quota daemon runs, a real-time report is generated if a quota-definition status is in or beyond the minimum quota-status level configured with this parameter.
There are four levels:
- Good
- Grace (or soft)
- Exceed (or hard)
- None
When a report is produced, it is sent as a StorNext alert message to the administrator’s configured e-mail address. The default setting for this parameter is exceed.

When the fsschedule subsystem runs its quota_report feature, a full quota-system report file is produced if a quota definition is at or beyond the quota-status level configured by this parameter. The files are organized by date under the /usr/adic/TSM/reports file-system path.
There are four levels:
- Good
- Grace (or soft)
- Exceed (or hard)
- None
The default setting for this parameter is good.

When the fsschedule subsystem runs its quota_report feature, a full quota-system report system-alert e-mail is produced if a quota definition is at or beyond the quota-status level configured by this parameter.
There are four levels:
- Good
- Grace (or soft)
- Exceed (or hard)
- None
The default setting for this parameter is grace.
See the smquota(1) command in the StorNext 6 MAN Pages Reference Guide for additional information.