Data ONTAP® PowerShell Toolkit

Switch to Data ONTAP Cluster-mode documentation.

Cmdlet: Set-NaQuota


NAME
Set-NaQuota

SYNOPSIS
Sets a quota entry.

SYNTAX
Set-NaQuota [-Type] <String> [-Target] <String[]> [-Volume] <String> [[-Qtre
e] <String>] [-DiskLimit <String>] [-FileLimit <String>] [-Threshold <String
>] [-SoftDiskLimit <String>] [-SoftFileLimit <String>] [-Controller <NaContr
oller>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-NaQuota [-Volume] <String> [[-Qtree] <String>] -GroupId <String> [-DiskL
imit <String>] [-FileLimit <String>] [-Threshold <String>] [-SoftDiskLimit <
String>] [-SoftFileLimit <String>] [-Controller <NaController>] [-WhatIf] [-
Confirm] [<CommonParameters>]

Set-NaQuota [-Volume] <String> [[-Qtree] <String>] -UserName <String> [-Disk
Limit <String>] [-FileLimit <String>] [-Threshold <String>] [-SoftDiskLimit
<String>] [-SoftFileLimit <String>] [-Controller <NaController>] [-WhatIf] [
-Confirm] [<CommonParameters>]

Set-NaQuota -Path <String> [-DiskLimit <String>] [-FileLimit <String>] [-Thr
eshold <String>] [-SoftDiskLimit <String>] [-SoftFileLimit <String>] [-Contr
oller <NaController>] [-WhatIf] [-Confirm] [<CommonParameters>]


DESCRIPTION
Sets a quota entry. If the type, target, volume, and tree do not exist, a n
ew entry is created. If the type, target, volume, and tree exist, then the
entry is modified.


PARAMETERS
-Type <String>
This is the quota type: "user", "group", or "tree".

Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false

-Target <String[]>
This is the quota target of the type specified. The target can be of th
e form: <name>, <number>, or <path name>. Multiple targets can be speci
fied by a comma-separated list.

Required? true
Position? 2
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false

-Volume <String>
This is the volume name that the quota resides on.

Required? true
Position? 3
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false

-Qtree <String>
This is the qtree name that the quota resides on. It can be the qtree n
ame or omitted if no qtree.

Required? false
Position? 4
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false

-DiskLimit <String>
This is the amount of disk space that is reserved for the the target. T
he value is expressed in bytes. Omit or set the value to "-" if the lim
it is to be unlimited. Default is unlimited.

The format to use is:

<number>[k|m|g|t]

where "k" means kilobytes, "m" means megabytes, "g" means gigabytes, and
"t" means terabytes.

Required? false
Position? named
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false

-FileLimit <String>
This is the number of files that the target can have. Omit or set the v
alue to "-" if the limit is to be unlimited. Default is unlimited.

Required? false
Position? named
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false

-Threshold <String>
This is the amount of disk space the target would have to exceed before
a message is logged. The value is expressed in bytes. Omit or set the
value to "-" if the limit is to be unlimited. Default is unlimited.

The format to use is:

<number>[k|m|g|t]

where "k" means kilobytes, "m" means megabytes, "g" means gigabytes, and
"t" means terabytes.

Required? false
Position? named
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false

-SoftDiskLimit <String>
This is the amount of disk space the target would have to exceed before
a message is logged and an SNMP trap is generated. The value is express
ed in bytes. Omit or set the value to "-" if the limit is to be unlimit
ed. Default is unlimited.

The format to use is:

<number>[k|m|g|t]

where "k" means kilobytes, "m" means megabytes, "g" means gigabytes, and
"t" means terabytes.

Required? false
Position? named
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false

-SoftFileLimit <String>
This is the number of files the target would have to exceed before a mes
sage is logged and an SNMP trap is generated. Omit or set the value to
"-" if the limit is to be unlimited. Default is unlimited.

Required? false
Position? named
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false

-Controller <NaController>
The Data ONTAP controller object, embodied by an NaController object. T
his parameter is returned by the Connect-NaController cmdlet. If not sp
ecified, the value in the global variable CurrentNaController is used.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-WhatIf


Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Confirm


Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-GroupId <String>
May be one of the following: Unix group name, numerical group id (If the
group id is 0, no limits set will be enforced, but usage will still be
tracked), or the pathname of a file owned by that group (specifying a fi
le or directory will not affect the quota on that file or directory, onl
y the GID).

Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-UserName <String>
A user can be specfied as a: unix user name, numerical user ID, windows
account name, Windows SID or a comma separated list of multiple users.

Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Path <String>
A complete path to an existing qtree.

Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
"get-help about_commonparameters".

INPUTS



OUTPUTS
DataONTAP.PowerShell.SDK.Cmdlets.Quota.Quota


NOTES


Category: quota
API: quota-set-entry

-------------- Example 1 --------------

C:\PS>Set-NaQuota tree * vol0 -FileLimit 50000 -DiskLimit 20g


Update the tree quota on volume 'vol0'.


DiskLimit : 21474836480
FileLimit : 50000
PerformUserMapping : False
QuotaError :
SoftDiskLimit : -
SoftFileLimit : -
Threshold : -


-------------- Example 2 --------------

C:\PS>Set-NaQuota -Type tree -Target /vol/vol2/qtree2 -Volume vol2 -DiskLimi
t 50g


Add a qtree quota.


DiskLimit : 53687091200
FileLimit : -
PerformUserMapping : False
QuotaError :
SoftDiskLimit : -
SoftFileLimit : -
Threshold : -


-------------- Example 3 --------------

C:\PS>Set-NaQuota -GroupId Users -Volume testvol -Qtree qtree2 -DiskLimit 2g


Set the quota for a group.


Type : group
Target : {Users}
Volume : testvol
Qtree : qtree2
DiskLimit : 2147483648
FileLimit : -
PerformUserMapping : False
QuotaError :

SoftDiskLimit : -
SoftFileLimit : -
Threshold : -


-------------- Example 4 --------------

C:\PS>Set-NaQuota -Path /vol/testvol/qtree2 -DiskLimit 2g


Set a tree quota for qtree2 on testvol.


Type : tree
Target : {/vol/testvol/qtree2}
Volume : testvol
Qtree :
DiskLimit : 2147483648
FileLimit : -
PerformUserMapping : False
QuotaError :
SoftDiskLimit : -
SoftFileLimit : -
Threshold : -


-------------- Example 5 --------------

C:\PS>Set-NaQuota -UserName vf1user -Volume testvol -Qtree qtree2 -DiskLimit
2g


Set a quota for the user vf1user.


Type : user
Target : {vf1user}
Volume : testvol
Qtree : qtree2
DiskLimit : 2147483648
FileLimit : -
PerformUserMapping : False
QuotaError :

SoftDiskLimit : -
SoftFileLimit : -
Threshold : -



RELATED LINKS
Add-NaQuota
Get-NaQuota







 Data ONTAP® PowerShell Toolkit