|
|
Data ONTAP® PowerShell Toolkit
|
Cmdlet: Get-NcVol
NAME
Get-NcVol
SYNOPSIS
Get a list of volumes.
SYNTAX
Get-NcVol [[-Name] <String[]>] [-Aggregate <String[]>] [-Vserver <String[]>]
[-Attributes <VolumeAttributes>] [-VserverContext <String>] [-Controller <N
cController[]>] [<CommonParameters>]
Get-NcVol -Template [-Fill] [-VserverContext <String>] [-Controller <NcContr
oller[]>] [<CommonParameters>]
Get-NcVol -Query <VolumeAttributes> [-Attributes <VolumeAttributes>] [-Vserv
erContext <String>] [-Controller <NcController[]>] [<CommonParameters>]
DESCRIPTION
Get a list of volumes.
PARAMETERS
-Name <String[]>
The name of one or more volumes to get. Data ONTAP wildcards are permit
ted.
Required? false
Position? 1
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-Aggregate <String[]>
Restrict results to the specified aggregates. Data ONTAP wildcards are
permitted.
Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-Vserver <String[]>
Restrict results to the specified vservers. Data ONTAP wildcards are pe
rmitted.
Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-Attributes <VolumeAttributes>
For improved scalability in large clusters, provide a VolumeAttributes o
bject with various fields set to indicate which fields to return on all
objects. Undesired fields should remain set to null. Use "Get-NcVol -T
emplate" to get the initially empty VolumeAttributes object. If not spe
cified, all data is returned for each object.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-VserverContext <String>
Vserver to which to direct this command. If the currently connected con
troller (as embodied by an NcController object) represents a cluster, th
ere are multiple means to address commands to one of its vservers. Eith
er set the Vserver field on the NcController object to direct all subseq
uent commands to that vserver, or supply the VserverContext parameter to
an individual cmdlet. Only cmdlets which may be invoked on vservers of
fer the VserverContext parameter.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Controller <NcController[]>
A clustered Data ONTAP controller to receive this cmdlet, as embodied by
an NcController object. This parameter is returned by the Connect-NcCo
ntroller cmdlet. If not specified, the value in the global variable Cur
rentNcController is used. In the latter case, if CurrentNcController co
ntains a collection of NcController objects, this cmdlet is invoked on e
ach controller in succession.
Required? false
Position? named
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
-Template
Specify to get an empty VolumeAttributes object for use with advanced qu
eries involving the Query attribute.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Fill
Specify when using the Template parameter to recursively fill in all obj
ect types.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Query <VolumeAttributes>
For advanced queries, provide a VolumeAttributes object with various fie
lds set to indicate which records to retrieve. Other fields should rema
in set to null. Use "Get-NcVol -Template" to get the initially empty Vo
lumeAttributes object.
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.C.Types.Volume.VolumeAttributes
NOTES
Category: volume
API: volume-get-iter
Family: cluster, vserver
-------------- Example 1 --------------
C:\PS>Get-NcVol
Get all volumes on the currently connected controller (which may be a cluste
r or a vserver).
Name State TotalSize Used Available Dedupe Aggregate
Vserver
---- ----- --------- ---- --------- ------ ---------
-------
georgeVol1 online 20.0 MB 55% 8.8 MB False aggr1
vserver1
vol0 online 113.3 GB 8% 104.0 GB False aggr0
fas3070cluster01-01
vol0 online 113.3 GB 8% 104.0 GB False aggr0_fas3070cluster01_0
2_0 fas3070cluster01-02
vol1 online 20.0 GB 5% 19.0 GB False aggr1
vserver1
vserver1vol0 online 20.0 MB 5% 18.9 MB False aggr1
vserver1
vserver2vol0 online 20.0 MB 5% 18.9 MB False aggr1
vserver2
-------------- Example 2 --------------
C:\PS>Get-NcVol vol0
Get all volumes named 'node0'.
Name State TotalSize Used Available Dedupe Aggregate Vser
ver
---- ----- --------- ---- --------- ------ --------- ----
---
vol0 online 113.3 GB 8% 104.0 GB False aggr0_fas3070cluster01_02_0 fas3
070cluster01-02
vol0 online 113.3 GB 8% 104.0 GB False aggr0 fas3
070cluster01-01
-------------- Example 3 --------------
C:\PS>$v = Get-NcVol -Template
Initialize-NcObjectProperty $v VolumeStateAttributes
$v.VolumeStateAttributes.IsVserverRoot = $true
Get-NcVol -Query $v | select Name, Vserver | ft -AutoSize
Use an advanced query to list the vserver root volumes.
Name Vserver
---- -------
vserver1vol0 vserver1
vserver2vol0 vserver2
RELATED LINKS
New-NcVol
| Copyright © 2012 NetApp. All rights reserved. Use is subject to license terms. |
|
Data ONTAP® PowerShell Toolkit
|