Data ONTAP® PowerShell Toolkit

Cmdlet: Set-NaVolSize


NAME
Set-NaVolSize

SYNOPSIS
Given the name of a flexible volume, set the volume's size to the stated amo
unt.

SYNTAX
Set-NaVolSize [-Name] <String> [-Controller <NaController>] [-NewSize] <Stri
ng> [-WarningAction <ActionPreference>] [-WarningVariable <String>] [-WhatIf
] [-Confirm] [<CommonParameters>]


DESCRIPTION
Given the name of a flexible volume, set the volume's size to the stated amo
unt.


PARAMETERS
-Name <String>
The name of the flexible volume for which we want to set its size.

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

-Controller <NaController>
The DataONTAP controller object, embodied by an NaController object. Th
is parameter is returned by the Connect-NaController cmdlet. If not spe
cified, the value in the global variable CurrentNaController is used.

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

-NewSize <String>
Specify the flexible volume's new size using the following format:

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

If a leading '+' or '-' appears, it indicates that the given flexible vo
lume's size is to be increased or decreased (respectively) by the indica
ted amount, else the amount is the absolute size to set. The optional tr
ailing 'k', 'm', 'g', and 't' indicates the desired units, namely 'kilob
ytes', 'megabytes', 'gigabytes', and 'terabytes' (respectively). If the
trailing unit character doesn't appear, then <number> is interpreted as
the number of kilobytes desired.

The file system size of a readonly replica flexible volume, such as a sn
apmirror destination, is determined from the replica source. In such cas
es, the value set using "Set-NaVolSize" is interpreted as an upper limit
on the size. A flexible volume that's not a readonly replica which has
the "fs_size_fixed" option set may have its size displayed, but not chan
ged. Attempting to set the volume size in this case will result in fail
ure and a EINTERNALERROR error code. Users must be able to adjust readon
ly replica flexible volume size in order to maintain enough capacity to
accommodate transfers from the replica source. Attempting to set a read
only replica destination size to be less than that of its source will re
sult in a failure indicated by the EONTAPI_ENOSPC error code.

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

-WarningAction <ActionPreference>


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

-WarningVariable <String>


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

<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
NetApp.Ontapi.Filer.Volume.VolumeInfo


NOTES


Category: volume
API: volume-size

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

C:\PS>Set-NaVolSize vol2 180g


Set the total size of volume 'vol2' to 180 GB.


ChecksumStyle : block
CloneChildren : {vol2clone}
CloneParent :
ContainingAggregate : aggr1
DiskCount : 8
FilesTotal : 6381567
FilesUsed : 179
IsChecksumEnabled : True
IsInconsistent : False
IsSnaplock : False
IsUnrecoverable : False
MirrorStatus : unmirrored
Name : vol2
PercentageUsed : 87
PlexCount : 1
Plexes : {/aggr1/plex0}
QuotaInit : 0
RaidSize : 16
RaidStatus : raid_dp,sis
Reserve : 10110799872
ReserveRequired : 10110799872
ReserveUsed : 0
Sis : NetApp.Ontapi.Filer.Volume.Sis
SizeAvailable : 24506642432
SizeTotal : 193273528320
SizeUsed : 168766885888
SnaplockType :
SpaceReserve : volume
SpaceReserveEnabled : False
State : online
Type : flex
Uuid : e91dc1f8-ab4f-11dd-867f-00a09806c227
IsUnrecoverableSpecified : True
PercentageUsedSpecified : True
SpaceReserveEnabledSpecified : True



RELATED LINKS
Get-NaVolSize
Get-NaVol
Set-NaVolAutosize







 Data ONTAP® PowerShell Toolkit