NAS NetApp Data ONTAP gestion quotas

De Wiki de Romain RUDIGER
Aller à : navigation, rechercher

Le fichier /vol/vol0/quotas

Syntaxe

Les quotas sont gérés dans un fichier à plat NAS:/vol/vol0/etc/quotas, voici les champs :

quota_target type[@/vol/dir/qtree_path] disk [files] [threshold] [soft_disk] [soft_files]
  • quota_target specifies an explicit qtree, group, or user to which this quota is being applied. An asterisk (*) applies this quota as a default to all members of the type specified in this entry that do not have an explicit quota.
  • type [@/vol/dir/qtree_path] specifies the type of entity (qtree, group, or user) to which this quota is being applied. If the type is user or group, this field can optionally restrict this user or group quota to a specific volume, directory, or qtree.
  • disk is the disk space limit that this quota imposes on the qtree, group, user, or type in question.
  • files (optional) is the limit on the number of files that this quota imposes on the qtree, group, or user in question.
  • threshold (optional) is the disk space usage point at which warnings of approaching quota limits are issued.
  • soft_disk (optional) is a soft quota space limit that, if exceeded, issues warnings rather than rejecting space requests.
  • soft_files (optional) is a soft quota file limit that, if exceeded, issues warnings rather than rejecting file creation requests.

Champ "quota_target"

  • Pour un qtree :

The quota target is the complete path name to an existing qtree (for example, /vol/vol0/home).

Champ "type"

  • For a tree :

-Explicit: tree -Default tree quota: tree@/vol/volume

Champ "disk"

The Disk field specifies the maximum amount of disk space that the quota target can use. The value in this field represents a hard limit that cannot be exceeded. The following list describes the rules for specifying a value in this field:

  • K is equivalent to 1,024 bytes, M means 220 bytes, and G means 230 bytes.

Note: The Disk field is not case-sensitive. Therefore, you can use K, k, M, m, G, or g.

  • The maximum value you can enter in the Disk field is 16 TB

Champ "files"

The Files field specifies the maximum number of files that the quota target can own. The value in this field represents a hard limit that cannot be exceeded. The following list describes the rules for specifying a value in this field:

  • K is equivalent to 1,024, M means 220, and G means 230. You can omit the K, M, or G. For example, if you type 100, it means that the maximum number of files is 100.

Note: The Files field is not case-sensitive. Therefore, you can use K, k, M, m, G, or g.

  • The maximum value you can enter in the Files field is 3GB, or
    • 4,294,967,295
    • 4,194,303K
    • 4,095M
    • 3G
  • The value cannot be specified in decimal notation.
  • If you want to track the number of files but do not want to impose a hard limit on the number of files that the quota target can use, type a hyphen (-). If the quota target is root, or if you specify 0 as the UID or GID, you must type a hyphen.
  • A blank in this field means there is no restriction on the number of files that the quota target can use. If you leave this field blank, you cannot specify values for the Threshold, Soft Disk, or Soft Files fields.
  • The Files field must be on the same line as the Disk field. Otherwise, the Files field is ignored.

Champ "threshold"

The Threshold field specifies the disk space threshold. If a write causes the quota target to exceed the threshold, the write still succeeds, but a warning message is logged to the storage system console and an SNMP trap is generated. Use the Threshold field to specify disk space threshold limits for CIFS. The following list describes the rules for specifying a value in this field:

  • The use of K, M, and G for the Threshold field is the same as for the Disk field.
  • The maximum value you can enter in the Threshold field is 16 TB, or
    • 16,383G
    • 16,777,215M
    • 17,179,869,180K

Note: If you omit the K, M, or G, Data ONTAP assumes the default value of K.

  • The value cannot be specified in decimal notation.
  • The Threshold field must be on the same line as the Disk field. Otherwise, the Threshold field is ignored.
  • If you do not want to specify a threshold limit on the amount of disk space the quota target can use, enter a hyphen (-) in this field or leave blank.

Note: Threshold fields can appear incorrect in quota reports if you do not specify threshold limits as multiples of 4 KB. This happens because threshold fields are always rounded up to the nearest multiple of 4 KB to match disk space limits, which are translated into 4-KB disk blocks.

Champ "soft_disk"

The Soft Disk field specifies the amount of disk space that the quota target can use before a warning is issued. If the quota target exceeds the soft limit, a warning message is logged to the storage system console and an SNMP trap is generated. When the soft disk limit is no longer being exceeded, another syslog message and SNMP trap are generated.

