Data ONTAP® PowerShell Toolkit

Switch to clustered Data ONTAP documentation.

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> [<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 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

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

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

If a leading '+' or '-' appears, it indicates that the volume size is to
be increased or decreased (respectively) by the indicated amount, else
the amount is the absolute size to set. The optional trailing 'k', 'm',
'g', and 't' indicates the desired units, namely 'kilobytes', 'megabyte
s', 'gigabytes', and 'terabytes' (respectively). The optional trailing
'%' indicates to increase or decrease the size of the volume by a percen
tage of its current size. If the trailing unit character doesn't appear
, then <number> is interpreted as the number of bytes 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

<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.Types.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 :
CloneParent :
ContainingAggregate : aggr1
DiskCount : 8
FilesTotal : 6381567
FilesUsed : 201
IsChecksumEnabled : True
IsInconsistent : False
IsSnaplock : False
IsUnrecoverable : False
MirrorStatus : unmirrored
Name : vol2
PercentageUsed : 76
PlexCount : 1
Plexes : {/aggr1/plex0}
QuotaInit : 0
RaidSize : 16
RaidStatus : raid_dp,sis
Reserve : 10110808064
ReserveRequired : 10110808064
ReserveUsed : 0
Sis : idle
SizeAvailable : 45496459264
SizeTotal : 193273528320
SizeUsed : 147777069056
SnaplockType :
SpaceReserve : volume
SpaceReserveEnabled : True
State : online
Type : flex
Uuid : e91dc1f8-ab4f-11dd-867f-00a09806c227
IsUnrecoverableSpecified : True
PercentageUsedSpecified : True
SpaceReserveEnabledSpecified : True


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

C:\PS>Set-NaVolSize vol2 +20%


Increase the size of vol2 by 20%.


ChecksumStyle : block
CloneChildren :
CloneParent :
ContainingAggregate : aggr1
DiskCount : 8
FilesTotal : 6381567
FilesUsed : 201
IsChecksumEnabled : True
IsInconsistent : False
IsSnaplock : False
IsUnrecoverable : False
MirrorStatus : unmirrored
Name : vol2
PercentageUsed : 76
PlexCount : 1
Plexes : {/aggr1/plex0}
QuotaInit : 0
RaidSize : 16
RaidStatus : raid_dp,sis
Reserve : 10110808064
ReserveRequired : 10110808064
ReserveUsed : 0
Sis : idle
SizeAvailable : 45496459264
SizeTotal : 193273528320
SizeUsed : 147777069056
SnaplockType :
SpaceReserve : volume
SpaceReserveEnabled : True
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