+ All Categories
Transcript

7/27/2019 D7ADM Module 10 Quotas

http://slidepdf.com/reader/full/d7adm-module-10-quotas 1/43

D7ADM

Module 10 NAS Management

7/27/2019 D7ADM Module 10 Quotas

http://slidepdf.com/reader/full/d7adm-module-10-quotas 2/43

DOT Quotas

• Quotas provide a way to restrict or track the disk space and number of 

files used by a user, group, or qtree. Quotas are specified using the

/etc/quotas file, and are applied to a specific volume or qtree.

• Why you use quotas 

You can use quotas to limit resource usage, to provide notification when

resource usage reaches specific levels, or simply to track resource usage.

• Overview of the quota process 

Quotas can cause Data ONTAP to send a notification (soft quota) or to

prevent a write operation from succeeding (hard quota) when quotas are

exceeded.

• Quota targets and types 

Quota targets determine whether a quota operates on a user, group, or

qtree; targets determine the quota type.

7/27/2019 D7ADM Module 10 Quotas

http://slidepdf.com/reader/full/d7adm-module-10-quotas 3/43

Why Use Quotas

• Limit resource usage, to provide notification

when resource usage reaches specific levels, or

simply to track resource usage.

 – Limit the amount of disk space or the number of filesthat can be used by a user or group, or that can be

contained by a qtree

 – Track the amount of disk space or the number of files

used by a user, group, or qtree, without imposing a

limit

 – Warn users when their disk usage or file usage is high

7/27/2019 D7ADM Module 10 Quotas

http://slidepdf.com/reader/full/d7adm-module-10-quotas 4/43

Quota Process

• DOT can send notification (soft quota) or prevent a write operationfrom succeeding (hard quota) when quotas are exceeded.

• When DOT receives a request to write to a volume, it checks to seewhether quotas are activated for that volume.

• If so, DOT determines whether any quota for that volume (if written

to qtree) would be exceeded by performing the write operation.• If any hard quota would be exceeded, the write operation fails, and

a quota notification is sent.

• If any soft quota would be exceeded, the write operation succeeds,and a quota notification is sent.

•About quota notifications Quota notifications go to the console and the /etc/messages file.You can also configure SNMP traps to be triggered when a quota isexceeded.

7/27/2019 D7ADM Module 10 Quotas

http://slidepdf.com/reader/full/d7adm-module-10-quotas 5/43

Effect of Setting Quotas

• Hard quotas (Disk and Files fields) impose a hardlimit on system resources; any operation thatwould result in exceeding the limit fails.

• Soft quotas (Threshold, Soft Disk and Soft Filesfields) sends warning when users reach a certainresource level without affecting their data access,so you can take appropriate action before thequota is exceeded.

• Threshold quotas (quotas specified using theThreshold field) are equivalent to quotasspecified using the Soft Disk field.

7/27/2019 D7ADM Module 10 Quotas

http://slidepdf.com/reader/full/d7adm-module-10-quotas 6/43

Quota File (to enable quotas)

• /etc/quota contains one or more entries

specifying limit or tracking quotas for qtrees,

groups, and users.

• The file can contain default (general) and specific

entries.

• The syntax of quota entries 

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

• Fields are separated by space characters or tabs.

7/27/2019 D7ADM Module 10 Quotas

http://slidepdf.com/reader/full/d7adm-module-10-quotas 7/43

Syntax of Quotas

7/27/2019 D7ADM Module 10 Quotas

http://slidepdf.com/reader/full/d7adm-module-10-quotas 8/43

Quota Targets

QuotaTarget QuotaType How Target Represented Notes

User User

quota

• UNIX user name or UID

• File or directory whose UID matches the user

• Windows user name in pre-Windows 2000 format

or Windows SID

File or directory with an ACL owned by the user'sSID

User quotas can be

applied for a specific

volume or qtree.

Group Group

quota

• UNIX group name or GID

• File or directory whose GID matches the group