The following list describes the rules for specifying a value in this field:

  • The use of K, M, and G for the Threshold field is the same as for the Disk field.
  • The maximum value you can enter in the Soft Disk field is 16 TB, or
    • 16,383G
    • 16,777,215M
    • 17,179,869,180K
  • The value cannot be specified in decimal notation.
  • If you do not want to specify a soft limit on the amount of disk space that the quota target can use, type a hyphen (-) in this field (or leave this field blank if no value for the Soft Files field follows).
  • The Soft Disk field must be on the same line as the Disk field. Otherwise, the Soft Disk field is ignored.

Note: Disk space fields can appear incorrect in quota reports if you do not specify disk space limits as multiples of 4 KB. This happens because disk space fields are always rounded up to the nearest multiple of 4 KB to match disk space limits, which are translated into 4-KB disk blocks.

Champ "soft_files"

The Soft Files field specifies the number of files that the quota target can use before a warning is issued. If the quota target exceeds the soft limit, a warning message is logged to the storage system console and an SNMP trap is generated. When the soft files limit is no longer being exceeded, another syslog message and SNMP trap are generated.

The following list describes the rules for specifying a value in this field.

  • The format of the Soft Files field is the same as the format of the Files field.
  • The maximum value you can enter in the Soft Files field is 4,294,967,295.
  • The value cannot be specified in decimal notation.
  • If you do not want to specify a soft limit on the number of files that the quota target can use, type a hyphen (-) in this field or leave the field blank.
  • The Soft Files field must be on the same line as the Disk field. Otherwise, the Soft Files field is ignored.

Exemples

#quota_target type[@/vol/dir/qtree_path] disk [files] [threshold] [soft_disk] [soft_files]

#Quota d'espace disk sur le tree appl du qtree WWOAPRD :
/vol/WWOAPRD/appl   tree   25g - - - -
#Le tree smith est limité à 500 Mo et 15360 fichiers :
/vol/users/smith    tree   500m 15K - - -

Activer, réinitialiser, désactiver et mettre à jour les quotas

Activer :

#syntax:
quota on [-w] vol_name
# The -w option causes the command to return only after the entire /etc/quotas file has been scanned (synchronous mode). This is useful when activating quotas from a script.
#
#Exemple:
quota on vol2

Réinitialiser :

#disable quota on a volume
quota off vol_name
#enable quota on a volume
quota on vol_name

Désactiver :

#disable quota on a volume
quota off vol_name

Mettre à jour les quotas après avoir modifier le fichier etc/quotas:

quota resize vol_name

Rapport des quotas

Syntaxe de la commande :

# for all volumes:
quota report [-q] [-s] [-t] [-v] [-u|-x]
# for a specified path:
quota report [-s] [ -u | -x ] [ -t ] [-q] path_name

Les options :

Option Result
none Generates the default quota report.

The ID field

The ID field displays one of the IDs using the following formats:

  • For a Windows name, the first seven characters of the user name with a preceding backslash are displayed. The domain name is omitted.
  • For a SID, the last eight characters are displayed.

The Quota Specifier field

The Quota Specifier field displays an ID that matches the one in the ID field, using the same format as the /etc/quotas file entry.

Note: For more information, see Example ID and Quota Specifier field values.

-q Displays the quota target's UNIX UID, GID or Windows SID in the following formats:
  • UNIX UIDs and GIDs are displayed as numbers.
  • Windows SIDs are displayed as text.

Note: Data ONTAP does not perform a lookup of the name associated with the target ID.

-s The soft limit (S-limit) columns are included.
-t The threshold (T-hold) column is included.
-v The vFiler column is included.

Note: This format is available only if MultiStore is licensed.

-u

Displays multiple IDs for your quota targets. The ID field

The ID field displays all the IDs listed in the quota target of a user quota in the following format:

  • On the first line, the format is the same as the default format.
  • Each additional name in the quota target is displayed on a separate line in its entirety.

The Quota Specifier field

The Quota Specifier field displays the same list of IDs as specified in the quota target.

Note: You cannot combine the -u and -x options.

For more information, see Example ID and Quota Specifier field values.

-x Displays all the quota target's IDs on the first line of that quota target's entry, as a comma separated list.

Note: You cannot combine the -u and -x options.

The threshold column is included.

Source