Unix group quotas can

be applied for a

specific volume or

qtree.

Qtree Qtree

quota

• path name to the qtree

• vol/vol1/qtree2

Applied to a volume

without affect on

qtrees in other

volumes.

* Default

Quota

A quota target of * denotes a default quota. Quota

type is determined by the value of the type field.

Applied to users,

groups or qtrees.

7/27/2019 D7ADM Module 10 Quotas

http://slidepdf.com/reader/full/d7adm-module-10-quotas 9/43

How DOT Reads Quota File

• An entry in the quotas file can extend to multiple lines.However, the Files, Threshold, Soft Disk, and Soft Files fieldsmust be on the same line as the Disk field; otherwise, they areignored.

• If you do not want to specify a value for a field in the middleof an entry, you can use a dash (-).

• Any text after a pound sign (#) is considered to be a comment.

• Entries in the quotas file can be in any order.

• After DOT receives a write request, it grants access only if the

request meets the requirements specified by all quotasentries.

• If a quota target is affected by several quotas file entries, themost restrictive entry applies.

7/27/2019 D7ADM Module 10 Quotas

http://slidepdf.com/reader/full/d7adm-module-10-quotas 10/43

DOT Quotas (cont’d) 

• Special kinds of quotas You use default, explicit, derived and tracking quotas to managedisk usage in the most efficient manner.

• How quotas work with users and groups When you specify a user or group as the target of a quota, the

limits imposed by that quota are applied to that user or group.• However, some special groups and users are handled differently. In

addition, some rules apply to user and group quotas.

• How quotas work with qtrees You can create quotas with a qtree as their target; these quotas arecalled tree quotas.

• You can also create user and group quotas for a specific qtree.

• In addition, quotas for a volume are sometimes inherited by theqtrees contained by that volume.

7/27/2019 D7ADM Module 10 Quotas

http://slidepdf.com/reader/full/d7adm-module-10-quotas 11/43

How Quotas Work – Users / Groups

• If you do not specify a path name to a volume

or qtree, the quota takes effect in the root

volume (globally).

• User or group quota applied to a qtree,

require defining a quota for that user or group

for the volume that contains that qtree.

• The volume quota can be a default or tracking

quota.

7/27/2019 D7ADM Module 10 Quotas

http://slidepdf.com/reader/full/d7adm-module-10-quotas 12/43

Unix/Windows User Quota Formats

• UNIX users in quotas file One of three formats: the user name, the UID, or a fileor directory owned by the user.

• Windows users in quotas file 

One of three formats: the Windows name in pre-Windows 2000 format, the SID, or a file or directoryowned by the SID of the user.

• root user Root user (UID=0) on UNIX clients is subject to tree

quotas, but not user quotas or group quotas. Thisallows the root user to take actions on behalf of otherusers that would otherwise be prevented by a quota.

7/27/2019 D7ADM Module 10 Quotas

http://slidepdf.com/reader/full/d7adm-module-10-quotas 13/43

Windows Group Quotas

• Quotas are applied to the Everyone group and theBUILTIN\Administrators group differently than to other Windowsgroups.

• If the quota target is the Everyone group, a file whose ACL showsthat the owner is Everyone is counted under the SID for Everyone.

• If the quota target is BUILTIN\Administrators, the entry isconsidered a user quota, for tracking only. You cannot imposerestrictions on BUILTIN\Administrators.

• If a member of BUILTIN\Administrators creates a file, the file isowned by BUILTIN\Administrators and is counted under the SID forBUILTIN\Administrators, not the user's personal SID.

• Note: Data ONTAP does not support group quotas based onWindows group IDs. If you specify a Windows group ID as the quotatarget, the quota is considered to be a user quota (applying a groupSID to a User quota).

7/27/2019 D7ADM Module 10 Quotas

http://slidepdf.com/reader/full/d7adm-module-10-quotas 14/43

Qtree Quotas

• Quotas with a qtree as their target called tree quotas.

• Create user and group quotas for a specific qtree.

• Quotas for a volume are inherited by the qtrees contained by thatvolume.

• How tree quotas work 

Qtrees as targets (tree quotas) limit how large the qtree canbecome in volume. (Tree quotas limit the overall size of the qtree)

• How user and group quotas work with qtrees Limit individual users or groups consumption of qtree via user orgroup quota for that qtree.

How quotas are inherited from volumes by qtrees When you create a quota for a volume, that quota is usuallyautomatically inherited by all qtrees in that volume.

• However, some conditions will prevent a volume quota from beinginherited by the volume's qtrees.

7/27/2019 D7ADM Module 10 Quotas

http://slidepdf.com/reader/full/d7adm-module-10-quotas 15/43

DOT Quotas (cont’d) 

• Differences among hard, soft, and threshold quotas Hard quotas (Disk and Files fields) impose a hard limit on systemresources; any operation that would result in exceeding the limitfails. The soft quotas (Threshold, Soft Disk and Soft Files fields)enable you to receive a warning when users reach a certain resourcelevel without affecting their data access, so you can take appropriate

action before the quota is exceeded.• How the quotas file works 

The quotas file, found in the /etc directory, contains one or moreentries specifying limit or tracking quotas for qtrees, groups, andusers. The file can contain default (general) and specific entries.

• About activating or reinitializing quotas Reinitialization causes the quotas file to be scanned and all quotasfor that volume to be recalculated. You use the quota on commandto activate or reinitialize quotas. Knowing how quota initializationworks can help you manage your quotas less disruptively.

7/27/2019 D7ADM Module 10 Quotas

http://slidepdf.com/reader/full/d7adm-module-10-quotas 16/43

Activating/Reinitializing Quotas

• Reinitialization causes quotas file to be scanned and allquotas for that volume to be recalculated.

• quota on command activates or reinitializes quotas.

• To manage your quotas less disruptively: – Changes to the quotas file do not take effect until either

quotas are reinitialized or the quota resize command isissued.

 – Activate or reinitialize quotas for only one volume at atime.

 – Quotas file does not need to be free of all errors toactivate quotas.

 – Invalid entries are reported and skipped. Valid entries areactivated.

7/27/2019 D7ADM Module 10 Quotas

http://slidepdf.com/reader/full/d7adm-module-10-quotas 17/43

Activating/Reinitializing Quotas

• Quota reinitialization can take some time, during whichstorage system data is available, but during that timequotas are not enforced for the specified volume.

• Quota reinitialization is performed asynchronously bydefault; other commands can be performed while thereinitialization is proceeding in the background.

• Quota reinitialization can be invoked synchronously withthe -w option; this is useful if you are reinitializing from ascript.

Errors and warnings from the reinitialization process arelogged to the console as well as to /etc/messages.

• Quota activation persists across halts and reboots.

• You should not activate quotas in the /etc/rc file.

7/27/2019 D7ADM Module 10 Quotas

http://slidepdf.com/reader/full/d7adm-module-10-quotas 18/43

Modifying Quotas

• After changes to quotas file, DOT must read the quotasfile again and incorporate the changes.

• Two ways to do this, depending on the contents of yourquotas file.

• Reread the quotas file in one of the following twoways: – Resizing quotas is faster than a full reinitialization;

however, some quotas file changes may not be reflected.

 – Reinitialize quotas reads and recalculates the entirequotas file, which may take some time, but all quotas filechanges are guaranteed to be reflected after theinitialization is complete.

7/27/2019 D7ADM Module 10 Quotas

http://slidepdf.com/reader/full/d7adm-module-10-quotas 19/43

Quota Report•

Quota reports display what DOT quotas are applied.• Can change format of the quota report and how user IDs are

displayed using the options for the quota report command.

• Note that an extra quota is shown for the root user. Default userquotas do not apply to root

7/27/2019 D7ADM Module 10 Quotas

http://slidepdf.com/reader/full/d7adm-module-10-quotas 20/43

Types of Quotas

• You use default, explicit, derived and tracking quotas to manage disk usage in themost efficient manner.

• How default quotas work You use default quotas to apply a quota to all instances of a given quota type. Forexample, a default user quota affects all users on the system for the specifiedvolume. In addition, default quotas enable you to modify your quotas easily.

How you use explicit quotas You use explicit quotas to specify a quota for a specific quota target, or to overridea default quota for a specific target.

• How derived quotas work A quota applied as a result of a default quota, rather than an explicit entry in thequotas file, is referred to as a derived quota.

• How you use tracking quotas 

Tracking quotas generate reports of disk and file usage and do not limit resourceusage. When tracking quotas are used, resizing quotas in your quotas file is lessdisruptive, because you can use the quota resize command. Without trackingquotas, you must turn quotas off and back on to change them.

7/27/2019 D7ADM Module 10 Quotas

http://slidepdf.com/reader/full/d7adm-module-10-quotas 21/43

Default Quotas

• Use a default quotas to apply a quota to all instances of a given quota type. – For example, a default user quota affects all users on the

system for the specified volume.

 –

In addition, default quotas enable you to modify yourquotas easily.

• You can create a default quota for users, groups, orqtrees.

• A default quota applies to quota targets that are not

explicitly referenced in /etc/quotas file.• Create default quotas with asterisk (*) in the Quota

Target field in the /etc/quotas file.

7/27/2019 D7ADM Module 10 Quotas

http://slidepdf.com/reader/full/d7adm-module-10-quotas 22/43

 

Where Default Quotas are Applied 

• You apply a default user or group quota on a

per-volume or per-qtree basis.

• You apply a default tree quota on a per-

volume basis.

 – For example, apply default tree quota vol2

volume, which means that all qtrees created in

the vol2 volume are subject to this quota  – qtrees in other volumes are unaffected.

7/27/2019 D7ADM Module 10 Quotas

http://slidepdf.com/reader/full/d7adm-module-10-quotas 23/43

Typical Default Quota Usage

• You want a user quota to be applied to most

users of your system.

• Create a default user quota that will be

automatically applied to every user.

• Change that quota for a particular user, by

overriding the default quota for that user by

creating an entry in the /etc/quotas file.

7/27/2019 D7ADM Module 10 Quotas

http://slidepdf.com/reader/full/d7adm-module-10-quotas 24/43

Default Quotas Example

Any user not explicitly listed in the quota file can use 50 MB of disk space and

15,360 files in the vol2 volume.

Any group not explicitly listed in the quota file can use 750 MB of disk

space and 87,040 files in the vol2 volume.

Any qtree in the vol2 volume that is not explicitly listed in the quota file can

use 75 MB of disk space and an unlimited number of files.

7/27/2019 D7ADM Module 10 Quotas

http://slidepdf.com/reader/full/d7adm-module-10-quotas 25/43

Quota Examples

7/27/2019 D7ADM Module 10 Quotas

http://slidepdf.com/reader/full/d7adm-module-10-quotas 26/43

Inheriting and Overriding

Default QuotasDefault quotas can be inherited

• If there are no qtree quotas for a volume, default user andgroup quotas apply to the volume's qtrees.

• Tree quotas you create take precedence over the volume

quotas.How to override a default quota

• DOT will apply a default quota to a particular target, bycreating an entry in the /etc/quotas file for that target.

• The explicit quota for that target overrides the default

quota.• When overriding a default quota, remember that overrides

for a volume do not apply to the qtrees contained by thatvolume if a qtree default exists for that volume.

7/27/2019 D7ADM Module 10 Quotas

http://slidepdf.com/reader/full/d7adm-module-10-quotas 27/43

Default Tracking Quotas

• Instead of specifying a default user, group or tree quotalimit, specify default tracking quotas.

• Default Tracking quotas do not enforce any resource limits,but they enable you to resize rather than reinitialize quotasafter adding or deleting quota file entries.

• Enables default quotas that do not enforce any resourcelimits.

• Helpful for quota resize command to modify your/etc/quotas file, without applying resource limits with your

default quotas.• The default tracking quota for users in the volume that

contains the qtree avoids CPU utilization issues.

7/27/2019 D7ADM Module 10 Quotas

http://slidepdf.com/reader/full/d7adm-module-10-quotas 28/43

Default Tracking Quota Example

When you apply a user or group quota to a qtree, you must have a

quota defined for the volume that contains that qtree.

Default tracking quotas are created per-volume, as shown in the

following example:

7/27/2019 D7ADM Module 10 Quotas

http://slidepdf.com/reader/full/d7adm-module-10-quotas 29/43

Derived Quota

• A quota applied as a result of a default quota, rather than anexplicit quota (a quota with a specific target), is referred to as aderived quota.

• Quotas for a volume are sometimes inherited by the qtreescontained by that volume.

•DOT derives the quota information from the default quota andapplies it if a write request affects the disk space or number of filesused by an instance of the quota target.

• Derived quotas are applied for all quota target types (users, groups,and qtrees) unless an explicit quota is in effect for that target.

• DOT tracks disk and file usage for quota targets of derived quotas,which means you can change the specifications of these derivedquotas by resizing rather than having to perform a full quotareinitialization.

7/27/2019 D7ADM Module 10 Quotas

http://slidepdf.com/reader/full/d7adm-module-10-quotas 30/43

Explicit Quotas

• You use explicit quotas to specify a quota for a

specific quota target, or to override a default

quota for a specific target.

• Default quotas for qtrees take precedence

over explicit quotas for the containing volume.

• An explicit quota applied to a qtree takes

precedence over the volume quota.

7/27/2019 D7ADM Module 10 Quotas

http://slidepdf.com/reader/full/d7adm-module-10-quotas 31/43

Explicit Quota Examples

Explicit quota for user msmith = 75 MB of disk space + 76,800 files in the vol1

overrides default 50 MB disk limit and 15,360 files limit.

By giving jdoe and msmith 100 MB and 75 MB explicit quotas for the proj1 qtree,

oversubscribes that qtree (with tree quota of 100MB).

Qtree could run out of space before the user quotas are exhausted.

7/27/2019 D7ADM Module 10 Quotas

http://slidepdf.com/reader/full/d7adm-module-10-quotas 32/43

Tracking Quotas Examples

DOT tracks but does not limit the amount of disk space and the

number of files in the vol1 volume owned by root.

DOT tracks but does not limit the amount of disk space and the

number of files in the vol1 volume owned by or created by members of 

BUILTIN\Administrators.

DOT tracks but does not limit the amount of disk space and the number of 

files for the proj1 qtree in the vol2 volume.

When you apply a user or group quota to a qtree, you must have a quota

defined for the volume that contains that qtree.

7/27/2019 D7ADM Module 10 Quotas

http://slidepdf.com/reader/full/d7adm-module-10-quotas 33/43

Derived Default User/Group Quotas

• If a qtree is created in the vol1 volume (for

example, a qtree named /vol/vol1/proj2), DOT

enforces a derived default user quota and a

derived default group quota that have thesame effect as these quota entries:

7/27/2019 D7ADM Module 10 Quotas

http://slidepdf.com/reader/full/d7adm-module-10-quotas 34/43

Derived Default Qtree Quota

• If a qtree is created in the vol1 volume (for

example, a qtree named /vol/vol1/proj2), DOT

tracks the disk space and number of files

owned by root user UID 0 and GID 0 in the/vol/vol1/proj2 qtree.

• This is due to this quota file entry:

7/27/2019 D7ADM Module 10 Quotas

http://slidepdf.com/reader/full/d7adm-module-10-quotas 35/43

Progressive Example 1

• You decide to impose a hard limit of 50 MB for

each user in vol1, with following quotas file:

If any user on the system enters a command that

would use more than 50 MB in vol1, the commandfails (for example, writing 51MB to a file).

7/27/2019 D7ADM Module 10 Quotas

http://slidepdf.com/reader/full/d7adm-module-10-quotas 36/43

Progressive Example 2

• An important user needs more space in vol1.• Give this user more space, you update your quotas file

(username jsmith):

Note extra quota is shown for the root user. Default user quotas do not apply to

root, so the root user has no space limit on vol1, as shown by the dash (“-”) in theLimit column for the root user

7/27/2019 D7ADM Module 10 Quotas

http://slidepdf.com/reader/full/d7adm-module-10-quotas 37/43

Progressive Example 3

• Set up 45MB threshold for all users, except jsmith, who getsthreshold at 75 MB.

• To set up a user-specific threshold, change the quotas file to read asfollows:

Note that the -t flag is used to display threshold limits

7/27/2019 D7ADM Module 10 Quotas

http://slidepdf.com/reader/full/d7adm-module-10-quotas 38/43

Progressive Example 4

• You create two qtrees, named proj1 and proj2, to accommodate those projectswithin vol1.

• Creating qtrees does not cause any change for your quotas, because the quotasfile only applies quotas to the volume so far.

• Users can use as much space in a qtree as they are allotted for the entire volume(provided they did not exceed the limit for the volume by using space in the rootor another qtree).

• In addition, each of the qtrees can grow to consume the entire volume.

• To limit qtree to 20 GB:

7/27/2019 D7ADM Module 10 Quotas

http://slidepdf.com/reader/full/d7adm-module-10-quotas 39/43

Progressive Example 4 (cont’d) 

The first new line is exactly what was added to quota file:tree * vol1 - 0 20971520 - 0 - *

The next line shows derived quota. You did not add this quota directly. It is derived from the

default tree quota that you just added. This new line means that a quota of 20 GB is being

applied to the proj1 qtree:

tree 1 vol1 proj1 0 20971520 - 1 - /vol/vol1/proj1

7/27/2019 D7ADM Module 10 Quotas

http://slidepdf.com/reader/full/d7adm-module-10-quotas 40/43

Progressive Example 4 (cont’d) 

The next line shows another derived quota, derived from the default user quota youadded in an earlier example.

Default user quotas on a volume are automatically inherited for all qtrees contained bythat volume, if quotas are enabled for qtrees.

When you added the first qtree quota, you enabled quotas on qtrees, so this derivedquota was created

user * vol1 proj1 0 51200 46080 0  – 

The rest of the new lines are for the root user and for the other qtree.  

7/27/2019 D7ADM Module 10 Quotas

http://slidepdf.com/reader/full/d7adm-module-10-quotas 41/43

Progressive Example 5

You decide to limit users to less space in the proj1 qtreethan they get in the volume as a whole.

You want to keep them from using any more than 10 MB inthe proj1 qtree.

To do so, you update the quotas file as follows:

7/27/2019 D7ADM Module 10 Quotas

http://slidepdf.com/reader/full/d7adm-module-10-quotas 42/43

Progressive Example 5 (cont’d) 

New report entry:

user * vol1 proj1 0 10240 0 - *

7/27/2019 D7ADM Module 10 Quotas

http://slidepdf.com/reader/full/d7adm-module-10-quotas 43/43

FlexClones and Quotas

• Quotas applied to a FlexVol are not automaticallyapplied to its FlexClone.

• Quota limits are applied on the total logical sizeof the FlexClone files or FlexClone LUNs.

• When you create a FlexClone file or FlexCloneLUN, quotas do not recognize any space savings.

• For example, if you create a FlexClone file of aparent file of 10 GB, you are only using 10 GB of physical space, but the quota utilization isrecorded as 20 GB (10 GB for the parent and 10GB for the FlexClone file).


Top Related