Making The Most of Data ONTAP PowerShell Toolkit
Making The Most of Data ONTAP PowerShell Toolkit
Welcome
Thank you for using the Data ONTAP PowerShell Toolkit! We are committed to continuous improvement of our
PowerShell solution. Please keep the great suggestions coming.
If you are new to the Toolkit, see our Getting Started slides. If you are considering embedding PowerShell in a larger
.NET application, see our C# PowerShell embedding example or check out the Data ONTAP PowerShell Toolkit Proxy DLL.
Contents
Making the Most of the Data ONTAP PowerShell Toolkit ...................................................................................................... 1
Welcome ................................................................................................................................................................................. 1
Data ONTAP PowerShell Toolkit 3.2.1 .................................................................................................................................... 6
Full Data ONTAP 8.3 API support ........................................................................................................................................ 6
Other enhancements .......................................................................................................................................................... 6
New cmdlets ....................................................................................................................................................................... 6
Issues Fixed ......................................................................................................................................................................... 8
Data ONTAP PowerShell Toolkit 3.2 ....................................................................................................................................... 8
Data ONTAP 8.3 API support ............................................................................................................................................... 8
Other enhancements .......................................................................................................................................................... 9
New Cmdlets ....................................................................................................................................................................... 9
Issues Fixed ....................................................................................................................................................................... 10
Data ONTAP PowerShell Toolkit 3.1 ..................................................................................................................................... 10
Perfstat data collection ..................................................................................................................................................... 10
Full Data ONTAP 8.2.1 API support ................................................................................................................................... 11
Other enhancements ........................................................................................................................................................ 12
New Cmdlets ..................................................................................................................................................................... 16
Issues Fixed ....................................................................................................................................................................... 16
Data ONTAP PowerShell Toolkit 3.0 ..................................................................................................................................... 17
Sysstat for clustered Data ONTAP..................................................................................................................................... 17
Full Data ONTAP 8.2 API support ...................................................................................................................................... 18
Other enhancements
You can now redirect ZAPI debugging output to a file, optionally with console print. See updates to SetNaToolkitConfiguration above
New cmdlets
PS C:\Users\rathnam\Documents\pstk> get-nccommand -category nameservice
Name
----
Category
--------
Family
------
Api
---
Get-NcNameServiceDNSStatistics
Get-NcNameServiceHostnameFromIP
Get-NcNameServiceIPFromHostname
Get-NcNameServiceNisStatistics
Get-NcNameServiceNsSwitch
New-NcNameServiceNsSwitch
Remove-NcNameServiceNsSwitch
Reset-NcNameServiceDNSStatistics
Reset-NcNameServiceNisStatistics
Set-NcNameServiceNsSwitchSources
nameservice
nameservice
nameservice
nameservice
nameservice
nameservice
nameservice
nameservice
nameservice
nameservice
{cluster,
{cluster}
{cluster}
{cluster,
{cluster,
{vserver}
{vserver}
{cluster,
{cluster,
{vserver}
vserver}
vserver}
vserver}
vserver}
vserver}
{name-service-dns-statistics-get-iter}
{nameservice-get-hostname-from-ipv4}
{nameservice-get-ip-from-hostname}
{name-service-nis-statistics-get-iter}
{nameservice-nsswitch-get-iter}
{nameservice-nsswitch-create}
{nameservice-nsswitch-destroy}
{nameservice-dns-statistics-clear}
{nameservice-nis-statistics-clear}
{nameservice-nsswitch-modify}
Category
-------netgroup
netgroup
Family
-----{cluster, vserver}
{cluster, vserver}
Api
--{netgroups-file-get-iter}
{netgroups-file-delete}
Category
-------ntp_server
ntp_server
ntp_server
ntp_server
ntp_server
ntp_server
Family
-----{cluster}
{cluster}
{cluster}
{cluster}
{cluster}
{cluster}
Api
--{ntp-server-get-iter}
{ntp-server-create}
{ntp-server-delete}
{ntp-server-reset}
{ntp-server-modify}
{ntp-server-validate}
Category
-------tape_mc
tape_mc
tape_mc
tape_mc
tape_mc
tape_mc
Family
-----{cluster}
{cluster}
{cluster}
{cluster}
{cluster}
{cluster}
Api
--{tape-mc-info-alias-clear}
{tape-mc-info-trace}
{tape-mc-info-trace}
{tape-mc-get-iter}
{tape-mc-info-reset}
{tape-mc-info-online, tape-mc-info-
tape_mc
tape_mc
tape_mc
{cluster}
{cluster}
{cluster}
{tape-mc-info-alias-set}
{tape-mc-info-position}
{tape-mc-info-test-reserve, tape-mc-
Category
-------cluster image
cluster image
cluster image
cluster image
cluster image
cluster image
Family
-----{cluster}
{cluster}
{cluster}
{cluster}
{cluster}
{cluster}
Api
--{cluster-image-get-iter}
{cluster-image-get-download-progress}
{cluster-image-package-local-get-iter}
{cluster-image-update-history-get-iter}
{cluster-image-update-log-get-iter}
{cluster-image-update-progress-get-
cluster
cluster
cluster
cluster
cluster
cluster
cluster
{cluster}
{cluster}
{cluster}
{cluster}
{cluster}
{cluster}
{cluster}
{cluster-image-package-delete}
{cluster-image-update-resume}
{cluster-image-package-download}
{cluster-image-update}
{cluster-image-update-cancel}
{cluster-image-update-resume}
{cluster-image-validate}
image
image
image
image
image
image
image
PS C:\Users\rathnam\Documents\pstk>
Name
---Get-NcLock
Remove-NcLock
Api
--{lock-get-iter}
{lock-break-iter}
PS C:\Users\rathnam\Documents\pstk>
Name
---Invoke-NcCoredump
Api
--{coredump-trigger}
Issues Fixed
Not applicable.
Category
-------metrocluster
metrocluster
metrocluster
Family
-----{cluster}
{cluster}
{cluster}
Api
--{metrocluster-get}
{metrocluster-check-aggregate-get-iter}
{metrocluster-check-aggregate-
metrocluster
metrocluster
metrocluster
metrocluster
{cluster}
{cluster}
{cluster}
{cluster}
{metrocluster-check-get-iter}
{metrocluster-config-diff-get-iter}
{metrocluster-config-replication-get}
{metrocluster-check-config-replication-
metrocluster
{cluster}
{metrocluster-show-lif-placement-
metrocluster
metrocluster
{cluster}
{cluster}
{metrocluster-interconnect-get-iter}
{metrocluster-interconnect-adapter-get-
metrocluster
{cluster}
{metrocluster-interconnect-adapter-
metrocluster
metrocluster
metrocluster
metrocluster
metrocluster
metrocluster
metrocluster
metrocluster
metrocluster
metrocluster
metrocluster
{cluster}
{cluster}
{cluster}
{cluster}
{cluster}
{cluster}
{cluster}
{cluster}
{cluster}
{cluster}
{cluster}
{metrocluster-node-get-iter}
{metrocluster-check-node-get-iter}
{metrocluster-operation-get-iter}
{metrocluster-progress-table-get-iter}
{metrocluster-vserver-get-iter}
{metrocluster-check-run}
{metrocluster-heal}
{metrocluster-switchback}
{metrocluster-switchover}
{metrocluster-configure}
{metrocluster-check-lif-repair-
metrocluster
{cluster}
{metrocluster-config-replication-
metrocluster
metrocluster
metrocluster
{cluster}
{cluster}
{cluster}
{metrocluster-vserver-resync}
{metrocluster-is-configured}
{metrocluster-unconfigure}
PS C:\Program Files (x86)\Netapp\Data ONTAP PowerShell Toolkit> get-nccommand -category "Storage pool"
Name
---Add-NcStoragePool
Get-NcStoragePool
Get-NcStoragePoolAggr
Get-NcStoragePoolDisk
Category
-------storage pool
storage pool
storage pool
storage pool
Family
-----{cluster}
{cluster}
{cluster}
{cluster}
Api
--{storage-pool-add}
{storage-pool-get-iter}
{storage-pool-aggregate-get-iter}
{storage-pool-disk-get-iter}
Get-NcStoragePoolSpareCapacity
Move-NcStoragePool
New-NcStoragePool
Remove-NcStoragePool
storage
storage
storage
storage
pool
pool
pool
pool
{cluster}
{cluster}
{cluster}
{cluster}
{storage-pool-spare-capacity-get-iter}
{storage-pool-reassign}
{storage-pool-create}
{storage-pool-delete}
Other enhancements
Several cmdlets have been updated to include new parameters. The following cmdlets have new parameters in the
clustered ONTAP cmdlet set:
Add-NcAggr: CacheRaidGroupSize
New-NcAggr: ExcludeFromAutobalance
Set-NcAggr: Force (-Offline option)
Add-NcCifsServer: Comment, NetbiosAlias
Add-NcCifsShare: MaxConnectionsPerShare, ForceGroupForCreate, DisablePathValidation
Add-NcCifsShareAcl: UserGroupType
Remove-NcCifsServer: ForceAccountDelete
Remove-NcCifsServerAcl: UserGroupType
Set-NcCifsOption: IsCopyOffladDirectCopyEnabled, IsUnixNtAclEnabled, ClientSessionTimeout, IsDacEnabled,
AnonymousRestrictionLevel, IsReadOnlyDeleteEnabled, IsFakeOpenEnabled, IsUnixExtensionsEnabled,
IsSearchShortNamesEnabled
Set-NcCifsSecurity: IsAesEncryptionEnabled, LmCompatibilityLevel, AdminCredential
Set-NcCifsServer: Comment, AddNetbiosAlias, RemoveNetbiosAlias
Set-NcCifsShare: MaxConnectionsPerShare, ForceGroupForCreate, IsPathValidationEnabled
Set-NcCifsShareAcl: UserGroupType
Add-NcClusterPeer: AddressFamily, Passphrase, OfferExpiration
Set-NcClusterPeer: AuthStatusAdmin, Passphrase, OfferExpiration
Get-NcNetSanLifPlacement: Subnet, BroadcastDomain, Ipspace
New-NcNetInterface: Subnet, Wwpn, ForceSubnetAssociation
Ping-NcHost: WaitResponse
Set-NcNetInterface: Subet, Wwpn, ForceSubnetAssociation
Set-NcNetPort: Ipspace, MtuAdmin
Invoke-NcSnapmirrorBreak: RestoreDestinationSnapshot
Invoke-NcSnapmirrorCheck: CheckFileListSource, CheckFileListDestination, SourceSnapshot, MaxTransferRate
Invoke-NcSnapmirrorRestore: CreateCheckSnapshot, UseNetworkCompression, RestoreFileList
Invoke-NcSnapmirrorResync: QuickResync
Invoke-NcSnapmirrorUpdate: EnableStorageEfficiency
New-NcVol: CachingPolicy, ExcludedFromAutobalance, Comment
New-NcVolCone: CachingPolicy
New-NcVserver: Ipspace, Subtype
Set-NcVserver: VolumeDeleteRetentionHours
New-NcVserverPeerTransition: LocalLif
Set-NcVserverPeerTransition: LocalLif
New Cmdlets
There are 126 new cmdlets in Toolkit 3.2 making a grand total of 1603 cmdlets!
The following categories in the clustered ONTAP set have new cmdlets:
Issues Fixed
ConvertTo-NaVmdk could fail when connecting to a vserver management LIF that is also a CIFS data LIF and a
network name was used.
ConvertTo-NaVmdk could fail when connecting to a vserver by name when DNS round robin is used.
Set-NcTime would fail for Data ONTAP 8.2 and higher.
Reset-NcCifsPassword did not have a default parameter set.
Get-NaVol could fail in the vfiler context.
The parallel commands are run for 60 seconds. Two iterations are performed with 30 seconds between iterations. The
output files are located in the C:\Perfstats directory.
PS C:\Toolkit\3.1>
ls C:\Perfstats
Directory: C:\Perfstats
Mode
---d----
LastWriteTime
------------1/23/2014
3:28 PM
PS C:\Toolkit\3.1>
Length Name
------ ---perfstat_20140123_152829
ls C:\Perfstats\perfstat_20140123_152829
Directory: C:\Perfstats\perfstat_20140123_152829
Mode
---d----
LastWriteTime
------------1/23/2014
3:28 PM
PS C:\Toolkit\3.1>
Length Name
------ ---10.61.167.84
ls C:\Perfstats\perfstat_20140123_152829\10.61.167.84
Directory: C:\Perfstats\perfstat_20140123_152829\10.61.167.84
Mode
----a---a---
LastWriteTime
------------1/23/2014
3:37 PM
1/23/2014
3:37 PM
Length
-----20506925
49575
Name
---output.data
output.index
The following command collects perfstat information for one node in the current cluster. Two iterations are performed
with 10 seconds between iterations.
PS C:\Toolkit\3.1> Invoke-NcPerfstat -Directory C:\Perfstats -Node sfp-cmode-02-01 -Iterations 2 IterationSleepTime 10
ls C:\Perfstats
Directory: C:\Perfstats
Mode
---d----
LastWriteTime
------------1/23/2014
4:02 PM
PS C:\Toolkit\3.1>
Length Name
------ ---perfstat_20140123_160224
ls C:\Perfstats\perfstat_20140123_160224
Directory: C:\Perfstats\perfstat_20140123_160224
Mode
---d----
LastWriteTime
------------1/23/2014
4:02 PM
PS C:\Toolkit\3.1>
Length Name
------ ---10.63.165.54
ls C:\Perfstats\perfstat_20140123_160224\10.63.165.54
Directory: C:\Perfstats\perfstat_20140123_160224\10.63.165.54
Mode
----a---a---
LastWriteTime
------------1/23/2014
4:09 PM
1/23/2014
4:09 PM
Length
-----17539264
28406
Name
---output.data
output.index
Api
--{ucm-adapter-list-info}
{ucm-adapter-modify}
PS C:\Toolkit\3.1>
Name
---Get-NcActiveDirectoryAccount
New-NcActiveDirectoryAccount
Remove-NcActiveDirectoryAccount
Reset-NcActiveDirectoryAccountPa...
reset}
Set-NcActiveDirectoryAccount
active-di...
PS C:\Toolkit\3.1>
Family
-----{cluster, vserver}
{vserver}
{vserver}
{vserver}
Api
--{active-directory-account-get-iter}
{active-directory-account-create}
{active-directory-account-delete}
{active-directory-account-password{active-directory-account-modify,
Name
---Get-NcUcmAdapter
Set-NcUcmAdapter
PS C:\Toolkit\3.1>
Category
-------active direc...
active direc...
active direc...
active direc...
Category
-------ucm
ucm
Family
-----{cluster}
{cluster}
Api
--{ucm-adapter-get-iter}
{ucm-adapter-modify}
Category
-------vscan
vscan
vscan
vscan
vscan
vscan
Family
-----{vserver}
{vserver}
{vserver}
{vserver}
{cluster, vserver}
{cluster, vserver}
Api
--{vscan-status-modify}
{vscan-on-access-policy-modify}
{vscan-status-modify}
{vscan-on-access-policy-modify}
{vscan-connection-status-all-get-iter}
{vscan-connection-extended-stats-get-
vscan
vscan
vscan
vscan
vscan
vscan
vscan
vscan
vscan
vscan
vscan
{cluster,
{cluster,
{cluster,
{cluster,
{vserver}
{vserver}
{vserver}
{vserver}
{vserver}
{vserver}
{vserver}
{vscan-on-access-policy-get-iter}
{vscan-scanner-pool-get-iter}
{vscan-active-scanner-pool-get-iter}
{vscan-status-get-iter}
{vscan-on-access-policy-create}
{vscan-scanner-pool-create}
{vscan-on-access-policy-delete}
{vscan-scanner-pool-delete}
{vscan-reset}
{vscan-on-access-policy-modify}
{vscan-scanner-pool-modify}
Name
---Disable-NcVscan
Disable-NcVscanOnAccessPolicy
Enable-NcVscan
Enable-NcVscanOnAccessPolicy
Get-NcVscanConnection
Get-NcVscanConnectionStats
iter}
Get-NcVscanOnAccessPolicy
Get-NcVscanScannerPool
Get-NcVscanScannerPoolActive
Get-NcVscanStatus
New-NcVscanOnAccessPolicy
New-NcVscanScannerPool
Remove-NcVscanOnAccessPolicy
Remove-NcVscanScannerPool
Reset-NcVscan
Set-NcVscanOnAccessPolicy
Set-NcVscanScannerPool
vserver}
vserver}
vserver}
vserver}
Data ONTAP 8.2.1 introduces the ability to export qtrees. A new parameter on New-NcQtree and Set-NcQtree,
ExportPolicy, allows an export policy (created using the cmdlets in the exports category) to be applied to a qtree.
PS C:\Toolkit\3.1>
PolicyName
---------qtree_export
PolicyId Vserver
-------- ------12884901890 pstk01
PS C:\Toolkit\3.1> New-NcExportRule -Policy qtree_export -ClientMatch 0.0.0.0/0 -ReadOnlySecurityFlavor any ReadWriteSecurityFlavor any
PS C:\Toolkit\3.1>
Volume
-----exports
Qtree
----export1
Status
-----normal
SecurityStyle Oplocks
------------- ------unix
enabled
Vserver
------pstk01
Other enhancements
Get-NaHostDisk is used to enumerate disks on the host system. Partner information has been added to the output of
Get-NaHostDisk for 7-mode systems.
PS C:\Toolkit\3.1>
Disk
Size
Get-NaHostDisk 4 | fl *
: 4
: 2198888778240
ControllerPath
ControllerMode
HostDrivePath
HostDiskName
HostVolume
HostVolumeIsCsv
HostGptGuid
HostMbrSignature
HostDiskIndex
DiskSerialNumber
DiskSize
DiskWmiPath
ControllerName
ControllerIgroup
ControllerIgroupType
ControllerAddresses
ControllerLunPath
ControllerVolumeName
ControllerLunOsType
ControllerSnapshot
ControllerQtree
ControllerOntapRevision
ControllerModel
IScsiTarget
FcpTarget
PartnerControllerName
IsHaEnabled
IsHaIcConnected
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
fas2040rre1:/vol/vol1/biggerlun
Classic
E:\
\\?\PhysicalDrive4
\\?\Volume{e09cb9fc-0f93-48b4-acf0-fa3c5bfc12a2}\
False
d7d22034-f5d8-4d3d-a54b-1b41b63b7093
4
P4DahZjB/4vx
2198888778240
\\WIN2K8DEVRRE0\root\cimv2:Win32_DiskDrive.DeviceID="\\\\.\\PHYSICALDRIVE4"
fas2040rre1
win2k8devrre0
Windows
{192.168.0.8, 10.61.169.28}
/vol/vol1/biggerlun
vol1
windows_2008
/vol/vol1
8.0.1 7-Mode
FAS2040
10.61.169.28:3260
fas2040rre2
True
True
Two new cmdlets, Get-NcLunSignature and Set-NcLunSignature, work like their Na- counterparts for clustered ONTAP.
Manipulating LUN signatures is especially useful when cloning LUNs. The following example script shows the usage of
Set-NcLunSignature after cloning a LUN.
function Clone-Disk {
param([int]$DiskIndex)
# Get the Disk to clone
$disk = Get-NaHostDisk -Disk $DiskIndex
# Make sure it's clustered ONTAP
if(-not ($disk.ControllerMode -eq "Cluster")) { Write-Error "Not a clustered ONTAP LUN."; return }
# Connect to the controller (Assuming credentials are in the cache)
$controller = Connect-NcController $disk.ControllerAddresses[0] -Vserver $disk.ControllerName -Transient
if($controller -eq $null) { Write-Error "Could not connect to controller."; return }
# Clone the LUN
$cloneLunPath = $disk.ControllerLunPath + "_$((Get-Date).ToString('yyyyMMdd_hhmmss'))"
$destinationPath = $cloneLunPath.Substring("/vol/$($disk.ControllerVolumeName)".Length)
New-NcClone -Volume $disk.ControllerVolumeName -SourcePath $disk.ControllerLunPath -DestinationPath
$destinationPath -Controller $controller | Out-Null
if(-not $?) { Write-Error "Could not create LUN clone."; return }
# Write a new signature
Set-NcLunSignature -Path $cloneLunPath -Controller $controller
| Out-Null
| Out-Null
A Transient switch has been added to Start-NaNdmpCopy to prevent the NDMP copy operation status object being
added to the global variable. The status can then be tracked using the status object emitted by Start-NaNdmpCopy.
Please note: when using the Transient switch, the NDMP copy status will not be returned by Get-NaNdmpCopy. The
status must be captured from Start-NaNdmpCopy.
PS C:\Toolkit\3.1> $ndmp_operation = Start-NaNdmpCopy -SrcController 10.61.167.213 -SrcPath
/beam01/powershell/cifs/VHDX/redhat.vhdx -DstController 10.61.167.86 -DstPath /vol/powershell/redhat SrcCredential root -DstCredential root -SrcAuthType md5 -DstAuthType md5 Transient
PS C:\Toolkit\3.1>
$ndmp_operation
Id
-1
SrcPath
DstPath
BackupBytesProcessed
-------------------------------/beam01/powershell/cifs... /vol/powershell/redhat/
0
State
----RUNNING
PS C:\Toolkit\3.1>
$ndmp_operation.Refresh()
PS C:\Toolkit\3.1>
$ndmp_operation
Id
-1
SrcPath
DstPath
BackupBytesProcessed
-------------------------------/beam01/powershell/cifs... /vol/powershell/redhat/
300 MB
State
----RUNNING
PS C:\Toolkit\3.1>
$ndmp_operation.Refresh()
PS C:\Toolkit\3.1>
$ndmp_operation
Id
-1
SrcPath
DstPath
BackupBytesProcessed
-------------------------------/beam01/powershell/cifs... /vol/powershell/redhat/
827 MB
State
----RUNNING
BackupBytesRemain
----------------0
BackupBytesRemain
----------------25 GB
BackupBytesRemain
----------------24 GB
During an NDMP copy operation, the source and/or destination controllers will send log messages to the host. These log
messages are now captured in the NDMP copy status object.
PS C:\Toolkit\3.1> $ndmp_operation.LogMessages
[10.61.167.213] Log Message: LogType=0, MessageId=1, Message=DUMP: creating
"/beam01/powershell/../snapshot_for_backup.1" snapshot.
[10.61.167.213] Log Message: LogType=0, MessageId=2, Message=DUMP: Using Partial Volume Dump of selected
subtrees
[10.61.167.213] Log Message: LogType=0, MessageId=3, Message=DUMP: Using snapshot_for_backup.1 snapshot
[10.61.167.213] Log Message: LogType=0, MessageId=4, Message=DUMP: Date of this level 0 dump: Wed Jan 22
13:36:43 2014.
[10.61.167.213] Log Message: LogType=0, MessageId=5, Message=DUMP: Date of last level 0 dump: the epoch.
[10.61.167.213] Log Message: LogType=0, MessageId=6, Message=DUMP: Dumping
/beam01/powershell/cifs/VHDX/redhat.vhdx to NDMP connection
[10.61.167.213] Log Message: LogType=0, MessageId=7, Message=DUMP: mapping (Pass I)[regular files]
[10.61.167.213] Log Message: LogType=0, MessageId=8, Message=DUMP: Reading file names from NDMP.
[10.61.167.213] Log Message: LogType=0, MessageId=9, Message=DUMP: mapping (Pass II)[directories]
[10.61.167.213] Log Message: LogType=0, MessageId=10, Message=DUMP: estimated 26269713 KB.
[10.61.167.213] Log Message: LogType=0, MessageId=11, Message=DUMP: dumping (Pass III) [directories]
[10.61.167.213] Log Message: LogType=0, MessageId=12, Message=DUMP: dumping (Pass IV) [regular files]
[10.61.167.86] Log Message: LogType=0, MessageId=1, Message=RESTORE: Wed Jan 22 13:39:42 2014: Begin level 0
restore
[10.61.167.86] Log Message: LogType=0, MessageId=2, Message=RESTORE: Wed Jan 22 13:39:42 2014: Reading
directories from the backup
[10.61.167.86] Log Message: LogType=0, MessageId=3, Message=RESTORE: Wed Jan 22 13:39:43 2014: Creating files
and directories.
[10.61.167.86] Log Message: LogType=0, MessageId=4, Message=RESTORE: Wed Jan 22 13:39:43 2014: Writing data to
files.
Connect-NaController and Connect-NcController will now prompt for credentials when no credentials are supplied and
no credentials are present in the credentials cache.
Set-NaToolkitConfiguration now allows logging to be configured for four different loggers: DataONTAP.PowerShell for
7-mode cmdlet logging, DataONTAP.C.PowerShell for clustered ONTAP cmdlet logging, DataONTAP.HostUtilities for host
utility logging, and NetApp.Ontapi for logging of Data ONTAP API calls. Changing the logging configuration no longer
requires a restart of PowerShell.
PS C:\Toolkit\3.1>
Log
--{DataONTAP.PowerShell: OFF, DataONTAP.C.PowerShell: OFF, DataONTAP.HostUtilities: OFF, NetApp.Ontapi: DEBUG}
Set-NaToolkitConfiguration DEBUG
Log
--{DataONTAP.PowerShell: DEBUG, DataONTAP.C.PowerShell: DEBUG, DataONTAP.HostUtilities: DEBUG, NetApp.Ontapi:
DEBUG}
Several of the cmdlets in the 7-mode net category modify both the active and persistent configuration. Sometimes
modifying the persistent configuration is not desirable. The 7-mode net cmdlets that modify the persistent
configuration have a new ActiveOnly to indicate only the active configuration should be modified. The following cmdlets
contain the new switch: Add-NaNetRoute, Add-NaNetVlan, New-NaNetVif, Remove-NaNetRoute, Remove-NaNetVif,
Remove-NaNetVlan, Set-NaNetInterface, Set-NaNetVif, Set-NaNetVlan
The following example shows how the ActiveOnly switch can remove Vlans from the active configuration and keep them
in the persistent configuration:
PS C:\Toolkit\3.1>
PS C:\Toolkit\3.1>
ConfigStatus
Ifgrps
Interfaces
Routes
Vlans
:
:
:
:
:
{}
{}
{e0a, e0b, e0c, e0d...}
{default}
{}
PS C:\Toolkit\3.1>
ConfigStatus
Ifgrps
Interfaces
Routes
Vlans
:
:
:
:
:
Get-NaNetPersistentConfig
{}
{}
{e0a, e0b, e0c, e0d...}
{default}
{e0c-40, e0c-50}
Several cmdlets have been updated to include new parameters. The following cmdlets have new parameters in the 7mode cmdlet set:
Add-NaNetRoute: ActiveOnly
Add-NaNetVlan: ActiveOnly
New-NaNetVif: ActiveOnly
Remove-NaNetRoute: ActiveOnly
Remove-NaNetVif: ActiveOnly
Remove-NaNetVlan: ActiveOnly
Restore-NaSnapshotFile: SpaceEfficientSplitDisabled, Force
New Cmdlets
There are 58 new cmdlets in Toolkit 3.1, for a grand total of 1437 cmdlets!
The following categories in the 7-Mode set have new cmdlets:
cf (2 cmdlets)
toolkit (1 cmdlet)
ucm (2 cmdlets)
The following categories in the clustered ONTAP set have new cmdlets:
Issues Fixed
RdOps
----0
0
0
1
0
WrOps TotOps
----- -----430
434
515
519
622
631
600
604
590
599
RdLat
----0.0
13.3
0.1
4.6
0.1
WrLat
----0.5
0.7
0.8
1.0
0.9
TotLat
-----0.6
0.8
0.9
1.0
1.0
Read Written
---- ------1 KB
27 MB
1 KB
32 MB
2 KB
39 MB
2 KB
37 MB
2 KB
37 MB
Written
------0
0
128 B
RdOps
----0
0
0
WrOps TotOps
----- -----0
0
0
1
128
128
TotLat
-----0.0
2.0
217.0
LunPath
------/vol/powershell/disk1_gpt
/vol/powershell/luns/cluster
/vol/powershell/luns/disk0
Invoke-NcSysstat works in both the cluster and Vserver context for Data ONTAP 8.2 and up. For Data ONTAP versions
previous to 8.2, Invoke-NcSysstat must be run in the cluster context. The following performance statistics can be
retrieved in the Vserver context: FCP, NFSv3, NFSv4, CIFS, iSCSI, Volume, and LUN.
When run in the cluster context, select monitored performance objects can be filtered by node or Vserver. InvokeNcSysstat will then only monitor the performance objects associated with the given node or Vserver. For example, to
monitor all of the volumes on a specific Vserver:
PS C:\Toolkit\3.0> Invoke-NcSysstat -Volume -Vserver beam01
Name
---beam01_root_vol
clusterdisks
davidCModeIscsiMoun1
ndmp_destination
powershell
testvol
v1NfsSrCMode
vmstorage
RdOps
----0
0
0
0
0
0
0
0
WrOps TotOps
----- -----0
0
0
0
0
0
0
0
370
370
0
0
0
0
0
0
RdLat
----0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
WrLat
----0.0
0.0
0.0
0.0
0.2
0.0
0.0
0.0
TotLat
-----0.0
0.0
0.0
0.0
0.2
0.0
0.0
0.0
Read Written
---- ------0
0
0
0
0
0
0
0
0
23 MB
0
0
0
0
0
0
The following example demonstrates how to monitor specific network ports on the node MFIT-01:
PS C:\Toolkit\3.0> Invoke-NcSysstat -Ifnet -Name e0* -Node MFIT-01
Rcv
--833 B
0
2 KB
0
RcvErr
-----0
0
0
0
Snd
--900 B
0
2 KB
0
SndPkt SndMPkt
------ ------1
0
0
0
12
0
0
0
SndErr
-----0
0
0
0
Coll
---0
0
0
0
Ifnet
----MFIT-01:kernel:e0M
MFIT-01:kernel:e0P
MFIT-01:kernel:e0a
MFIT-01:kernel:e0b
The following performance statistics can be filtered by Vserver: FCP, Volume, CIFS, iSCSI. The following performance
statistics can be filtered by node: FCP, Ifnet, Disk, Volume, CIFS, iSCSI, System.
Additionally, Invoke-NcSysstat can aggregate the performance statistics for select objects by Vserver or node. Instead
of displaying the performance results for each individual object, the performance statistics are aggregated for all the
objects on the given Vserver or node. The following example aggregates the volume performance for all of the volumes
in Vserver beam01:
PS C:\Toolkit\3.0> Invoke-NcSysstat -Volume -Vserver beam01 -Aggregated -Count 5
Name
---beam01
beam01
beam01
beam01
beam01
RdOps
----0
0
0
1
0
WrOps TotOps
----- -----257
266
606
614
357
363
22
24
1
8
RdLat
----0.0
0.0
0.0
0.0
0.0
WrLat
----0.2
0.2
0.3
0.2
0.1
TotLat
-----0.2
0.3
0.3
2.6
0.1
Read Written
---- ------0
16 MB
0
38 MB
0
22 MB
341 B
1 MB
0
2 KB
The following example aggregates the CIFS performance for all of the CIFS servers on the node MFIT-01:
PS C:\Toolkit\3.0> Invoke-NcSysstat -Cifs -Node MFIT-01 -Aggregated -Count 5
Name
---MFIT-01
MFIT-01
MFIT-01
MFIT-01
MFIT-01
RdOps
----0
0
0
0
0
WrOps TotOps
----- -----152
155
153
156
121
123
154
158
155
157
RdLat
----0.0
0.0
0.0
0.0
0.0
WrLat
----0.3
0.3
0.3
0.3
0.3
TotLat
-----0.3
0.3
0.3
0.3
0.3
The CIFS, iSCSI, FCP, and Volume performance statistics can be aggregated by node or Vserver.
ConvertTo-NaVhd: FollowParent
ConvertTo-NaVhdx: FollowParent
Read-NaDirectory: Encode
Set-NaDiskOwner: All, DiskCount, DiskType
Start-NaClone: IgnoreStreams, IgnoreLocks
The following parameters have been added to the clustered ONTAP cmdlet set:
Add-NcSnmpCommunity: VserverContext
Copy-NcLdapClientSchema: VserverContext
Get-NcNfsService: Query
Get-NcPerfInstance: VserverContext
Invoke-NcClusterHaTakeover: BypassOptimization, SkipLifMigration
New-NcClone: IgnoreStreams, IgnoreLocks, QosPolicyGroup
New-NcFlexcachePolicy: MetafilesTimeToLive, SymbolicTimeToLive, OtherTimeToLive, DelegationLruTimeout,
PreferLocalCache, Vserver
New-NcLdapClient: VserverContext
New-NcUser: Comment
Read-NcFile: Stream
Remove-NcFlexcachePolicy: Vserver
Remove-NcLdapClient: VserverContext
Remove-NcLdapClientSchema: VserverContext
Remove-NcSnmpCommunity: VserverContext
Set-NcAutoSupportConfig: IsOndemandEnabled, IsOndemandRemoteDiagEnabled, OndemandServerUrl,
OndemandPollingInterval, MinimumPrivateDataLength
Set-NcDiskOwner: All, DiskCount, DiskType
Set-NcFlexcachePolicy: MetafilesTimeToLive, SymbolicTimeToLive, OtherTimeToLive, DelegationLruTimeout,
PreferLocalCache, Vserver
Set-NcLdapClient: VserverContext
Set-NcLdapClientSchema: VserverContext
Set-NcRoleConfig: MinPasswordSpecialCharacter, PasswordExpirationDuration, MaxFailedLoginAttempts,
LockoutDurationDays, RequireInitialPasswordUpdate
Set-NcUser: Comment
Write-NcFile: Stream
Other Enhancements
Get-NaVirtualDiskAlignment and Repair-NaVirtualDiskAlignment are able to detect and repair alignment issues with
VHD format virtual disks. Toolkit 3.0 extends the functionality of these two cmdlets to include VHDX format virtual
disks.
PS C:\Toolkit\3.0> Get-NaVirtualDiskAlignment C:\ClusterStorage\Volume2\VirtualDisks\Win2k3_VM1\win2k3-boot.vhdx
VirtualDisk: C:\ClusterStorage\Volume2\VirtualDisks\Win2k3_VM1\win2k3-boot.vhdx
IsBootable
---------True
AbsoluteStartingLba
------------------63
Size
---20 GB
IsExtendedBootRecord
-------------------False
IsAligned
--------False
LastWriteTime
Length Name
------------------ ---7/11/2013
4:21 PM 21479030784 win2k3-boot.vhdx
Set-NaVirtualDiskSize enables the growing and shrinking of VHD format virtual disks. Shrinking a disk immediately
reclaims the free space and growing a disk does not consume any additional space until data is written to the disk.
Toolkit 3.0 extends the functionality of Set-NaVirtualDiskSize to include growing and shrinking VHDX format virtual
disks. Please note: shrinking dynamic VHDX format virtual disks is not supported.
PS C:\Toolkit\3.0> Set-NaVirtualDiskSize C:\ClusterStorage\Volume2\VirtualDisks\Win2k3_VM1\win2k3-boot.vhdx
+10GB
Grow VHD
[S] Suspend
LastWriteTime
Length Name
------------------ ---7/12/2013 11:58 AM 32216449024 win2k3-boot.vhdx
The NDMP copy cmdlets (Start-NaNdmpCopy and Invoke-NaNdmpCopy) use the credentials cache to look up
credentials to use to authenticate the NDMP session when no credentials are given in the cmdlet parameters. Before
Toolkit 3.0, the credentials would only be looked up based on the IP addresses supplied in the cmdlet parameters. If the
credentials are stored by hostname, the cmdlet would not find them and the NDMP session would not successfully
authenticate. With Toolkit 3.0, the NDMP copy cmdlets will look up the credentials based on the IP addresses given and
the hostnames associated with the IP addresses.
Prior to Toolkit 3.0, both SrcController and DstController were required parameters on Start-NaNdmpCopy and InvokeNaNdmpCopy. In Toolkit 3.0, DstController is no longer required. If the DstController parameter is omitted, the cmdlet
uses the SrcController as the destination.
PS C:\Toolkit\3.0> Invoke-NaNdmpCopy -SrcController 10.61.169.29 -SrcPath /vol/vol2/cifs/dynamic.vhdx -DstPath
/vol/powershell/vol2dst -SrcAuthType md5 -DstAuthType md5
Copy-NaHostFile has been enhanced to offload copying to Data ONTAP when cloning cannot be used. This behavior is
enabled for files in CIFS shares in Data ONTAP 7.3.5 and higher (excluding Data ONTAP 8.0), and for files in a LUN in Data
ONTAP 8.1.1 and higher. Currently, only 7-Mode is supported.
The below table shows the performance increase for using Copy-NaHostFile to offload the copy operation of a 5GB data
file to Data ONTAP when cloning is not possible:
CIFS
LUN
Copy-NaHostFile
29.744 seconds
37.454 seconds
Copy-Item
2 minutes 45 seconds
1 minute 48 seconds
Copy-NaHostFile has also been enhanced to accept a directory in the DestinationFile parameter. The destination file will
be placed in the given directory with the same name as the source file.
Show-NaHelp now displays help for aliased cmdlets in the clustered ONTAP online help documentation.
New Cmdlets
There are 67 new cmdlets included in Toolkit 3.0, for a total of 1379 cmdlets!
The following clustered ONTAP categories contain new cmdlets:
autosupport (1 cmdlets)
cf (2 cmdlets)
clone (2 cmdlets)
diagnosis (1 cmdlets)
file directory security (21 cmdlets)
fileservice audit (6 cmdlets)
ndmp (1 cmdlets)
perf (8 cmdlets)
sectrace (6 cmdlets)
security certificate (8 cmdlets)
security ssl (2 cmdlets)
service processor (9 cmdlets)
Issues Fixed
:
:
:
:
:
:
:
:
:
:
0
0
0
23
974
239748180
0.000277486319444444
0.00665967166666667
0.3995803
23.974818
SizeUsed
-------83905994752
TotalMilliseconds : 23974.818
SizeUsed
-------78674378752
PS C:\Toolkit\2.4> (83905994752-78674378752)/1gb
4.87232208251953
We reclaimed just under 5GB of space in 24 secondsall without having to take the VM offline!
VMDK to VHD/VHDX with IDE driver injection for Windows Server 2003
If you have ever tried to convert a SCSI VMDK containing Windows Server 2003 to VHD or VHDX, you are probably all too
familiar with the STOP: 0x0000007b error. This occurs when booting the resulting VHD or VHDX after the
conversionrequiring a system repair to remedy.
Toolkit 2.4 introduces the Win2K3ScsiToIde switch to ConvertTo-NaVhd and ConvertTo-NaVhdx. When this switch is
present, the Toolkit will automatically install and configure the IDE drivers in a Windows Server 2003 virtual disk. This
will allow the virtual disk to boot successfully in Hyper-V after the conversion.
PS C:\Toolkit\2.4> ConvertTo-NaVhdx -SourceVmdk C:\ClusterStorage\Volume2\VirtualDisks\VMDK\disk1
.vmdk -DestinationVhdx C:\ClusterStorage\Volume2\VirtualDisks\VMDK\disk1.vhdx -Win2k3ScsiToIde
Mode
----a---
LastWriteTime
Length Name
------------------ ---4/23/2013 10:27 AM 21479030784 disk1.vhdx
Category
-------license
license
license
Family
-----{cluster}
{cluster}
{cluster}
Api
--{license-v2-add}
{license-v2-list-info}
{license-v2-delete, license-v2-delete-
For 7-Mode, the existing license cmdlets have been updated to work with the new licensing APIs. The output for GetNaLicense looks slightly different for Data ONTAP 8.2:
PS C:\Toolkit\2.4> Get-NaLicense -Controller $DOT_8_2
Service
------CIFS
FlexClone
iSCSI
NFS
SnapMirror
SnapRestore
SnapVault
Licensed
-------True
True
True
True
True
True
True
Owner
----stl2240-2-1
stl2240-2-1
stl2240-2-1
stl2240-2-1
stl2240-2-1
stl2240-2-1
stl2240-2-1
Expiration
----------
Notice all of the features listed are licensed. In order to see the status of all of the features, including those that are
currently not licensed, use the new Get-NaFeatureStatus cmdlet:
Notes
----Feature
Feature
Feature
Feature
Feature
Feature
Feature
Feature
Feature
Feature
Feature
Feature
-
not licensed
not licensed
not
not
not
not
not
not
not
not
not
not
licensed
licensed
licensed
licensed
licensed
licensed
licensed
licensed
licensed
licensed
Status
-----not_available
available
on
on
not_available
off
available
on
on
on
available
not_available
not_available
not_available
not_available
not_available
not_available
not_available
not_available
not_available
not_available
on
available
on
on
on
In addition to the new cmdlets (see the New Cmdlets section below for more information on all the new cmdlets in
Toolkit 2.4), many cmdlets have been updated to support Data ONTAP 8.2. In all, over 60 cmdlets have been updated
for Toolkit 2.4!
The following parameters have been added to the 7-Mode cmdlet set:
Set-NaAggr: Force
New-NaAggr: SparePool, AllowMixedRpm, IgnorePoolChecks, PreCheck
Add-NaAggr: AllowMixedRpm, IgnorePoolChecks, PreCheck, ForceCacheSize, CacheRaidType
New-NaAggrMirror: AllowMixedRpm, IgnorePoolChecks, PreCheck
Set-NaSis: EnableIdd, QuickCheckFileSize
Start-NaSis: ScanAll, BuildMetadata, QosPolicy
Set-NaSnapmirrorSchedule: IsCompressed, TcpWindowSize
Set-NaSnapmirrorSyncSchedule: IsCompressed, TcpWindowSize
Set-NaVolAutosize: MinimumSize, GrowThresholdPercent, ShrinkThresholdPercent, Reset, EnableGrow,
EnableGrowShrink
New-NaVolClone: VolumeType
The following parameters have been added to the clustered ONTAP cmdlet set:
Set-NcCifsShare: OfflineFilesMode
Add-NcCifsShare: OfflineFilesMode
Ping-NcHost: UseSourcePort
Remove-NcLun: DestroyFencedLun
New-NcLun: QosPolicyGroup, Class
New-NcNetInterface: NetmaskLength, ListenForDnsQuery
Set-NcNetInterface: NetmaskLength, ListenForDnsQuery
Set-NcQosPolicyReadAhead: Name, UseHistogram
Set-NcQosWorkload: Name, ReadAhead
Remove-NcQosWorkload: Name
Enable-NcSis: InfiniteVolume
Set-NcSis: InfiniteVolume, EnableIdd, QuickCheckFileSize
Start-NcSis: InfiniteVolume, ScanAll, BuildMetadata, QosPolicy
Stop-NcSis: InfiniteVolume
Disable-NcSis: InfiniteVolume
Set-NcSisPolicy: QosPolicy
New-NcSisPolicy: QosPolicy
Update-NcSnapmirror: Policy
Remove-NcSnapmirror: InfiniteVolume
Get-NcSnapmirror: VserverContext
New-NcSnapmirror: Policy
Set-NcSnapmirror: Policy
Invoke-NcSnapmirrorAbort: InfiniteVolume
Invoke-NcSnapmirrorBreak: InfiniteVolume
Invoke-NcSnapmirrorInitialize: TransferPriority
Invoke-NcSnapmirrorQuiesce: Query, ContinueOnFailure, MaxFailureCount
Invoke-NcSnapmirrorResume: Query, ContinueOnFailure, MaxFailureCount
Invoke-NcSnapmirrorResync: SourceSnapshot, Preserve
Invoke-NcSnapmirrorUpdate: SourceSnapshot, TransferPriority
Remove-NcSnapshot: InfiniteVolume
New-NcSnapshot: SnapmirrorLabel, InfiniteVolume
New-NcSnapshotPolicy: SnapmirrorLabel
Add-NcSnapshotPolicySchedule: SnapmirrorLabel
Set-NcSnapshotPolicySchedule: SnapmirrorLabel
Restore-NcSnapshotVolume: InfiniteVolume
Update-NcVol: InfiniteVolume
Set-NcVol: InfiniteVolume
New-NcVol: QosPolicyGroup, ConstituentRole, StorageService, InfiniteVolume, NamespaceAggregate,
MaxNamespaceConstituentSize, MaxDataConstituentSize, NamespaceMirrorAggregate, DataAggregate,
EnableSnapdiff, Language
Rename-NcVol: InfiniteVolume
Remove-NcVol: InfiniteVolume
Set-NcVolAutosize: Reset, Mode, MinimumSize, GrowThresholdPercent, ShrinkThresholdPercent
New-NcVolClone: VolumeType, QosPolicyGroup
Get-NcVolLimit: NamespaceAggregate, MaxNamespaceConstituentSize, MaxDataConstituentSize,
DataAggregate, EnableSnapdiff, NamespaceMirrorAggregate
Set-NcVolSize: InfiniteVolume
Set-NcVserver: QosPolicyGroup, Language
Other Enhancements
Many of the host-side cmdlets use the Na prefix even when they are able to operate on either a 7-Mode or clustered
ONTAP controller. In order to prevent confusion, all of these cmdlets have been aliased with the Nc prefix.
PS C:\Toolkit\2.4> Get-Alias | where { $_.ModuleName -eq 'DataONTAP' }
Capability
---------Cmdlet
Cmdlet
Cmdlet
Cmdlet
Cmdlet
Cmdlet
Cmdlet
Cmdlet
Cmdlet
Cmdlet
Cmdlet
Cmdlet
Cmdlet
Cmdlet
Cmdlet
Cmdlet
Cmdlet
Cmdlet
Cmdlet
Cmdlet
Cmdlet
Cmdlet
Cmdlet
Cmdlet
Cmdlet
Cmdlet
Cmdlet
Cmdlet
Cmdlet
Cmdlet
Cmdlet
Cmdlet
Cmdlet
Cmdlet
Cmdlet
Cmdlet
Cmdlet
Cmdlet
Cmdlet
Cmdlet
Cmdlet
Name
---Add-NcHostIscsiConnection
Connect-NcHostIscsiTarget
ConvertTo-NcLun
ConvertTo-NcVhd
ConvertTo-NcVhdx
ConvertTo-NcVmdk
Copy-NcHostFile
Disconnect-NcHostIscsiTarget
Dismount-NcHostVolume
Dismount-NcVirtualDisk
Format-NcHostVolume
Get-NcHostDisk
Get-NcHostFcAdapter
Get-NcHostFcConnectivity
Get-NcHostIscsiAdapter
Get-NcHostIscsiSession
Get-NcHostIscsiTarget
Get-NcHostVolume
Get-NcHyperV
Get-NcVirtualDiskAlignment
Get-NcVssProvider
Get-NcVssSnapshot
Get-NcVssWriter
Initialize-NcHostDisk
Invoke-NcHostVolumeSpaceReclaim
Invoke-NcVirtualDiskSpaceReclaim
Invoke-NcVssBackup
Mount-NcHostVolume
Mount-NcVirtualDisk
New-NcHostVolume
New-NcVirtualDisk
Remove-NcHostFile
Remove-NcHostIscsiConnection
Remove-NcHostVolume
Repair-NcVirtualDiskAlignment
Restore-NcHostFile
Set-NcHostDisk
Set-NcHostVolumeSize
Set-NcVirtualDiskSize
Start-NcHostDiskRescan
Wait-NcHostDisk
ModuleName
---------DataONTAP
DataONTAP
DataONTAP
DataONTAP
DataONTAP
DataONTAP
DataONTAP
DataONTAP
DataONTAP
DataONTAP
DataONTAP
DataONTAP
DataONTAP
DataONTAP
DataONTAP
DataONTAP
DataONTAP
DataONTAP
DataONTAP
DataONTAP
DataONTAP
DataONTAP
DataONTAP
DataONTAP
DataONTAP
DataONTAP
DataONTAP
DataONTAP
DataONTAP
DataONTAP
DataONTAP
DataONTAP
DataONTAP
DataONTAP
DataONTAP
DataONTAP
DataONTAP
DataONTAP
DataONTAP
DataONTAP
DataONTAP
Toolkit 2.4 supports the Update-Help cmdlet in PowerShell 3.0. Since the Toolkit module is a PowerShell 2.0 module,
the HelpInfoURI property is not present by default. In order to use Update-Help, you must first add the HelpInfoURI
property to the Toolkit module using Add-NaHelpInfoUri. Update-Help will be available the next time the Toolkit
module is loaded.
PS C:\Toolkit\2.4> Get-Module DataONTAP | select HelpInfoUri
HelpInfoUri
-----------
PS C:\Toolkit\2.4> Add-NaHelpInfoUri
WARNING: HelpInfoURI will be available the next time the DataONTAP module is loaded.
PS C:\Toolkit\2.4> Remove-Module DataONTAP
PS C:\Toolkit\2.4> Import-Module DataONTAP
PS C:\Toolkit\2.4> Get-Module DataONTAP | select HelpInfoUri
HelpInfoUri
----------http://powershell.netapp.com/help/DataONTAP/
New Cmdlets
The following are new cmdlets, not including the Data ONTAP 8.2 API set:
Invoke-NaVirtualDiskSpaceReclaim
aggr (1 cmdlet)
feature (1 cmdlet)
volume (2 cmdlets)
aggr (8 cmdlets)
cifs (31 cmdlets)
cluster (2 cmdlets)
feature (1 cmdlet)
fpolicy (22 cmdlets)
group mapping (5 cmdlets)
license (3 cmdlets)
lun (3 cmdlets)
net (6 cmdlets)
qos (10 cmdlets)
qtree (1 cmdlet)
snapmirror (7 cmdlets)
snapmirror policy (7 cmdlets)
snapshot (4 cmdlets)
system (1 cmdlet)
volume (5 cmdlets)
vserver (1 cmdlet)
vserver peer (7 cmdlets)
vserver peer transition (4 cmdlets)
Issues Fixed
Toolkit 2.3 introduces four new cmdlets used to interact with VSS: Get-NaVssProvider, Get-NaVssSnapshot, GetNaVssWriter, and Invoke-NaVssBackup.
Get-NaVssProvider retrieves information about the VSS providers on the host system.
PS C:\Toolkit\2.3.0> Get-NaVssProvider
ProviderId
ProviderName
ProviderType
ProviderVersion
ProviderVersionId
ClassId
:
:
:
:
:
:
b5946137-7b9f-4925-af80-51abd60b20d5
Microsoft Software Shadow Copy provider 1.0
SYSTEM
1.0.0.7
00000001-0000-0000-0007-000000000001
65ee1dba-8ff4-4a58-ac1c-3470ee2f376a
ProviderId
ProviderName
ProviderType
ProviderVersion
ProviderVersionId
ClassId
:
:
:
:
:
:
ddd3d232-a96f-4ac5-8f7b-250fd91fd102
Data ONTAP VSS Hardware Provider
HARDWARE
6. 4. 1. 5319
1a0989d8-b25b-439a-988a-a0f173f22046
819e04d3-809b-4657-aee0-778ca24470da
:
:
:
:
:
Name
WriterId
WriterInstanceId
State
LastError
:
:
:
:
:
Name
WriterId
WriterInstanceId
State
LastError
:
:
:
:
:
Name
WriterId
WriterInstanceId
State
LastError
:
:
:
:
:
Name
WriterId
WriterInstanceId
State
LastError
:
:
:
:
:
ASR Writer
be000cbe-11fe-4426-9c58-531aa6355fc4
e2873497-f970-4e2f-b44c-11a1c3fd17ae
STABLE
0
Name
WriterId
WriterInstanceId
State
LastError
:
:
:
:
:
Name
WriterId
WriterInstanceId
State
LastError
:
:
:
:
:
Name
WriterId
WriterInstanceId
State
LastError
:
:
:
:
:
Registry Writer
afbab4a2-367d-4d15-a586-71dbb18f8485
d22a492a-3cbc-40a8-b0bb-1e6e64dd61a2
STABLE
0
Name
WriterId
WriterInstanceId
State
LastError
:
:
:
:
:
WMI Writer
a6ad56c2-b509-4e6c-bb19-49d8f43532f0
be895ef9-94a9-4888-98d7-01e2e7253752
STABLE
0
Name
WriterId
WriterInstanceId
State
LastError
:
:
:
:
:
Get-NaVssSnapshot gets information about the shadow copies present on the current host system.
PS C:\Toolkit\2.3.0> Get-NaVssSnapshot ALL
SnapshotId
SnapshotSetId
SnapshotsCount
SnapshotDeviceObject
OriginalVolumeName
OriginatingMachine
ServiceMachine
ExposedName
ExposedPath
ProviderId
SnapshotAttributes
Attributes
CreationTimestamp
CreationTimestampDT
Status
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
c38d662f-9ba1-4108-9fae-dc892683a86e
326a2347-b72b-450b-b752-068b08aa1c2b
1
\\?\Volume{050d454f-4b47-11e2-bfec-0015172ff491}
\\?\Volume{c7cb1e06-40e3-11e1-96a3-0015172ff491}\
XYRATEX02.rtprre.testdomain
XYRATEX02.rtprre.testdomain
ddd3d232-a96f-4ac5-8f7b-250fd91fd102
65545
{PERSISTENT, NO_AUTO_RELEASE, HARDWARE_ASSISTED}
130021461736416697
1/8/2013 7:16:13 PM
CREATED
Invoke-NaVssBackup offers a basic mechanism for interacting with VSS as a requester. Invoke-NaVssBackup operates
on full volumesit will not operate in component mode. The parameters IncludeWriter and ExcludeWriter provide a
mechanism for explicitly selecting writers to participate in the backup processing.
PS C:\Toolkit\2.3.0> Invoke-NaVssBackup -Volume '\\?\Volume{c7cb1e06-40e3-11e1-96a3-0015172ff491}\'
Installer
Toolkit 2.3 is the first version of the Data ONTAP PowerShell Toolkit made available with a proper Windows installer.
You can now install the Toolkit using the installer (no more manually copying files) and uninstall the Toolkit using
Add/Remove Programs in Windows. Be sure to remove any previous versions of the Toolkit before running the installer.
SCSI XCOPY
Whenever possible, the PowerShell Toolkit uses WAFL block cloning to copy data from one file to another. When the
WAFL blocks are not aligned, as is the case with Repair-NaVirtualDiskAlignment and ConvertTo-NaVhd for dynamic to
fixed VHD conversion, data must be copied. In some cases this means utilizing a host-based copy, which can be painfully
slow.
Toolkit 2.3 will attempt to use SCSI XCOPY for Repair-NaVirtualDiskAlignment and ConvertTo-NaVhd (for dynamic to
fixed VHD conversion) once it has been determined a host-based copy must be used. If the SCSI XCOPY operation fails,
the cmdlets will then fall back to using the slower host-based copy.
The following table compares running the two cmdlets using SCSI XCOPY and a host-based copy. The VHD disk0.vhd
contains the boot drive of a Windows 2003 virtual machine that is misaligned. The disk is first converted to a fixed VHD
using ConvertTo-NaVhd, and then aligned using Repair-NaVirtualDiskAlignment.
Command
SCSI XCOPY
Host-Based Copy
19.188 seconds
1 minute, 10 seconds
Repair-NaVirtualDiskAlignment VirtualDisk
E:\VHD\disk0_fixed.vhd
2 minutes, 25 seconds
12 minutes, 15 seconds
This functionality is available for Data ONTAP 8.1.1 7-Mode and will be available for clustered ONTAP in a future release.
To further simplify private key authentication, the variable $DataONTAP_SSHPrivateKeyFile can be set instead of
specifying the PrivateKeyFile parameter for each invocation of Invoke-NaSsh and Invoke-NcSsh. Invoke-NaSsh and
Invoke-NcSsh will read this variable and use the private key file specified to authenticate the SSH connection.
PS C:\Toolkit\2.3.0> $DataONTAP_SSHPrivateKeyFile = "C:\ssh\privatekey"
PS C:\Toolkit\2.3.0> Invoke-NaSsh -Name [email protected] -Command "vol status"
Volume State
Status
Options
vol1 online
raid_dp, flex
sis
PS C:\Toolkit\2.3.0> Invoke-NaSsh -Name [email protected] -Command "vol status"
Volume State
Status
Options
vol0 online
raid0, flex
root, no_atime_update=on,
create_ucode=on,
convert_ucode=on,
maxdirsize=2621
powershell online
raid_dp, flex
create_ucode=on,
convert_ucode=on, guarantee=none,
fractional_reserve=0
State
-----
TotalSize
---------
Used
----
Vserver
-------
How does this affect the Toolkit? Consider this method for querying clustered ONTAP for volumes with a size greater
than 100GB:
PS
PS
PS
PS
C:\Toolkit\2.3.0>
C:\Toolkit\2.3.0>
C:\Toolkit\2.3.0>
C:\Toolkit\2.3.0>
With PowerShell 3 and Toolkit 2.3, this can be condensed into a single line:
PS C:\Toolkit\2.3.0> Get-NcVol -Query @{TotalSize=">$(100GB)"}
Or, you can look for something more specific still using a single line:
PS C:\Toolkit\2.3.0> Get-NcVol -Query @{TotalSize=">$(100GB)"; State="online"; Aggregate="aggr1"}
Other Enhancements
Get-NaHelp and Get-NcHelp now include a cmdlet synopsis.
PS C:\Toolkit\2.3.0 > Get-NaHelp -Category aggr | ft Name, Category, Synopsis -AutoSize
Name
---Add-NaAggr
Confirm-NaAggrSpareLow
(parity ...
Get-NaAggr
Get-NaAggrFilerInfo
given...
Get-NaAggrMediaScrub
Get-NaAggrOption
Get-NaAggrScrub
Get-NaAggrSpace
Get-NaAggrVerify
New-NaAggr
New-NaAggrMirror
Remove-NaAggr
Rename-NaAggr
Resume-NaAggrScrub
Resume-NaAggrVerify
Set-NaAggr
Set-NaAggrOption
Split-NaAggrMirror
aggr...
Start-NaAggrScrub
Start-NaAggrVerify
Stop-NaAggrScrub
Stop-NaAggrVerify
Suspend-NaAggrScrub
Suspend-NaAggrVerify
Category
-------aggr
aggr
Synopsis
-------Add disks to the specified aggregate.
Return true if there is no suitable spare disk available for any filesystem
aggr
aggr
aggr
aggr
aggr
aggr
aggr
aggr
aggr
aggr
aggr
aggr
aggr
aggr
aggr
aggr
Get the status of media scrubbing on the named aggregate, plex, or RAID group.
Get the options that have been set for the specified aggregate.
Get the status of parity scrubbing on the named aggregate, plex, or RAID group.
Show the space usage of the aggregate on a per flexible volume basis.
Get the status of RAID mirror verification on the named aggregate.
Create a new aggregate.
Turns an unmirrored aggregate into a mirrored aggregate by adding a plex to it.
Destroys the specified aggregate or plex.
Rename the specified aggregate.
Resume parity scrubbing on the named aggregate, plex, or RAID group.
Resume RAID mirror verification on the named aggregate.
Set the specified aggregate or plex online, offline, or restricted.
Set the specified option for the given aggregate.
Remove the specified plex from a mirrored aggregate and create a new unmirrored
aggr
aggr
aggr
aggr
aggr
aggr
Category
-------aggr
aggr
Family
-----{cluster}
{cluster}
Synopsis
-------Add disks to the specified aggregate.
Return true if there is no suitable spare disk available for any
aggr
aggr
aggr
aggr
aggr
aggr
aggr
{cluster}
{cluster}
{cluster}
{cluster}
{cluster}
Get the options that have been set for the specified aggregate.
Create a new aggregate with the given name.
Destroys the specified aggregate.
Rename the specified aggregate.
Set the specified aggregate online, offline, or restricted.
Set-NcAggrOption
aggr
Two new cmdlets, Get-NaCommand and Get-NcCommand, are now available to help improve cmdlet discoverability.
Get-NaCommand allows 7-Mode cmdlets to be searched by Name, Api, Category, Verb, and/or Noun, in any
combinationincluding wildcards. Get-NcCommand allows clustered ONTAP cmdlets to be searched by Name, Api,
Family, Category, Verb, and/or Noun, in any combinationincluding wildcards. Both Get-NaCommand and GetNcCommand contain the switch ListAvailable which restricts the results to only cmdlets available in the current (or
specified) controller context. The ListUnavailable switch is available to restrict the results to only cmdlets unavailable in
the current (or specified) controller context.
For example, the following command gets all of the Get commands in the aggr and disk categories that are unsupported
in the current controller context:
PS C:\Toolkit\2.3.0> Get-NcCommand -Verb Get -Category aggr, disk -ListUnavailable
Name
---Get-NcAggr
Get-NcAggrNodeInfo
Get-NcAggrOption
Get-NcDisk
Get-NcDiskOwner
Get-NcDiskOwnerFiler
Category
-------aggr
aggr
aggr
disk
disk
disk
Family
-----{cluster}
{cluster}
{cluster}
{cluster}
{cluster}
{cluster}
Api
--{aggr-get-iter}
{aggr-get-filer-info}
{aggr-options-list-info}
{storage-disk-get-iter}
{disk-sanown-list-info}
{disk-sanown-filer-list-info}
Set-NaUserPassword and Set-NcUserPassword will update the current controller connection credentials automatically if
they are affected by the password change.
Cmdlets that use the vfiler-setup API (Set-NaVfilerAddress, Set-NaVfilerAdminHost, Set-NaVfilerDns, Set-NaVfilerNis,
and Set-NaVfilerPassword) have been updated to include PreserveEtcHosts and PreserveEtcExports switches. The
vfiler-setup API rewrites the /etc/hosts and /etc/exports files. Sometimes this behavior is not desirable. The
PreserveEtcHosts and PreserveEtcExports switches will automatically restore the /etc/hosts and /etc/exports files on the
vfiler to their pre-vfiler-setup state.
Issues Fixed
33 minutes, 3 seconds
15 seconds
The New-NaVirtualDisk cmdlet contains a new Switch, -VHDX, to enable the creation of VHDX virtual disks. The optional
-Dynamic switch allows the creation of dynamic VHDX files, which now are aligned and will stay aligned as the file grows!
PS C:\Toolkit\2.2.0> New-NaVirtualDisk -FullName C:\ClusterStorage\Volume2\VirtualDisks\disk2.vhdx -Vhdx -Size
200GB
Mode
----a---
LastWriteTime
Length Name
------------------ ---10/17/2012 10:04 AM 214752559104 disk2.vhdx
A new cmdlet, ConvertTo-NaVhdx, enables the conversion to VHDX virtual disks from VHDs, VMDKs, or LUNs.
PS C:\Toolkit\2.2.0> ConvertTo-NaVhdx -SourceVhd C:\ClusterStorage\Volume2\VirtualDisks\disk2.vhd
Mode
----a---
LastWriteTime
Length Name
------------------ ---10/18/2012
9:17 AM 214752559104 disk2.vhdx
LastWriteTime
Length Name
------------------ ---10/18/2012
9:23 AM 53691285504 disk2.vhdx
LastWriteTime
Length Name
------------------ ---10/18/2012
9:26 AM 53724839936 disk1.vhdx
LastWriteTime
Length Name
------------------ ---10/17/2012
4:29 PM 214748365312 disk2.vhd
LastWriteTime
Length
-----------------10/17/2012
4:12 PM
334
10/17/2012
4:12 PM 214748364800
Name
---disk2.vmdk
disk2-flat.vmdk
Size Protocol
Online Mapped
---- ------------- -----50.0 GB windows_2008 True False
Thin
---True
Vserver
------beam01
IPv6 Support
The toolkit is now ready for IPv6! Connect-NaController and Connect-NcController have been updated to enable
connections to Data ONTAP controllers via IPv6.
Version
------NetApp Release 8.1.1X34 7-Mode: Thu May 31 21:30:59 PDT 2012
The NDMP copy cmdlets, Start-NaNdmpCopy and Invoke-NaNdmpCopy, have been updated with a new -UseIpv6 switch
which will establish a connection between the source and destination controllers using IPv6. Both source and
destination controllers must support IPv6.
PS C:\Toolkit\2.2.0> Invoke-NaNdmpCopy -SrcController fe80::20c:29ff:fe9c:d223%26 -DstController
fe80::20c:29ff:fe2d:4e78%26 -SrcPath /vol/vmstorage -DstPath /vol/vmstorage -SrcAuthType md5 -DstAuthType md5 UseIpv6
The parameters -Address, -StartAddress and -EndAddress of Find-NaController and Find-NcController have been
updated to accept IPv6 addresses.
PS C:\Toolkit\2.2.0> Find-NaController -Address fe80::20c:29ff:fe9c:d223%26
Name
---dino
PDT 2012
Address
Status
-----------fe80::20c:29ff:fe... OK
Description
----------NetApp Release 8.1.1X34 7-Mode: Thu May 31 21:30:59
Capacity
-------19.0 MB
380.0 GB
380.0 GB
10.0 GB
Used
---124.0 KB
1.8 GB
77.4 GB
1.4 MB
SnapshotUsed
-----------720.0 KB
1.9 GB
66.1 MB
920.0 KB
Returns
------52.0 KB
1.6 GB
518.8 GB
468.0 KB
EffectiveUsed
------------176.0 KB
3.4 GB
596.3 GB
1.9 MB
EfficiencyPercent
----------------0.9%
0.9%
156.9%
0.0%
Capacity
-------11.0 GB
100.0 GB
19.0 MB
8.5 GB
7.0 GB
475.0 GB
Used
---5.9 GB
1.8 MB
128.0 KB
3.5 GB
1.9 GB
251.3 MB
SnapshotUsed
-----------260.0 KB
0
832.0 KB
0
0
122.0 MB
Returns
------6.0 GB
0
44.8 KB
0
99.9 MB
439.0 MB
EffectiveUsed
------------12.0 GB
1.8 MB
172.8 KB
3.5 GB
2.0 GB
690.3 MB
EfficiencyPercent
----------------108.7%
0.0%
0.9%
41.4%
28.7%
0.1%
Vserver: costea01
Name
---cloneCMode1
cloneCMode2
costea01_root_vol
iscsiCModeSR4Dedupe
mfitFcCmodeSr2
unitTestLuns
A script posted on the Data ONTAP PowerShell communities takes the output from Get-NcEfficiency and exports the
data to Microsoft Excelincluding a few graphical representations of the data.
// invoke New-NaVol
PowerShell newVolume = PowerShell.Create();
newVolume.Runspace = this.runspace;
newVolume.AddCommand("New-NaVol");
newVolume.AddParameter("Name", "testvol");
newVolume.AddParameter("Aggregate", "aggr1");
newVolume.AddParameter("SpaceReserve", "none");
newVolume.AddParameter("Size", "50GB");
Collection<PSObject> results = newVolume.Invoke();
This is 20 lines of code to accomplish four fairly straightforward tasks. Now consider this example which accomplishes
the same task using the Proxy.
// instantiate a Proxy object
Proxy ontapProxy = new Proxy();
// connect to the controller
ontapProxy.NaController.Connect("dunn");
// create the volume
VolumeInfo newVol = ontapProxy.NaVol.New("testvol", "aggr1", SpaceReserve: "none", Size:
"50GB").First();
What originally took 20 lines takes 3 when using the Proxy. See the post on the Data ONTAP PowerShell communities
site for more information on how to get started.
Other Enhancements
Initialize-NaController performs the initial configuration of a Data ONTAP controller. Toolkit 2.2 provides an update to
this cmdlet so that it is now compatible with Data ONTAP 8.1 7-Mode.
PS C:\Toolkit\2.2.0> Initialize-NaController 192.168.85.10 -Hostname rex -PrimaryInterface e0a -Gateway
255.255.255.0 -PrimaryInterfaceAddress 192.168.85.139 -Password p@ssword
Initialize controller
Are you sure you want to initialize controller 192.168.85.10/rex?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"):
WARNING: Nis is no longer supported in this cmdlet as of ONTAP 8.1, use Get-NaOption nis.* and Set-NaOption
instead
Reboot Controller
Controller 192.168.85.139/rex must be rebooted before it is ready to use, would you like to do that now?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"):
Two new cmdlets, Get-NaToolkitConfiguration and Set-NaToolkitConfiguration, allow you to easily disable and enable
debug logging.
PS C:\Toolkit\2.2.0> Get-NaToolkitConfiguration
DebugLevel
---------OFF
PS C:\Toolkit\2.2.0> Set-NaToolkitConfiguration -DebugLevel DEBUG
WARNING: New debug level will take effect after PowerShell is restarted.
DebugLevel
---------DEBUG
New Cmdlets
Fourteen new cmdlets have been added to Toolkit 2.2, bringing the total number of cmdlets up to 1172!
These are new host-side cmdlets included in Toolkit 2.2:
Add-NaHostIscsiConnection
ConvertTo-NaVhdx
Get-NaHostFcConnectivity
Get-NaToolkitConfiguration
Get-NcHostFcConnectivity
Remove-NaHostIscsiConnection
Set-NaToolkitConfiguration
Add-NaIscsiInterfaceAccess
Get-NaCifsBranchCacheHashStatistics
Remove-NaIscsiInterfaceAccess
Set-NaCifsBranchCacheKey
Get-NcEfficiency
Get-NcTime
Set-NcTime
Issues Fixed
Restore-NaHostFile would sometimes fail when a GPT disk came online as read-only.
Restore-NaHostFile would fail if the temporary LUNs disk volumes were not discovered immediately.
Get-NaVolAutosize would return values 1024 times too large.
Set-NaQuota would overwrite existing quota settings with default values if not specified.
As newer versions of APIs were released, it made sense to update the return types of the cmdlets. We were careful to
retain backwards compatibility when updating to a newer version, which resulted in this change occurring more or less
unnoticed by the average PowerShell user. As more developers show interest in bundling the toolkit in .Net projects,
this approach becomes less appealing. It is needlessly difficult (and somewhat dangerous) to write strongly-typed code
when these types are not guaranteed to stay the same. Toolkit 2.1 stabilizes these output types; they will no longer
change between releases:
PS C:\Toolkit\2.1.0> Get-NaLun | gm
TypeName: DataONTAP.Types.Lun.LunInfo
This change allows us to automatically update our return types whenever updated APIs are added to the toolkit ensuring
that you have the latest and greatest with each release of the toolkit. Users bundling the toolkit can safely work with
strongly-typed code without fear of a newer version of the toolkit changing established return types.
LastWriteTime
Length Name
------------------ ---7/25/2012 11:09 AM 3275747840 virtual.vhd
Other enhancements
Find-NcController will only display Cluster LIFs unless the All switch is present. This enables easier identification of
Data ONTAP clusters in the discovery process.
PS C:\Toolkit\2.1.0> Find-NcController 10.60.189.0 -Mask 255.255.255.0
Name
---vxertp-3270-br1-br2
vxe3170a
dot-vsac12
vvol-vsim
VxeRubble
Address
------10.60.189.26
10.60.189.40
10.60.189.130
10.60.189.157
10.60.189.172
Status
------
Description
----------NetApp Release
NetApp Release
NetApp Release
NetApp Release
NetApp Release
With the All switch, all the SNMP devices on the given subnet are returned.
PS C:\Toolkit\2.1.0> Find-NcController 10.61.172.0 -Mask 255.255.255.0 -All
Name
---brocade200e-11
spec01node01
spec01node02
brocade200e-19
refex-2050-4
TESO-17
TESO-18
Address
------10.61.172.11
10.61.172.12
10.61.172.14
10.61.172.19
10.61.172.26
10.61.172.83
10.61.172.85
Status
------
Noncritical
Description
----------Fibre Channel Switch.
NetApp Release RollingRock__8.1.0 Cluster-Mo
NetApp Release RollingRock__8.1.0 Cluster-Mo
Fibre Channel Switch.
NetApp Release 7.3.4: Thu May 27 17:52:48 PD
NetApp Release 8.1.1RC1 Cluster-Mode: Fri Ju
NetApp Release 8.1.1RC1 Cluster-Mode: Fri Ju
stl3270-5
stl3270-6
TESO-04
TESO-03
stlfas3240-3
stlfas3240-4
stlfas3270-19
stlfas3270-20
ucs-fas3170-1
ucs-fas3170-2
teso-fas3170-11an...
teso-fas3170-11an...
teso-fas3170-13
teso-fas3170-14
teso-fas3170-15
teso-fas3170-16
spec01node03
spec01node04
ben-3
ben-4
ben-5
fas3270cluster-01-01
fas3270cluster-01-02
oracmode01-01
pal-1
IBM Remote Superv...
2040-5
2040-6
server_2
FUJIS5-11
ALJ2526F064
ALJ2526F06C
fas3270-1
fas3270-2
TESO-02
TESO-01
hercules1
10.61.172.95
10.61.172.96
10.61.172.99
10.61.172.100
10.61.172.115
10.61.172.116
10.61.172.131
10.61.172.132
10.61.172.135
10.61.172.136
10.61.172.137
10.61.172.138
10.61.172.139
10.61.172.140
10.61.172.141
10.61.172.142
10.61.172.151
10.61.172.153
10.61.172.165
10.61.172.166
10.61.172.173
10.61.172.188
10.61.172.189
10.61.172.194
10.61.172.217
10.61.172.223
10.61.172.225
10.61.172.226
10.61.172.227
10.61.172.234
10.61.172.235
10.61.172.236
10.61.172.237
10.61.172.238
10.61.172.240
10.61.172.247
10.61.172.254
OK
OK
Noncritical
Noncritical
OK
OK
OK
OK
Critical
Critical
Noncritical
OK
Noncritical
OK
OK
OK
Critical
Critical
OK
OK
Critical
The NDMP copy cmdlets now support incremental levels 0-9 and Incremental Forever using the switch
IncrementalForever.
PS C:\Toolkit\2.1.0> Invoke-NaNdmpCopy -SrcController 10.61.167.60 -SrcPath /vol/source/ -DstController
10.61.169.29 -DstPath /vol/destination/ -SrcAuthType md5 -DstAuthType md5 Level 0
Set-NaUser now supports setting the password minimum and maximum age.
PS C:\ Toolkit\2.1.0> Set-NaUser steven -PasswordMinAge 0 -PasswordMaxAge 100
Name
---steven
Comment
-------
Groups
-----{Users}
New-NcVserver contains the ability to create repository Vservers with the new RepositoryVserver switch (new to Data
ONTAP 8.1.1).
PS C:\Toolkit\2.1.0> New-NcVserver -Name repo -RootVolume repo_root -NameServerSwitch file RootVolumeSecurityStyle unix -RootVolumeAggregate aggr1 -RepositoryVserver
Vserver
------repo
State
----running
VserverType
----------data
Comment
-------
New cmdlets
These are new cmdlets in Data ONTAP PowerShell Toolkit 2.1, not including the Cluster-Mode set:
Restore-NaHostFile
Address
------10.58.96.30
10.58.96.30
10.58.96.30
10.58.96.30
Vserver
------Sea3210-SP
Sea3210-XD
Sea3210-SME
Sea3210-SQL
Version
------NetApp Release
NetApp Release
NetApp Release
NetApp Release
RollingRock__8.1.0
RollingRock__8.1.0
RollingRock__8.1.0
RollingRock__8.1.0
Cluster-Mode:
Cluster-Mode:
Cluster-Mode:
Cluster-Mode:
Thu
Thu
Thu
Thu
Nov
Nov
Nov
Nov
...
...
...
...
PS C:\Toolkit\2.0.0> New-NcVol -Name vmstorage -Aggregate aggr1_Sea3240_01 -JunctionPath /vmstorage -SecurityStyle ntfs SpaceReserve none -Size 10tb
Name
---vmstorage
vmstorage
vmstorage
vmstorage
State
----online
online
online
online
TotalSize
--------10.0 TB
10.0 TB
10.0 TB
10.0 TB
Used
---36%
37%
37%
38%
Available
--------6.3 TB
6.3 TB
6.2 TB
6.2 TB
Dedupe
-----False
False
False
False
Aggregate
--------aggr1_Sea3240_01
aggr1_Sea3240_01
aggr1_Sea3240_01
aggr1_Sea3240_01
Vserver
------Sea3210-SP
Sea3210-XD
Sea3210-SME
Sea3210-SQL
Size
---10.0 TB
10.0 TB
10.0 TB
10.0 TB
Protocol
-------hyper_v
hyper_v
hyper_v
hyper_v
Online
-----True
True
True
True
Mapped
-----False
False
False
False
Thin
---True
True
True
True
Vserver
------Sea3210-SP
Sea3210-XD
Sea3210-SME
Sea3210-SQL
Comment
-------
Thin
---True
True
True
True
True
True
True
True
True
True
True
True
True
True
True
True
Vserver
------Sea3210-SP
Sea3210-SP
Sea3210-SP
Sea3210-SP
Sea3210-XD
Sea3210-XD
Sea3210-XD
Sea3210-XD
Sea3210-SME
Sea3210-SME
Sea3210-SME
Sea3210-SME
Sea3210-SQL
Sea3210-SQL
Sea3210-SQL
Sea3210-SQL
Comment
-------
Size
---10.0 TB
10.0 TB
10.0 TB
10.0 TB
10.0 TB
10.0 TB
10.0 TB
10.0 TB
10.0 TB
10.0 TB
10.0 TB
10.0 TB
10.0 TB
10.0 TB
10.0 TB
10.0 TB
Protocol
-------hyper_v
hyper_v
hyper_v
hyper_v
hyper_v
hyper_v
hyper_v
hyper_v
hyper_v
hyper_v
hyper_v
hyper_v
hyper_v
hyper_v
hyper_v
hyper_v
Online Mapped
------ -----True
True
True
True
True
True
True
True
True
True
True
True
True
True
True
True
True
True
True
True
True
True
True
True
True
True
True
True
True
True
True
True
An earlier Toolkit release introduced New-NaVirtualDisk, which creates thin, fixed VHD files without the wait or the upfront storage spend. But for everyone who already has dynamic VHD files on Data ONTAP, Toolkit 2.0 updates
ConvertTo-NaVhd to convert dynamic VHDs to thin, fixed ones. The conversion runs as quickly as possible using a
combination of copy offload and block cloning.
PS C:\Toolkit\2.0.0> ConvertTo-NaVhd -SourceVhd M:\Dynamic.vhd -DestinationVhd M:\Fixed.vhd
Mode
----a---
LastWriteTime
Length Name
------------------ ---4/19/2012
2:25 PM 536870912512 Fixed.vhd
LastWriteTime
Length Name
------------------ ---4/30/2012
4:13 PM 53694628352 hostdisk1.vhd
TotalSize
--------40.0 GB
SizeUsed Protocol
Online Mapped
-------- ------------- -----40.1 GB windows_2008 True False
Thin
---True
Comment
-------
State
----RUNNING
SrcPath
------/vol/vol1/virtual.vhd
DstPath
------/vol/vol4/
BackupBytesProcessed
-------------------0
BackupBytesRemain
----------------0
State
----SUCCESS
SrcPath
------/vol/vol1/virtual.vhd
DstPath
------/vol/vol4/
BackupBytesProcessed
-------------------20 MB
BackupBytesRemain
-----------------
The NDMP copy cmdlets work for controllers operating in 7-Mode and Cluster-Mode, including between controllers
operating in 7-Mode and Cluster-Mode.
Toolkit 2.0 adds Enable-NaNdmp, Disable-NaNdmp, Enable-NcNdmp, and Disable-NcNdmp to enable and disable
NDMP on controllers operating in 7-mode or Cluster-mode.
Installation scripts
The beauty of PowerShell module installation is that no registration is necessary; the files merely have to be copied into
one of a few potential locations. But there are still issues that can arise, most notably the Toolkit failing to load because
the zone identifier security flag was not cleared after the DataONTAP.zip file was downloaded from the Internet. The
Install.ps1 and Uninstall.ps1 scripts that we ship alongside the Toolkit have been improved for simpler operation, and
the installer script clears the zone identifier so that the Toolkit always loads correctly. In most cases, it should be
possible to accept all the defaults and install the Toolkit in seconds. You just need to have these scripts in the same
directory as the DataONTAP.zip file, and you may have to be running with elevated privileges to access the system-level
PowerShell directory.
PS C:\Toolkit\2.0.0> .\Install.ps1
Choose an installation destination:
1: C:\Users\cknight\Documents\WindowsPowerShell\Modules
2: C:\Windows\system32\WindowsPowerShell\v1.0\Modules
Install to directory: [2]:
Installed successfully; run "Import-Module DataONTAP" to make the cmdlets available.
Uninstallation is just as simple. Note that the script shows which versions are installed.
PS C:\Toolkit\2.0.0> .\Uninstall.ps1
Before continuing, please close all PowerShell instances that have the DataONTAP module loaded.
Choose an installation to uninstall:
1: C:\Windows\system32\WindowsPowerShell\v1.0\Modules\DataONTAP (installed: 2.0.0.109)
Uninstall from directory: [1]:
The uninstallation completed successfully.
Other enhancements
A new cmdlet, Add-NcHostIscsiTargetPortal, handles iSCSI initiator target portal configuration for Cluster-Mode
Vservers.
PS C:\Toolkit\2.0.0> Connect-NcController costea01
PS C:\Toolkit\2.0.0> Add-NcHostIscsiTargetPortal
TargetName
InitiatorName
---------------------iqn.1992-08.com.netapp:sn.8e332132edd... Root\ISCSIPRT\0000_0
IsConnected
----------True
A timeout parameter is now available on Invoke-NaSsh and Invoke-NcSsh. This can speed script execution where
commands are sent to multiple systems, any of which might not be reachable.
PS C:\Toolkit\2.0.0> Invoke-NaSsh -Name 10.10.10.10 -Credential root -Command "aggr status" -Timeout 500
Invoke-NaSsh : System.TimeoutException: Socket connection timed out
Get-NaEfficiency now includes additional fields to determine how far a volume or aggregate is overprovisioned. Use the
Recurse switch to cause the cmdlet to calculate this value.
PS C:\Toolkit\2.0.0> Get-NaEfficiency -Recurse -Volume vol2 | select Name, OverProvisioningPercent
Name OverProvisioningPercent
---- ----------------------vol2
135
PS C:\Toolkit\2.0.0> Get-NaEfficiency -Recurse -Aggregate * | select Name, OverProvisioningPercent
Name OverProvisioningPercent
---- ----------------------aggr0
88
aggr1
85
aggr2
182
RPC error messages could sometimes be too generic. Toolkit 2.0 should return better descriptions of any errors
returned by Windows RPC subsystem.
PS C:\Toolkit\2.0.0> Connect-NaController dunn -RPC
Connect-NaController : RPC Error: The security context is invalid. Code 0xC0020032.
Data ONTAP 8.1 creates 64-bit aggregates by default. New-NaAggr adds a Use32Bit switch to force creation of a 32-bit
aggregate.
A bug in some versions of Data ONTAP 8 can lead to a controller panic if an igroup is created without a type specified.
As a workaround, New-NaIgroup and New-NcIgroup now use a default igroup type of windows if no other value is set.
Get-NaClone adds more parameter sets to more closely match the behavior of the underlying API.
New cmdlets
These are the new cmdlets in Data ONTAP PowerShell Toolkit 2.0, not including the Cluster-Mode set:
Invoke-NaEmsAutosupportLog
Rename-NaFile
Get-NaLunAttribute
Set-NaLunAttribute
ConvertTo-NaLun
Disable-NaNdmp
Enable-NaNdmp
Invoke-NaNdmpCopy
Start-NaNdmpCopy
Stop-NaNdmpCopy
Get-NaNdmpCopy
Audit (2 cmdlets)
Autosupport (11 cmdlets)
Cf (6 cmdlets)
Clock (1 cmdlet)
Ems (19 cmdlets)
Host (1 cmdlet)
Name mapping (10 cmdlets)
Ndmp (2 cmdlets)
Perf (4 cmdlets)
Qos (18 cmdlets)
Ses (3 cmdlets)
System (7 cmdlets)
Wafl (2 cmdlets)
46 minutes
63 seconds
Note that a bootable VMDK file may not yield a bootable VHD file, and vice versa. Some OS- and hypervisor-specific
modifications may be necessary to ensure the correct storage drivers are present and configured in the image before it
will boot. Some operating systems may be able to recover from this automatically, possibly by running a repair task
upon first boot after a file format conversion.
AbsoluteStartingLba
------------------64
208848
Size
---102 MB
15 GB
IsExtendedBootRecord
-------------------False
False
IsAligned
--------True
True
Repair-NaVirtualDiskAlignment will correct misalignments in fixed VHD files that are formatted as MBR-style disks.
Unlike some other Toolkit cmdlets such as Copy-NaHostFile or ConvertTo-NaVhd, correcting alignment issues is not
possible using WAFL block cloning (because the cloned blocks would also be misaligned), so a data copy is required. For
data in LUNs, Data ONTAP 7.3.5 and higher versions of 7.3.x perform this operation rapidly by offloading the copy
operation to the storage controller. Data ONTAP 8 does not yet provide this capability, so this cmdlet falls back to a
slower host-based copy as needed. For CIFS shares, copy offload is used by this cmdlet for all versions of Data ONTAP
7.3.5+ and 8.0.1+.
While there are many similarities between Data ONTAP (Cluster-Mode) and Data ONTAP (7-Mode), there are also
several key differences that impact PowerShell users. Most importantly, Cluster-Mode has no equivalent to "vfiler0",
which corresponds to a physical controller running 7-Mode. Cluster-Mode has a single "admin" Vserver for managing
physical resources in the cluster (disks, nodes, aggregates, network ports, etc.) and one or more data Vservers for
serving data and managing most virtual components related to serving data (volumes, qtrees, LUN, protocols, snapshots,
etc.).
It is critical to note that some APIs (and therefore some cmdlets) are only handled by the cluster admin Vserver, while
others are only handled by the data Vservers. The Toolkit user is responsible for directing cmdlets to the proper
Vserver. The Toolkit provides several methods of directing cmdlets, and it does so automatically in some cases.
For example, to connect to a cluster admin Vserver:
PS C:\Toolkit\1.7.0> Connect-NcController cluster1
While connected to a cluster admin Vserver, you can direct cmdlets to a data Vserver in several ways:
1. Set the data Vserver while connecting to the cluster Vserver. All subsequent cmdlets are directed to the
specified Vserver.
PS C:\Toolkit\1.7.0> Connect-NcController cluster1 -Vserver vserver1
2. Set the data Vserver anytime after connecting to the cluster Vserver:
PS C:\Toolkit\1.7.0> Connect-NcController cluster1
PS C:\Toolkit\1.7.0> $global:CurrentNcController.Vserver = "vserver1"
4. Use getters from either cluster or data Vserver, and pipe their output into other cmdlets. The Toolkit includes
enough context on objects written to the pipeline to determine where to direct subsequent cmdlets that
operate on those objects:
PS C:\Toolkit\1.7.0> Connect-NcController cluster1
PS C:\Toolkit\1.7.0> Get-NcLun | Set-NcLunSize -NewSize +10%
You can also connect directly to a data Vserver management interface. While connected directly to a data Vserver,
cmdlets may not be issued to the cluster admin Vserver or any other data Vserver.
PS C:\Toolkit\1.7.0> Connect-NcController vserver1
Many getter cmdlets work in either the cluster admin or data Vserver contexts. To determine where cmdlets may be
directed, use Get-NcHelp and check the Family field:
PS C:\Toolkit\1.7.0> Get-NcHelp -Category volume
Name
---Dismount-NcVol
Get-NcVol
Get-NcVolAutosize
Get-NcVolClone
Get-NcVolCloneSplit
Category
-------volume
volume
volume
volume
volume
Family
Api
-------{vserver}
{volume-unmount}
{cluster, vserver} {volume-get-iter}
{vserver}
{volume-autosize-get}
{cluster, vserver} {volume-clone-get-iter}
{vserver}
{volume-clone-split-status}
Other enhancements
LUN objects now include alignment info (requires Data ONTAP 8.0.1+):
PS C:\Toolkit\1.7.0> Get-NaLun | select Path, Alignment
Path
---/vol/beamdev2k8/lun
/vol/beamdev2k8/vmdk_lun
/vol/DFM/x3550rre8
/vol/knighttest/testlun
/vol/knighttest/testlun3
/vol/luns/deleteme
/vol/luns/fcptest.lun
Alignment
--------misaligned
aligned
aligned
indeterminate
aligned
aligned
aligned
SIS objects and cmdlets now support volume compression (requires Data ONTAP 8.0.1+):
PS C:\Toolkit\1.7.0> Get-NcSis | select Path, IsCompressionEnabled
Path
---/vol/costea01_root_vol
/vol/grupoMode
/vol/pp_ds
/vol/ppds_nfs
/vol/unitTestLuns
IsCompressionEnabled
-------------------False
False
False
False
True
Controller passwords are now held as SecureString values for greater security.
Get-NaHostDisk now reports several more target-side fields:
PS C:\Toolkit\1.7.0> Get-NaHostDisk 1 | Format-List *
Disk
Size
ControllerPath
ControllerMode
HostDrivePath
HostDiskName
HostVolume
HostVolumeIsCsv
HostGptGuid
HostMbrSignature
HostDiskIndex
DiskSerialNumber
:
:
:
:
:
:
:
:
:
:
:
:
1
9346023751680
TS60808:/vol/bigvol/biglun
Classic
M:\
\\?\PhysicalDrive1
\\?\Volume{10be451d-f9a7-45c9-8b90-5e00144c9503}\
False
695ea2b0-8863-47bc-a3d6-3d6e53cce47c
1
HnaMP4g4okEC
DiskSize
DiskWmiPath
ControllerName
ControllerIgroup
ControllerIgroupType
ControllerAddresses
ControllerLunPath
ControllerVolumeName
ControllerLunOsType
ControllerSnapshot
ControllerQtree
ControllerOntapRevision
ControllerModel
IScsiTarget
FcpTarget
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
9346023751680
\\x3550rre7\root\cimv2:Win32_DiskDrive.DeviceID="\\\\.\\PHYSICALDRIVE1"
TS60808
bigigroup
Windows
{10.61.175.81}
/vol/bigvol/biglun
bigvol
hyper_v
/vol/bigvol
8.0.2 7-Mode
FAS6080
10.61.175.81:3260
Disk
---1
Size ControllerPath
---- -------------8.5 TB TS60808:/vol/bigvol/biglun
CIFS share cmdlets now include parameters for both access-based enumeration and namespace caching.
New-NaSnapshotMulti adds an option to output newly created snapshots:
PS C:\Toolkit\1.7.0> New-NaSnapshotMulti vol1,vol2 -SnapName multiSnap -GetSnapshots
Name
---multiSnap
multiSnap
Created
------1/30/2012
1/30/2012
A new cmdlet, Get-NaControllerError, lists all error codes and descriptions for Data ONTAP. The codes are common to
7-Mode and Cluster-Mode:
PS C:\Toolkit\1.7.0> Get-NaControllerError
Code
---1
2
3
4
5
6
7
8
9
10
11
12
13
Name
---EONTAPI_EPERM
EONTAPI_ENOENT
EONTAPI_ESRCH
EONTAPI_EINTR
EONTAPI_EIO
EONTAPI_ENXIO
EONTAPI_E2BIG
EONTAPI_ENOEXEC
EONTAPI_EBADF
EONTAPI_ECHILD
EONTAPI_EDEADLK
EONTAPI_ENOMEM
EONTAPI_EACCES
Description
----------Operation not permitted
No such file or directory
No such process
Interrupted system call
Input/Output error
Device not configured
Argument list too long
Exec format error
Bad File descriptor
No child process
Resource deadlock avoided
Cannot allocate memory
Permission denied
Under certain conditions, previous releases could consume extra system memory. Toolkit 1.7 offers improved memory
handling and significantly better performance with repeated cmdlet invocations.
Set-NaVirtualDiskSize no longer clobbers a partition of unknown type during a shrink operation, and it offers a -Preserve
switch to leave known partition types unchanged during grow or shrink operations.
Toolkit 1.7 adds persistent storage of controller connections. Both NaController and NcController types, as emitted by
Connect-NaController and Connect-NcController, are serializable using two new cmdlets, ConvertTo-SerializedString
and ConvertFrom-SerializedString. This allows a Toolkit connection context to be saved and used by other processes on
the same host. Any .NET objects that implement the interface System.Runtime.Serialization.ISerializable
should be supported by these new cmdlets.
New cmdlets
These are the new cmdlets in Data ONTAP PowerShell Toolkit 1.7, not including the Cluster-Mode set:
ConvertTo-NaVhd
ConvertTo-NaVmdk
Get-NaVirtualDiskAlignment
Repair-NaVirtualDiskAlignment
Enable-NaStorageAdapter
Get-NaStorageAdapter
Get-NaStorageAdapterInfo
Get-NaControllerError
ConvertTo-SerializedString
ConvertFrom-SerializedString
1 hour, 41 minutes
21 seconds
To use this cmdlet, just provide a fully-qualified path for the new VHD file and a size:
PS C:\Toolkit\1.6.0> New-NaVirtualDisk M:\VM1.vhd 500g
Mode
LastWriteTime
Length Name
--------------------- ----a--- 10/27/2011
4:34 PM 536870912512 VM1.vhd
Another cmdlet, Set-NaVirtualDiskSize, can rapidly grow or shrink a fixed VHD file. Any space added to or removed
from the file is reclaimed on the storage controller. If one or more NTFS data partitions are present inside the VHD file,
the partition nearest the end of the file is automatically grown or shrunk using NTFS APIs. The VHD file must not be in
use during this operation, such as by a running virtual machine, because the VHD is temporarily mounted on the local
host for inspection and adjustment of the partitions within. Note that once a partition is present in a VHD file, the file
may not be shrinkable beyond a certain point due to how NTFS manages the partition contents.
PS C:\Toolkit\1.6.0> Set-NaVirtualDiskSize M:\VM1.vhd 1t
Grow VHD
Are you sure you want to grow the VHD?
[Y] Yes [A] Yes to All [N] No [L] No to All
[S] Suspend
Mode
LastWriteTime
Length Name
--------------------- ----a--- 10/27/2011
4:37 PM 1099511628288 VM1.vhd
Mount-NaVirtualDisk can mount any VHD file as a disk on the local host, while Dismount-NaVirtualDisk dismounts a
VHD-based disk so that it may be used elsewhere, such as in a virtual machine configuration. These cmdlets are most
useful when combined with the new disk and volume management cmdlets in Toolkit 1.6.
Space reclamation
When a file is deleted from an NTFS-formatted volume hosted by a Data ONTAP LUN, the associated blocks on the
storage controller are not automatically freed but remain allocated until NTFS writes new data to the same location.
Over time, this effect can appear to reduce the space savings offered by thin provisioned LUNs. Two cmdlets in Toolkit
1.6 help alleviate this issue.
Remove-NaHostFile frees the associated WAFL blocks from the LUN before deleting the file. A secondary benefit of this
cmdlet is a measure of security. There are disk utilities that can recover the contents of deleted files, but once the
blocks are freed, they always read as zeroed blocks, so there is no possibility the data previously contained in the
deleted file could ever be retrieved. Note that this cmdlet, like most Toolkit cmdlets that operate on the local file
system, requires a fully-qualified file path.
Invoke-NaHostVolumeSpaceReclaim scans an entire NTFS volume and frees all WAFL blocks that are not associated
with existing files. It is safe to run this cmdlet during normal I/O operation. A common use case might be to schedule a
script to run this cmdlet against all ONTAP-hosted disks during periods of lower activity, perhaps on a weekly basis, to
keep the LUNs running at peak space efficiency. Note that Invoke-NaHostVolumeSpaceReclaim does not (yet) support
cluster-shared volumes (CSVs).
Performance of the space reclamation commands can vary depending on several factors, but this result from reclaiming
a one-terabyte LUN suggests the potential of this cmdlet:
PS C:\Toolkit\1.6.0> Measure-Command { Invoke-NaHostVolumeSpaceReclaim R:\ } | select TotalSeconds
TotalSeconds
-----------92.9664409
To reclaim all unused space on all LUNs hosted by Data ONTAP and mounted on the local host, try this:
PS C:\Toolkit\1.6.0> Get-NaHostDisk -DataOntap | Invoke-NaHostVolumeSpaceReclaim -Confirm:$false
Start-NaHostDiskRescan
Initialize-NaHostDisk
Set-NaHostDisk
Wait-NaHostDisk
Get-NaHostVolume
New-NaHostVolume
Format-NaHostVolume
Mount-NaHostVolume
Dismount-NaHostVolume
Set-NaHostVolumeSize
Remove-NaHostVolume
Disk
---4
5
6
7
8
Size
---10.0 GB
10.0 GB
10.0 GB
10.0 GB
10.0 GB
GuidPaths
--------{\\?\Volume{adada439-fabb-11e0-8fb4-00155da1ce00}\}
{\\?\Volume{adada441-fabb-11e0-8fb4-00155da1ce00}\}
{\\?\Volume{adada449-fabb-11e0-8fb4-00155da1ce00}\}
{\\?\Volume{adada451-fabb-11e0-8fb4-00155da1ce00}\}
{\\?\Volume{adada459-fabb-11e0-8fb4-00155da1ce00}\}
If more control over the various steps is needed, one may use Initialize-NaHostDisk, New-NaHostVolume, FormatNaHostVolume, and Mount-NaHostVolume separately.
PS C:\Toolkit\1.6.0> Get-NaHostDisk 12 | Set-NaHostDisk -PartitionStyle GPT | New-NaHostVolume -Raw | FormatNaHostVolume -Reclaim -Label "Exchange Volume" | Mount-NaHostVolume -MountPoint I
MountPoints
----------{I:\}
Disk
---12
Size GuidPaths
---- --------49.9 GB {\\?\Volume{4d6e4e9d-a449-4de3-be8c-bc9dfd182c5b}\}
The new VHD and volume cmdlets may be combined to create and format new VHD files at the same time. NewNaHostVolume always creates partitions that are aligned to a 1MB boundary, so this is a great way to create VHD files
that will not suffer from misaligned I/O (assuming they are placed in a LUN of the proper OS type) regardless of the
operating system or data set placed into the new partition.
PS C:\Toolkit\1.6.0> New-NaVirtualDisk I:\VM1.vhd 20g | Mount-NaVirtualDisk | New-NaHostVolume | DismountNaVirtualDisk -Confirm:$false
Mode
----a---
LastWriteTime
Length Name
------------------ ---10/25/2011
2:22 PM 21474836992 VM1.vhd
Building on our provisioning script from Toolkit 1.5, we can now provision storage to the point where it is formatted and
mounted on the local host. The new cmdlets are shown in red.
Connect-NaController TS60808
New-NaAggr bigaggr -Use64Bit -DiskCount 32
New-NaVol bigvol -Aggregate bigaggr 4t
Set-NaSnapshotReserve bigvol 0
New-NaLun -Path /vol/bigvol/biglun -Size 3.5t -Type hyper_v
Add-NaHostIscsiTargetPortal
$session = Get-NaHostIscsiSession -TargetName (Get-NaIscsiNodeName)
if ($session -eq $null) { Get-NaHostIscsiTarget (Get-NaIscsiNodeName) | Connect-NaHostIscsiTarget }
New-NaIgroup bigigroup iscsi windows
Get-NaHostIscsiAdapter | Add-NaIgroupInitiator bigigroup
Add-NaLunMap /vol/bigvol/biglun bigigroup
Start-NaHostDiskRescan
Wait-NaHostDisk /vol/bigvol/biglun TS60808 | New-NaHostVolume
HostDrivePath
------------M:\
Disk
---14
Size
---3.5 TB
ControllerPath
-------------TS60808:/vol/bigvol/biglun
File cloning
Copy-NaHostFile can clone individual files within (or between) NTFS-formatted Data ONTAP LUNs. The LUN(s) must be
mounted on the local host and reside on the same Data ONTAP volume. The cmdlet uses Data ONTAP's SIS-clone
feature to clone the files rapidly; no data is copied via the Windows host and the block sharing on Data ONTAP creates
highly space-efficient clones. This cmdlet can support a number of interesting use cases, such as duplicating sysprepped
VHD files in virtual machine cloning workflows.
PS C:\Toolkit\1.6.0> Copy-NaHostFile M:\SQL_VM_Master.vhd M:\VM1.vhd
Mode
LastWriteTime
Length Name
--------------------- ----a--- 10/27/2011
5:48 PM 53687091712 VM1.vhd
SSH setup
A common request has been configuration of the SSH server within Data ONTAP. There is no API for this, and InvokeNaSsh secureadmin setup wont work until this step is completed: a classic chicken-and-egg problem. A new cmdlet,
Initialize-NaSecureAdminSsh, invokes the equivalent of secureadmin setup.
Vfiler migration
Four new cmdlets in the 'vfiler' category support the vfiler migration feature of Data ONTAP.
Address
------10.58.94.234
Vserver
-------
List nodes:
PS C:\Toolkit\1.6.0> Get-NcNode
Name
---Cerebus-03
Cerebus-04
Cerebus-05
Cerebus-06
NodeModel
--------FAS3070
FAS3040
FAS3040
FAS3040
NodeLocation
-----------SeaLab-A7
SeaLab-A7
SeaLab-A7
SeaLab-A7
Version
------NetApp Release 8.1RC1 Cluster-Mode
List volumes on multiple Vservers using a wildcard. It is important to note that the wildcards in this example, as well as
in nearly all the Cluster-Mode cmdlets, are offloaded to Data ONTAP so as to limit how much information is transmitted
to and filtered by the Windows host.
PS C:\Toolkit\1.6.0> Get-NcVol -Vserver Parker*
Name
---exchange_vol_1
parker_vol_root
sqlvoldata1
sqlvoldata2
parker02_root_vol
SQL_fuji6_data1
SQL_fuji6_data2
State
----online
online
online
online
online
online
online
TotalSize
--------550.0 GB
20.0 MB
176.3 GB
150.0 GB
20.0 MB
100.0 GB
100.0 GB
Used
---78%
5%
92%
80%
5%
5%
50%
Available
--------120.2 GB
18.9 MB
13.0 GB
29.5 GB
18.9 MB
95.0 GB
49.3 GB
Dedupe
-----False
False
False
False
False
False
False
Aggregate
--------Cerebus_03_aggr1
Cerebus_03_aggr1
Cerebus_03_aggr1
Cerebus_03_aggr1
Cerebus_04_aggr1
Cerebus_05_aggr1
Cerebus_05_aggr1
Vserver
------Parker01
Parker01
Parker01
Parker01
Parker02
Parker02
Parker02
Use a Cluster-Mode advanced query to find aggregates greater than one terabyte, offloading the data filtering to Data
ONTAP and transferring only the objects of interest to the host:
PS C:\Toolkit\1.6.0> $q = Get-NcAggr -Template -Fill
PS C:\Toolkit\1.6.0> $q.TotalSize = ">1tb"
PS C:\Toolkit\1.6.0> Get-NcAggr -Query $q
Name
---Cerebus_03_aggr1
Cerebus_03_SATA1
Cerebus_03_SATA2
Cerebus_04_aggr1
Cerebus_05_aggr1
Cerebus_06_aggr1
State
----online
online
online
online
online
online
TotalSize
--------1.1 TB
3.8 TB
1.1 TB
1.1 TB
1.4 TB
1.3 TB
Used
---67%
0%
70%
9%
18%
8%
Volumes
------9
2
4
4
7
2
Remove weekly snapshots from a set of volumes on a single Vserver. Note that the snapshot removal would work, even
though we connected to a cluster LIF which doesnt support the snapshot-delete API.
PS C:\Toolkit\1.6.0> Get-NcVol -Vserver Lionetti01 -Volume VMSet* | Get-NcSnapshot -SnapName weekly* | RemoveNcSnapshot WhatIf
What
What
What
What
What
What
What
What
What
What
What
if:
if:
if:
if:
if:
if:
if:
if:
if:
if:
if:
Deleting
Deleting
Deleting
Deleting
Deleting
Deleting
Deleting
Deleting
Deleting
Deleting
Deleting
snapshot
snapshot
snapshot
snapshot
snapshot
snapshot
snapshot
snapshot
snapshot
snapshot
snapshot
weekly.2011-10-16_0015
weekly.2011-10-23_0015
weekly.2011-10-16_0015
weekly.2011-10-23_0015
weekly.2011-10-16_0015
weekly.2011-10-23_0015
weekly.2011-10-16_0015
weekly.2011-10-23_0015
weekly.2011-10-16_0015
weekly.2011-10-23_0015
weekly.2011-10-23_0015
from
from
from
from
from
from
from
from
from
from
from
volume
volume
volume
volume
volume
volume
volume
volume
volume
volume
volume
VMSet1.
VMSet1.
VMSet2.
VMSet2.
VMSet3.
VMSet3.
VMSet4.
VMSet4.
VMSet5.
VMSet5.
VMSet6.
Connect to two different clusters simultaneously using the -Add switch and list their node info:
PS C:\Toolkit\1.6.0> Connect-NcController VxeRubble
Name
---VxeRubble
Address
------10.60.189.172
Vserver
-------
Version
------NetApp Release 8.1RC1 Cluster-Mode
Address
------10.58.94.234
Vserver
-------
PS C:\Toolkit\1.6.0> $global:CurrentNcController
Version
------NetApp Release 8.1RC1 Cluster-Mode
Name
---VxeRubble
cerebus
Address
------10.60.189.172
10.58.94.234
Vserver
-------
Version
------NetApp Release 8.1RC1 Cluster-Mode
NetApp Release 8.1RC1 Cluster-Mode
PS C:\Toolkit\1.6.0> Get-NcNode
Name
---VxeRubble-01
VxeRubble-02
Cerebus-03
Cerebus-04
Cerebus-05
Cerebus-06
NodeModel
--------FAS3170
FAS3170
FAS3070
FAS3040
FAS3040
FAS3040
NodeLocation
-----------RTP
RTP
SeaLab-A7
SeaLab-A7
SeaLab-A7
SeaLab-A7
Other enhancements
The Toolkit now offers more standardized data size inputs that may be specified as bytes or as string-formatted values
with units. Cmdlets which change data size values all accept absolute size values, positive or negative size increments,
and positive or negative percentages. For example:
Grow a LUN by 20 GB:
PS C:\Toolkit\1.6.0> Set-NaLunSize /vol/vol2clone/lun1 +20g
Path
TotalSize SizeUsed Protocol
Online Mapped Thin Comment
------------ -------- ------------- ------ ---- ------/vol/vol2clone/lun1
40.0 GB
6.8 GB windows_gpt False False True
New cmdlets
These are the new cmdlets in Data ONTAP PowerShell Toolkit 1.6, not including the Cluster-Mode set:
Disable-NaCopyOffload
Enable-NaCopyOffload
Test-NaCopyOffload
Ping-NaFcp
Ping-NaFcpInfo
Test-NaFpolicy
Copy-NaHostFile
Dismount-NaHostVolume
Dismount-NaVirtualDisk
Format-NaHostVolume
Get-NaHostVolume
Initialize-NaHostDisk
Invoke-NaHostVolumeSpaceReclaim
Mount-NaHostVolume
Mount-NaVirtualDisk
New-NaHostVolume
New-NaVirtualDisk
Remove-NaHostFile
Remove-NaHostVolume
Set-NaHostDisk
Set-NaHostVolumeSize
Set-NaVirtualDiskSize
Start-NaHostDiskRescan
Wait-NaHostDisk
Get-NaLunClone
Get-NaLunTargetDeviceId
ConvertTo-NaUnixUser
ConvertTo-NaWindowsUser
Get-NaUnixGroup
Get-NaNetDcb
Get-NaNetDcbPriority
Add-NaRadiusServer
Disable-NaRadius
Enable-NaRadius
Get-NaRadiusServer
Get-NaRadiusStatistics
Remove-NaRadiusServer
Reset-NaRadiusStatistics
Test-NaRadius
Initialize-NaSecureAdminSsh
Get-NaSnapmirrorConnection
Remove-NaSnapmirrorConnection
Set-NaSnapmirrorConnection
Get-NaSnapshotRestoreStatus
Complete-NaVfilerMigrate
Get-NaVfilerMigrate
Start-NaVfilerMigrate
Stop-NaVfilerMigrate
Invoke-NaWaflSync
Capacity
-------101.4 GB
16.0 GB
180.0 GB
400.0 MB
16.0 GB
180.0 GB
Used
---15.7 GB
809.4 MB
95.3 GB
404.0 KB
809.5 MB
82.7 GB
Free
---85.7 GB
15.2 GB
84.7 GB
399.6 MB
15.2 GB
55.3 GB
SnapUsage
--------5.7 GB
3.0 MB
62.3 GB
596.0 KB
1.8 MB
53.5 GB
Reserve
------0
0
0
0
0
0
Returns EfficiencyPercentage
------- -------------------16.2 GB
31%
809.5 MB
9%
82.6 GB
98%
354.3 KB
0%
1.6 GB
14%
83.5 GB
92%
See the script posted on the Data ONTAP PowerShell communities that imports the data from Get-NaEfficiency into
Microsoft Excel and displays it in tabular and graphical form:
Add-NaHostIscsiTargetPortal
Connect-NaHostIscsiTarget
Disconnect-NaHostIscsiTarget
Get-NaHostIscsiAdapter
Get-NaHostIscsiSession
Get-NaHostIscsiTarget
These cmdlets provide for enumerating host-side iSCSI interfaces, sessions and targets. Just having a simple way to get
the IQN of the Windows host is useful.
PS C:\Toolkit\1.5.0> Get-NaHostIscsiAdapter
InstanceName
-----------Root\ISCSIPRT\0000_0
SerialNumber
-----------MSFT-05-1991
Iqn
--iqn.1991-05.com.microsoft:x3550rre7.rtprre.testdomain
PS C:\Toolkit\1.5.0> Get-NaHostIscsiTarget
TargetName
---------iqn.1992-08.com.netapp:sn.101168040
iqn.1992-08.com.netapp:sn.118045471
iqn.1992-08.com.netapp:sn.118045471
iqn.1992-08.com.netapp:sn.118044195
iqn.1992-08.com.netapp:sn.118044195
iqn.1992-08.com.netapp:sn.118066438
InitiatorName
-------------
IsConnected
----------False
Root\ISCSIPRT\0000_0
True
True
Root\ISCSIPRT\0000_0
True
True
Root\ISCSIPRT\0000_0
True
PS C:\Toolkit\1.5.0> Get-NaHostIscsiSession
SessionId
--------fffffa8030c55428-4000013700000001
fffffa8030c55428-4000013700000004
fffffa8030c55428-4000013700000005
fffffa8030c55428-4000013700000006
fffffa8030c55428-40000137000021f6
TargetName
NumConnections NumDevices
----------------------- ---------iqn.1992-08.com.netapp:sn.118044195
0
0
iqn.1992-08.com.netapp:sn.118044195
1
7
iqn.1992-08.com.netapp:sn.118045471
1
3
iqn.1992-08.com.netapp:sn.118045471
0
0
iqn.1992-08.com.netapp:sn.118066438
1
1
These getter cmdlets all include WMI path fields, so the PowerShell WMI accelerator may be used to make WMI queries
for related objects.
PS C:\Toolkit\1.5.0> [wmi](Get-NaHostIscsiAdapter).WmiPath
__GENUS
__CLASS
__SUPERCLASS
__DYNASTY
__RELPATH
__PROPERTY_COUNT
__DERIVATION
__SERVER
__NAMESPACE
__PATH
Active
AsicVersion
BiDiScsiCommands
CacheValid
DriverName
FirmwareVersion
FunctionalitySupported
GenerationalGuid
InstanceName
IntegratedTCPIP
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
2
MSiSCSI_HBAInformation
MSiSCSI_HBAInformation
MSiSCSI_HBAInformation.InstanceName="Root\\ISCSIPRT\\0000_0"
23
{}
X3550RRE7
root\WMI
\\X3550RRE7\root\WMI:MSiSCSI_HBAInformation.InstanceName="Root\\ISCSIPRT\\0000_0"
True
1.5
False
False
msiscsi.sys
1.5
0
{0, 0, 0, 0...}
Root\ISCSIPRT\0000_0
True
MaxCDBLength
MultifunctionDevice
NumberOfPorts
OptionRomVersion
RequiresBinaryIpAddresses
SerialNumber
Status
UniqueAdapterId
VendorID
VendorModel
VendorVersion
VersionMax
VersionMin
:
:
:
:
:
:
:
:
:
:
:
:
:
16
False
1
True
MSFT-05-1991
0
18446738027213837352
Microsoft Corporation
iSCSI Initiator
1.5
0
0
The new cmdlets also support setting up or tearing down iSCSI connections to Data ONTAP storage controllers. Here is a
simple script that demonstrates how to set up a new aggregate, volume and LUN on a controller, establish a new iSCSI
connection to the controller from the current Windows host, set up a new initiator group containing the hosts initiator,
and map the new LUN to the host. The new cmdlets are shown in red.
Connect-NaController 10.61.175.81
New-NaAggr bigaggr -Use64Bit -DiskCount 32
New-NaVol bigvol -Aggregate bigaggr 4t
Set-NaSnapshotReserve bigvol 0
New-NaLun -Path /vol/bigvol/biglun -Size (3.5tb) -Type hyper_v
Add-NaHostIscsiTargetPortal
Get-NaHostIscsiTarget (Get-NaIscsiNodeName) | Connect-NaHostIscsiTarget
New-NaIgroup bigigroup iscsi windows
Get-NaHostIscsiAdapter | Add-NaIgroupInitiator bigigroup
Add-NaLunMap /vol/bigvol/biglun bigigroup
Toolkit 1.5 also adds a cmdlet to list fibre channel interfaces, Get-NaHostFcAdapter, which obviates the need to use
vendor-specific tools to obtain this information.
PS C:\Toolkit\1.5.0> Get-NaHostFcAdapter
Model
----QLE2462
QLE2462
ModelDescriptor
--------------QLogic QLE2462 Fibre Channel Adapter
QLogic QLE2462 Fibre Channel Adapter
Source
-----TS60808
TS60808
TS60808
TS60808
TS60808
TS60808
TS60808
TS60808
Severity
-------notice
info
notice
notice
notice
info
notice
notice
EventType
--------kern.log.rotate
kern.uptime.filer
raid.rg.scrub.start
raid.rg.scrub.start
raid.rg.scrub.start
kern.uptime.filer
raid.rg.scrub.done
raid.rg.scrub.summary.pi
Message
------System TS60808 (ID 01...
1:00am up 16 days, 10...
/sv_backup_aggr8/plex...
/aggr0/plex2/rg0: sta...
/aggr0/plex5/rg0: sta...
2:00am up 16 days, 11...
/sv_backup_aggr8/plex...
Scrub found 0 parity ...
Get-NaSystemLog can filter on several criteria, such as event severity, event source, and date ranges. This example lists
errors from the past week.
PS C:\Toolkit\1.5.0> Get-NaSystemLog -MessageLog -Severity error -StartTime ([DateTime]::Today.AddDays(-7))
TimeStampDT
Source Severity EventType
Message
---------------- -------- --------------7/21/2011 11:22:26 AM TS60808 error
auth.dc.trace.DCConnection.errorMsg AUTH: Domain Controller error:...
Get-NaSystemLog can even monitor the logs for changes, similar to the unix 'tail -f' command. This example will detect
and display error messages as Data ONTAP writes them to the messages log file.
PS C:\Toolkit\1.5.0> Get-NaSystemLog -MessageLog -Severity error Follow
Another new cmdlet, Set-NaLunSignature, will generate and write a new disk signature of the correct type.
PS C:\Toolkit\1.5.0> Set-NaLunSignature /vol/vol2/lun2
Write LUN signature
Are you sure you wish to write the lun signature?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend
Note that these two cmdlets are not Windows-specific and may be used for LUNs formatted as either MBR or GPT disks
for other operating systems.
:
:
:
:
:
:
:
:
:
0
0
35
34
745
21347455097
0.0247077026585648
0.592984863805555
35.5790918283333
TotalSeconds
: 2134.7455097
TotalMilliseconds : 2134745.5097
PS C:\Toolkit\1.4.0> $vms.Count
1000
:
:
:
:
:
:
:
:
:
:
:
0
0
0
25
249
252491256
0.00029223525
0.007013646
0.42081876
25.2491256
25249.1256
Vfiler DR
Five new cmdlets in the 'vfiler' category support the vfiler disaster recovery (DR) feature of Data ONTAP.
SnapLock
Toolkit 1.5 adds 11 cmdlets that support the SnapLock feature of Data ONTAP.
Add-NaIscsiInitiatorAuth
Get-NaCifsOrganizationalUnit
Get-NaCifsSite
New-NaCifsPasswordFile
New-NaUser
Set-NaCifs
Set-NaIscsiInitiatorAuthChap
Set-NaIscsiInitiatorDefaultAuth
Set-NaUserPassword
Set-NaVfilerPassword
Test-NaCifsName
Other enhancements
In accordance with PowerShell best practices, Toolkit cmdlets no longer emit objects if the -WhatIf switch is specified.
Similarly, Toolkit cmdlets no longer emit objects if an error occurs while processing an input record.
Remove-NaVol now includes a -Force switch, which is needed if a non-default vfiler has storage on the volume.
Invoke-NaSysstat now includes consistency point (CP) details in its WAFL output info. Note that different versions of
Data ONTAP report different CP types, so Invoke-NaSysstat also reports the CP type labels in its output.
A few Toolkit users reported cmdlet timeout issues, so the default timeout for Toolkit cmdlets was increased to 60
seconds. The timeout may still be adjusted by modifying the relevant field on the NaController object returned by
Connect-NaController.
New cmdlets
These are the new cmdlets in Data ONTAP PowerShell Toolkit 1.5:
Add-NaHostIscsiTargetPortal
Connect-NaHostIscsiTarget
Disconnect-NaHostIscsiTarget
Get-NaHostIscsiAdapter
Get-NaHostIscsiSession
Get-NaHostIscsiTarget
Get-NaHostFcAdapter
Get-NaLunSignature
Set-NaLunSignature
Get-NaSnaplockComplianceClock
Get-NaSnaplockLog
Get-NaSnaplockLogVolume
Get-NaSnaplockOption
Get-NaSnaplockRetentionTime
New-NaSnaplockLog
Remove-NaSnaplockFile
Set-NaSnaplockComplianceClock
Set-NaSnaplockLogVolume
Set-NaSnaplockOption
Set-NaSnaplockRetentionTime
Get-NaSystemLog
Get-NaEfficiency
Get-NaVfilerDr
Invoke-NaVfilerDr
Invoke-NaVfilerDrResync
New-NaVfilerDr
Remove-NaVfilerDr
Set-NaSis, Start-NaSis, and Stop-NaSis will now bind the path parameter by property name.
Set-NaVfilerPassword will now create the root user if it does not already exist.
Get-NaHostDisk and Get-NaHyperV could fail if one or more host disks (LUNs) were offline.
NFS
--0
0
0
0
0
0
CIFS
---0
40
0
0
0
40
HTTP
---0
0
0
0
0
0
FCP iSCSI
--- ----0
3
0
7
0
1
0
0
0
2
0
7
RdOps
----0
0
0
0
0
0
WrOps TotOps
----- -----3
3
3
43
1
1
0
0
2
2
3
42
NetRcvd
------16 KB
30 KB
5 KB
2 KB
15 KB
28 KB
NetSent
------887 B
25 KB
2 KB
341 B
751 B
25 KB
DiskRd
-----34 KB
17 KB
29 KB
7 KB
32 KB
48 KB
DiskWr
-----237 KB
245 KB
316 KB
133 KB
109 KB
390 KB
RdLat
----0.0
0.0
0.0
0.0
0.0
0.0
WrLat
----0.1
0.1
0.1
0.3
0.1
0.1
TotLat
-----0.1
0.1
0.1
0.3
0.1
0.1
In the unformatted output, data sizes are presented in bytes, data rates are presented in bytes per second, and latencies
are presented as TimeSpan objects. In the tabular views, data sizes and rates are presented with units, and latencies are
presented in milliseconds.
Invoke-NaSysstat also monitors other objects such as volumes, disks and network adapters, as well as the various
protocols. Furthermore, multiple objects of the same type may be monitored together. For example, monitor two
volumes like this:
PS C:\Toolkit\1.4.0> Invoke-NaSysstat -Volume vol2,opalis
Read
---2 MB
166 KB
3 MB
0
12 MB
8 MB
4 MB
3 MB
2 MB
443 KB
6 MB
77 KB
Written
------17 KB
143 KB
46 KB
819 B
346 KB
102 B
139 KB
102 B
201 KB
2 MB
471 KB
164 KB
RdOps
----49
5
170
0
295
144
98
50
88
13
175
4
WrOps TotOps
----- -----2
53
4
13
7
178
0
0
23
318
0
145
22
120
0
50
35
123
34
48
37
212
10
14
RdLat
----3.1
3.5
60.4
0.0
85.1
0.3
46.5
0.3
15.2
5.3
50.9
2.7
WrLat
----0.1
0.5
0.1
0.1
0.1
0.1
0.1
0.1
0.3
0.5
0.5
0.2
TotLat
-----2.9
1.7
58.0
0.1
79.0
0.3
37.8
0.3
11.0
1.8
41.9
0.9
Volume
-----opalis
vol2
opalis
vol2
opalis
vol2
opalis
vol2
opalis
vol2
opalis
vol2
Invoke-NaSysstat also accepts wildcards. For example, monitor all drives on a loop like this:
PS C:\Toolkit\1.4.0> Invoke-NaSysstat -Disk 0a.*
Busy
---1%
2%
0%
0%
0%
0%
0%
0%
0%
0%
0%
11%
1%
1%
DiskRd
-----1 KB
1 KB
546 B
0
0
0
0
0
0
0
0
989 KB
0
0
DiskWr
-----20 KB
21 KB
15 KB
0
0
0
0
0
0
0
0
116 KB
116 KB
118 KB
RdOps
----0
0
0
0
0
0
0
0
0
0
0
18
0
0
PendOps
------0
0
0
0
0
0
0
0
0
0
0
0
0
0
RdLat
----32.4
47.6
11.5
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
1.1
0.0
0.0
WrLat
----1.0
0.9
1.5
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
1.2
0.8
1.0
Disk
---0a.16
0a.17
0a.18
0a.19
0a.20
0a.21
0a.22
0a.23
0a.24
0a.25
0a.26
0a.27
0a.28
0a.29
Invoke-NaSysstat is optimized not only for continuous monitoring in tabular format, but also for use in scripts via
hashtable output. In a script where continuous monitoring of the pipeline isnt as useful, specify -Hashtable as well as a
-Count value of 1. Then index the hashtable by object name:
PS C:\Toolkit\1.4.0> $diskPerf = Invoke-NaSysstat -Disk 0a.* -Count 1 Hashtable
PS C:\Toolkit\1.4.0> $diskPerf.Keys
0a.20
0a.21
0a.22
0a.23
0a.18
0a.19
0a.28
0a.29
0a.24
0a.16
0a.17
0a.25
0a.26
0a.27
PS C:\Toolkit\1.4.0> $diskPerf["0a.20"]
Busy
---0%
DiskRd
-----819 B
DiskWr
-----0
RdOps
----0
PendOps
------0
RdLat
----1.7
WrLat Disk
----- ---0.0 0a.20
Use the -AllProtocols switch to collect more system-level performance data all at once:
PS C:\Toolkit\1.4.0> $allPerf = Invoke-NaSysstat -AllProtocols -Count 1 -Hashtable
PS C:\Toolkit\1.4.0> $allPerf
Name
---nfsv3
wafl
system
cifs
iscsi
fcp
Value
----DataONTAP.PowerShell.SDK.Cmdlets.Perf.Nfs3PerfInfo
DataONTAP.PowerShell.SDK.Cmdlets.Perf.WaflPerfInfo
DataONTAP.PowerShell.SDK.Cmdlets.Perf.SystemPerfInfo
DataONTAP.PowerShell.SDK.Cmdlets.Perf.CifsPerfInfo
DataONTAP.PowerShell.SDK.Cmdlets.Perf.IscsiPerfInfo
DataONTAP.PowerShell.SDK.Cmdlets.Perf.FcpPerfInfo
PS C:\Toolkit\1.4.0> $allPerf["system"]
CPU
--1%
NFS
--0
CIFS
---0
HTTP
---0
FCP iSCSI
--- ----0
0
RdOps
----0
WrOps TotOps
----- -----0
0
NetRcvd
------956 B
NetSent
------4 KB
DiskRd
-----5 KB
DiskWr
-----85 KB
RdLat
----0.0
WrLat
----0.0
PS C:\Toolkit\1.4.0> $allPerf["wafl"]
CpCount CpTime
------- -----1 00:00:00.1120000
CacheAge
-------02:36:28.1750000
PS C:\Toolkit\1.4.0> $allPerf["iscsi"]
Read
---3 KB
Written
------0
TotOps
-----0
TotLat
-----0.0
Invoke-NaSysstat totals or averages data over the specified interval. This may be changed using the
-SampleIntervalSeconds parameter.
TotLat
-----0.1
LUN-to-host correlation
Toolkit 1.4 adds a cmdlet, Get-NaHostDisk, which enumerates all disks on the local host that correspond to Data ONTAP
LUNs. Both host- and controller-side information are presented. The cmdlet supports Windows Server 2003 and later.
PS C:\Toolkit\1.4.0> Get-NaHostDisk
Disk
---4
5
1
7
9
10
3
2
6
8
Size
---20.0 GB
20.0 GB
50.0 GB
20.0 GB
34.0 GB
20.0 GB
1.0 GB
50.0 GB
49.9 GB
50.0 GB
ControllerPath
-------------dunn:/vol/vol2/lun2
dunn:/vol/vol2/lun1
benson:/vol/vol1/testlun
dunn:/vol/vol2/lun5
dunn:/vol/vol2/lun7b
dunn:/vol/vol2/lun6
benson:/vol/vol1/lun3
benson:/vol/vol1/testlun2
dunn:/vol/opalis/opalisVM
dunn:/vol/opalis/w2k3OpalisVM
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
4
21476206080
dunn:/vol/vol2/lun2
\\.\PHYSICALDRIVE4
False
d3b1adee-4c19-455f-99b5-edd660ef9ad1
4
HnSolJNfoTZK
21476206080
\\X3550RRE7\root\cimv2:Win32_DiskDrive.DeviceID="\\\\.\\PHYSICALDRIVE4"
dunn
viaRPC.iqn.1991-05.com.microsoft:x3550rre7.rtprre.testdomain
{10.61.167.60}
/vol/vol2/lun2
vol2
More information about the host disks may be obtained from Windows using the PowerShell WMI accelerator:
PS C:\Toolkit\1.4.0> $diskWmiPath = (Get-NaHostDisk 4).DiskWmiPath
PS C:\Toolkit\1.4.0> [wmi] $diskWmiPath
Partitions
DeviceID
Model
Size
Caption
:
:
:
:
:
2
\\.\PHYSICALDRIVE4
NETAPP LUN SCSI Disk Device
21476206080
NETAPP LUN SCSI Disk Device
This information is also useful as a starting point for subsequent WMI queries.
PS C:\Toolkit\1.4.0> [wmi] $diskWmiPath | Format-List *
ConfigManagerErrorCode
LastErrorCode
NeedsCleaning
Status
DeviceID
StatusInfo
Partitions
BytesPerSector
ConfigManagerUserConfig
DefaultBlockSize
Index
InstallDate
InterfaceType
MaxBlockSize
MaxMediaSize
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
0
OK
\\.\PHYSICALDRIVE4
2
512
False
4
SCSI
MinBlockSize
NumberOfMediaSupported
SectorsPerTrack
Size
TotalCylinders
TotalHeads
TotalSectors
TotalTracks
TracksPerCylinder
__GENUS
__CLASS
__SUPERCLASS
__DYNASTY
__RELPATH
__PROPERTY_COUNT
__DERIVATION
__SERVER
__NAMESPACE
__PATH
Availability
Capabilities
CapabilityDescriptions
Caption
CompressionMethod
CreationClassName
Description
ErrorCleared
ErrorDescription
ErrorMethodology
FirmwareRevision
Manufacturer
MediaLoaded
MediaType
Model
Name
PNPDeviceID
PowerManagementCapabilities
PowerManagementSupported
SCSIBus
SCSILogicalUnit
SCSIPort
SCSITargetId
SerialNumber
Signature
SystemCreationClassName
SystemName
Scope
Path
Options
ClassPath
Properties
SystemProperties
Qualifiers
Site
Container
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
63
21476206080
2611
255
41945715
665805
255
2
Win32_DiskDrive
CIM_DiskDrive
CIM_ManagedSystemElement
Win32_DiskDrive.DeviceID="\\\\.\\PHYSICALDRIVE4"
51
{CIM_DiskDrive, CIM_MediaAccessDevice, CIM_LogicalDevice, CIM_LogicalElement...}
X3550RRE7
root\cimv2
\\X3550RRE7\root\cimv2:Win32_DiskDrive.DeviceID="\\\\.\\PHYSICALDRIVE4"
{3, 4}
{Random Access, Supports Writing}
NETAPP LUN SCSI Disk Device
Win32_DiskDrive
Disk drive
7350
(Standard disk drives)
True
Fixed hard disk media
NETAPP LUN SCSI Disk Device
\\.\PHYSICALDRIVE4
SCSI\DISK&VEN_NETAPP&PROD_LUN\1&1C121344&0&000100
0
0
3
1
HnSolJNfoTZK
Win32_ComputerSystem
X3550RRE7
System.Management.ManagementScope
\\X3550RRE7\root\cimv2:Win32_DiskDrive.DeviceID="\\\\.\\PHYSICALDRIVE4"
System.Management.ObjectGetOptions
\\X3550RRE7\root\cimv2:Win32_DiskDrive
{Availability, BytesPerSector, Capabilities, CapabilityDescriptions...}
{__GENUS, __CLASS, __SUPERCLASS, __DYNASTY...}
{dynamic, Locale, provider, UUID}
Get-NaHostDisk is also fully aware of Windows Server 2008 failover clusters and cluster shared volumes:
PS C:\Toolkit\1.4.0> Get-NaHostDisk | ft ClusterResource, ClusterGroup, ClusterNode, ControllerPath -auto
ClusterResource
--------------Cluster Disk VM0
MCB - WSFCRRE3
MCB - WSFCRRE2
Cluster Disk 3
fas2040rre1 - CSV_1
CSV0
Cluster Disk 2
ClusterGroup
-----------VM0
Available Storage
Available Storage
Available Storage
2a2edcba-1f03-4e81-9a0e-77d09337d248
7a1c8935-2112-44d3-b4a5-cf9cecdc45e3
Cluster Group
ClusterNode
----------FUJIRX200RRE3
FUJIRX200RRE3
FUJIRX200RRE3
FUJIRX200RRE3
FUJIRX200RRE3
FUJIRX200RRE3
FUJIRX200RRE3
ControllerPath
-------------FAS3070-SITEB:/vol/WSFCRRE/VM0
FAS3070-SITEB:/vol/WSFCRRE/WSFCRRE2
FAS3070-SITEB:/vol/WSFCRRE/WSFCRRE3
fas2040rre1:/vol/luns/wsfcrre/vmdisk0
fas2040rre1:/vol/luns/wsfcrre/csv_1
FAS3070-SITEB:/vol/WSFCRRE/CSV0
indy:/vol/WSFCRRE/quorum2
copyoffload
flash
fpolicy
lock
rsh
:
:
:
:
:
:
:
:
:
:
:
tree
{*}
vol1
5368709120
False
-
Add-NaQuota
Get-NaQuota
Remove-NaQuota
Set-NaQuota
Furthermore, more of the snapshot cmdlets now work with aggregate snapshots. These include:
Get-NaSnapshot
Get-NaSnapshotReserve
New-NaSnapshot
Remove-NaSnapshot
Rename-NaSnapshot
Set-NaSnapshotReserve
Storage
------{C:\ClusterStorage\Volume1\BEAMDEV2K8\BEAMDEV2K8.vhd}
{F:\VM0\VM0.vhd}
{C:\ClusterStorage\Volume1\WSFCRRE2\Virtual Hard Disks\WSFCRRE2.vhd}
{C:\ClusterStorage\Volume1\WSFCRRE3\Virtual Hard Disks\WSFCRRE3.vhd}
{C:\ClusterStorage\Volume1\NICHOLSONDEV2K8\NICHOLSONDEV2K8_2CB75BE7-534F-41D4-8062-07...
Size
---151.0 GB
21.0 GB
151.0 GB
151.0 GB
151.0 GB
ControllerPath
-------------fas2040rre1:/vol/luns/wsfcrre/csv_1
FAS3070-SITEB:/vol/WSFCRRE/VM0
fas2040rre1:/vol/luns/wsfcrre/csv_1
fas2040rre1:/vol/luns/wsfcrre/csv_1
fas2040rre1:/vol/luns/wsfcrre/csv_1
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
1
162153169920
fas2040rre1:/vol/luns/wsfcrre/csv_1
192.168.0.8
C:\ClusterStorage\Volume1\BEAMDEV2K8\BEAMDEV2K8.vhd
VHD
2a2edcba-1f03-4e81-9a0e-77d09337d248
fas2040rre1 - CSV_1
FUJIRX200RRE3
C:\ClusterStorage\Volume1
\\.\PHYSICALDRIVE1
\\?\Volume{e7413dd2-06cf-11e0-b891-001517716ae7}
True
80468912
1
P4DahZ/p1hWD
162153169920
\\FUJIRX200RRE3\root\cimv2:Win32_DiskDrive.DeviceID="\\\\.\\PHYSICALDRIVE1"
fas2040rre1
WSFCRRE
Get-NaHelpUnsupported correlates the supported API list with the Toolkit cmdlets and returns a list of Toolkit cmdlets
that will not work on the current controller due to missing APIs. For example, a controller running Data ONTAP 7.3.5 will
not have the newer volume move functions:
PS C:\Toolkit\1.4.0> Get-NaHelpUnsupported
Name
---Get-NaVolMove
Invoke-NaVolMoveCutover
Resume-NaVolMove
Start-NaVolMove
Stop-NaVolMove
Suspend-NaVolMove
Api
--{volume-move-status}
{volume-move-cutover}
{volume-move-resume}
{volume-move-start}
{volume-move-abort}
{volume-move-pause}
Category
-------volume
volume
volume
volume
volume
volume
Hashed options
For easier use in scripts, the options cmdlets (Get-NaAggrOption, Get-NaVolOption , Get-NaOption) optionally return
their output in a hashtable.
PS C:\Toolkit\1.4.0> $options = Get-NaOption *http* -Hashtable
PS C:\Toolkit\1.4.0> $options
Name
---httpd.admin.top-page.authen...
httpd.admin.enable
httpd.rootdir
httpd.admin.ssl.enable
httpd.enable
httpd.ipv6.enable
Value
----on
on
/vol/vol0/home/http
on
off
on
httpd.log.format
httpd.timeout
httpd.admin.hostsequiv.enable
httpd.autoindex.enable
httpd.timewait.enable
httpd.bypass_traverse_checking
httpd.admin.max_connections
httpd.admin.access
httpd.method.trace.enable
httpd.access
common
300
off
off
off
off
512
legacy
off
legacy
PS C:\Toolkit\1.4.0> $options["httpd.ipv6.enable"]
on
Provider enhancements
In Toolkit 1.4, the DataONTAP PowerShell provider leverages the copy offload feature, if available, for copying or moving
files. The provider also supports aggregate paths.
State
----online
TotalSize
--------2.8 TB
Used
---38%
FilesUsed FilesTotal
--------- ---------96
31k
Selecting just the Name, TotalSize, Available, and Disks fields leads to this:
PS C:\Toolkit\1.3.0> Get-NaAggr aggr0 | Select Name,TotalSize,Available,Disks
Name
---aggr0
TotalSize
---------
Available
---------
Disks
-----
TotalSize, Available, and Disks are not actually fields of the output object, so they appear empty when referred to by
name. With Toolkit 1.4, the column headers (which are often shortened to fit in the limited space available) are aliased
to their source fields:
PS C:\Toolkit\1.4.0> Get-NaAggr aggr0 | Select Name,TotalSize,Available,Disks
Name
---aggr0
TotalSize
--------3039371522048
New cmdlets
These are the new cmdlets in Data ONTAP PowerShell Toolkit 1.4:
Get-NaCopyOffload
Start-NaCopyOffload
Stop-NaCopyOffload
Get-NaFlashDevice
Get-NaFlashProfile
Get-NaFlashThreshold
Add-NaFpolicyExtension
Disable-NaFpolicy
Enable-NaFpolicy
Available
--------1945910370304
Disks
----6
Get-NaFpolicy
Get-NaFpolicyExtensionList
Get-NaFpolicyOption
Get-NaFpolicySecondaryServer
Get-NaFpolicyServer
Get-NaFpolicyVolumeList
New-NaFpolicy
Remove-NaFpolicy
Remove-NaFpolicyExtension
Reset-NaFpolicyExtensionList
Set-NaFpolicy
Set-NaFpolicyExtensionList
Set-NaFpolicyOption
Set-NaFpolicySecondaryServer
Set-NaFpolicyVolumeList
Stop-NaFpolicyServer
Get-NaLockStatus
Invoke-NaSysstat
Disconnect-NaRshSession
Get-NaRshSession
Get-NaRshStatistics
Get-NaSystemApi
Invoke-NaSystemApi
Get-NaHelpUnsupported
Get-NaHostDisk
Get-NaVolMove
Invoke-NaVolMoveCutover
Resume-NaVolMove
Start-NaVolMove
Stop-NaVolMove
Suspend-NaVolMove
Added workaround for issue where system-cli API sent to a vfiler can cause Data ONTAP to panic.
Fixed issue with wildcard patterns in cmdlets that accept arrays.
Added workaround for incorrect date/time values reported by Data ONTAP.
Options
root
snapshot_autodelete=off
Invoke-NaSsh declares the ValueFromRemainingArguments attribute, so the CLI command need not use quotation
marks unless there are hyphens that can confuse the PowerShell parser:
PS C:\Users\cknight> Invoke-NaSsh "sysconfig -V"
volume aggr0 (1 RAID group):
group 0: 3 disks
volume aggr1 (1 RAID group):
group 0: 8 disks
volume aggr2 (1 RAID group):
group 0: 3 disks
Invoke-NaSsh uses SSH connections independent of the normal HTTP or RPC connections used by the Toolkit, so the
cmdlet must have valid controller credentials. If you are using HTTP or HTTPS connections, the Toolkit already has
credentials and uses those for SSH as well. If you are using RPC, credentials must be supplied independently, either
explicitly using the -Credential parameter or implicitly using the new credentials cache mechanism.
You can use PowerShells alias feature to simplify Invoke-NaSsh even further:
PS C:\Users\cknight> New-Alias ssh Invoke-NaSsh
PS C:\Users\cknight> ssh vol status
Volume State
Status
testvol3 online
raid_dp, flex
sis
SC_3_3_0 online
raid_dp, flex
sis
vol0 online
raid_dp, flex
sis
redirect
active_redirect
Options
create_ucode=on,
convert_ucode=on
create_ucode=on,
convert_ucode=on
root, create_ucode=on,
convert_ucode=on
And although it isnt something for which we can claim unbounded support, Invoke-NaSsh isnt artificially limited to
Data ONTAP connections. SSH commands may be directed elsewhere, such as a NetApp DataFabric Manager host, by
specifying the -Name and -Credential parameters:
PS C:\Users\cknight> Invoke-NaSsh -Name 10.60.0.10 -Credential Administrator whoami
dfm\administrator
Credentials cache
Toolkit 1.3 adds a secure credentials cache, which is supported by Connect-NaController and Invoke-NaSsh. This
feature allows HTTP/HTTPS users to use the Toolkit with nearly the same convenience as RPC users. To add a credential,
just connect to a controller using HTTP or HTTPS and issue Add-NaCredential:
PS C:\Users\cknight> Connect-NaController dunn -Credential root
Name
---dunn
Address
------10.61.167.60
Ontapi
-----1.12
Version
------NetApp Release 7.3.3: Thu Mar 11 22:29:52 PST 2010
PS C:\Users\cknight> Add-NaCredential
Name
---dunn
Credential
HostUser
----------------System.Management.Automation.PSCrede... cknight-lw7\cknight
Once in the cache, those credentials are always used and cause Connect-NaController to prefer HTTP/HTTPS unless
explicitly overridden, such as with the -Credential or -RPC parameters.
The credentials cache uses Windows built-in data protection facility. By default, credentials are encrypted using the
context of the current user, meaning that only the same user can retrieve those credentials. Multiple users may each
save their own credentials on the same Windows host. By specifying the -SystemScope parameter to Add-NaCredential,
the user may save credentials such that any user or process on the local Windows system can retrieve the credentials.
Saving credentials with system scope is useful for scripts that run under a different user account, but that option should
only be used on a Windows host with limited access since any logged-in user may access the credentials.
The credentials cache is designed to interoperate with the cmdlets shipped with ApplianceWatch 2.1 product. Note,
however, that ApplianceWatch only supports storing credentials with system scope.
Regardless of whether credentials are saved using user or system scope, they may only be decrypted on the Windows
host on which they were saved. It is therefore not possible to copy the credentials cache file for use on a different host.
If the cache contains entries for a given controller for both the current user and the system, as in the following example,
the entry with local user scope is used preferentially.
PS C:\Users\cknight> Get-NaCredential | ft -AutoSize
Name
---dunn
benson
indy
indy
10.61.169.28
10.61.169.29
dunn
Credential
---------System.Management.Automation.PSCredential
System.Management.Automation.PSCredential
System.Management.Automation.PSCredential
System.Management.Automation.PSCredential
System.Management.Automation.PSCredential
System.Management.Automation.PSCredential
System.Management.Automation.PSCredential
HostUser
-------SYSTEM
SYSTEM
SYSTEM
cknight-lw7\cknight
cknight-lw7\cknight
cknight-lw7\cknight
cknight-lw7\cknight
FlexShare
Toolkit 1.3 adds eight cmdlets that support FlexShare, Data ONTAPs volume-based quality-of-service mechanism. The
cmdlet category for these is priority.
PowerShell Provider
PowerShell providers offer access to various resources, such as a file system, registry, or certificate store. Toolkit 1.3
contains an experimental feature, a PowerShell provider for Data ONTAP. Using the Data ONTAP provider, files and
directories in the Data ONTAP file system may be accessed using the same semantics as a local Windows disk. The
provider does not require any specific protocol, such as CIFS, to be licensed. The provider relies on the ManageONTAP
SDK, so I/O operations are slower than CIFS access and are primarily suited for administrative tasks.
The provider is automatically loaded when the DataONTAP module is imported:
PS C:\Users\cknight> Import-Module DataONTAP
PS C:\Users\cknight> Get-PSProvider
Name
---WSMan
Alias
Environment
FileSystem
Function
Registry
Variable
Certificate
DataONTAP
Capabilities
-----------Credentials
ShouldProcess
ShouldProcess
Filter, ShouldProcess
ShouldProcess
ShouldProcess, Transactions
ShouldProcess
ShouldProcess
ShouldProcess
Drives
-----{WSMan}
{Alias}
{Env}
{C, D, E, I...}
{Function}
{HKLM, HKCU}
{Variable}
{cert}
{}
Address
------10.61.167.60
Ontapi
-----1.12
Version
------NetApp Release 7.3.3: Thu Mar 11 22:29:52 PST 2010
Used (GB)
---------
Root
---/
Most of the various file listing and manipulation commands work as expected. The /etc directory is a shortcut to the etc
directory on the root volume. Keep in mind that PowerShell provider drives are only accessible within PowerShell.
PS dunn:\> dir
Name
---.
etc
vol
Type
---directory
directory
directory
Size
---4 KB
12 KB
4 KB
Created
------8/12/2008
Perm Empty
---- ----1070
When transferring binary files to Data ONTAP, use the -Encoding and -ReadCount parameters as follows:
PS dunn:\> Get-Content C:\file.bin -Encoding byte -ReadCount 128kb | Set-Content file.bin -Encoding byte
When transferring binary files from Data ONTAP, use the -Encoding parameter as follows:
PS dunn:\> Get-Content file.bin -Encoding byte | Set-Content C:\file.bin -Encoding byte
The Data ONTAP PowerShell Provider supports a few dynamic parameters that are patterned after the FileSystem
provider:
Encoding
o Unknown. The encoding type is unknown or invalid. The data can be treated as binary.
o String. Uses the encoding type for a string.
o Unicode. Encodes in UTF-16 format using the little-endian byte order.
o Byte. Encodes a set of characters into a sequence of bytes.
o BigEndianUnicode. Encodes in UTF-16 format using the big-endian byte order.
o UTF8. Encodes in UTF-8 format.
o UTF7. Encodes in UTF-7 format.
o ASCII. Uses the encoding for the ASCII (7-bit) character set. ASCII is the default.
o Cmdlets Supported: Add-Content, Get-Content, Set-Content
Delimiter
o Specifies the line delimiter to use when writing the file. The default is "\n" (end of line).
o Cmdlets Supported: Add-Content, Set-Content
Although we consider the provider to be experimental, significant changes are not anticipated. We invite users to let us
know how they are using the provider and how we can make it better.
ShouldProcess
PowerShell cmdlets use a built-in mechanism called ShouldProcess to handle confirmations and the -WhatIf parameter.
Previous releases of the Toolkit included ShouldProcess support mostly for cmdlets whose nature required a user
confirmation. Toolkit 1.3 extends ShouldProcess support for all non-getter cmdlets. This allows extensive use of the
-WhatIf parameter:
PS C:\Users\cknight> Set-NaVolLanguage vol0 C.UTF-8 -WhatIf
What if: Setting language for volume vol0 to C.UTF-8.
Almost all of the affected cmdlets are set to ConfirmImpact.Low, whereas PowerShells default confirmation level is
Medium, so this change should have little or no impact on existing scripts.
ToString
The ToString() method has been overridden for all object types that are returned by Toolkit cmdlets, improving
readability of Toolkit output. What previously appeared like this:
PS C:\Software\Toolkit\1.2.0> Get-NaSnmp
Communities
Contact
IsTrapEnabled
Location
Traphosts
:
:
:
:
:
{NetApp.Ontapi.Filer.Snmp.CommunityInfo}
Bill Smith
True
Main lab
{x3550rre8.rtprre.testdomain}
Communities
Contact
IsTrapEnabled
Location
Traphosts
:
:
:
:
:
{public}
Bill Smith
True
Main lab
{x3550rre8.rtprre.testdomain}
The obvious caveat is that it isnt obvious whether one is looking at a mere string or what may be a much larger object.
When inspecting Toolkit output, dont hesitate to use Get-Member to better understand what is available:
PS C:\Software\Toolkit\1.3.0> Get-NaSnmp | Get-Member
TypeName: DataONTAP.PowerShell.SDK.Cmdlets.Snmp.SnmpStatusInfo
Name
MemberType
------------Equals
Method
GetHashCode
Method
GetType
Method
ToString
Method
Communities
Property
Contact
Property
IsTrapEnabled Property
PublicKeyTok...
Location
Property
Traphosts
Property
Definition
---------bool Equals(System.Object obj)
int GetHashCode()
type GetType()
string ToString()
NetApp.Ontapi.Filer.Snmp.CommunityInfo[] Communities {get;set;}
System.String Contact {get;set;}
System.Nullable`1[[System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral,
System.String Location {get;set;}
NetApp.Ontapi.Filer.Snmp.TraphostInfo[] Traphosts {get;set;}
Sorting
Many getter cmdlets now sort their output by a nominal field. For example, what was previously:
PS C:\Software\Toolkit\1.2.0> Get-NaLun */vol2/*
Path
---/vol/vol2/{6e8dbad4-894b-413a-b9cc-3c...
/vol/vol2/lun2clone
/vol/vol2/lun3bclone
/vol/vol2/testqtree/testlun
/vol/vol2/lun101
/vol/vol2/test
/vol/vol2/lun3b
/vol/vol2/lun6
/vol/vol2/lun7b
/vol/vol2/metadata
/vol/vol2/lun5
/vol/vol2/lun4
/vol/vol2/lun3
/vol/vol2/quorum
/vol/vol2/lun2
/vol/vol2/lun1
TotalSize
--------20.0 GB
20.0 GB
2.0 GB
10.0 GB
2.3 GB
1.0 GB
2.0 GB
20.0 GB
34.0 GB
1.0 GB
20.0 GB
20.1 GB
20.0 GB
1.0 GB
20.0 GB
20.0 GB
Protocol
Online Mapped
------------- -----windows_gpt
True
True
windows_gpt
True False
windows_gpt
True False
image
True False
image
True False
windows_2008 False False
windows_gpt
True
True
windows_gpt
True
True
windows_gpt
True
True
windows_gpt
True
True
windows_gpt
True
True
windows_gpt
True False
windows_gpt
True
True
windows_gpt
True
True
windows_gpt
True
True
windows_gpt
True
True
Thin
---True
True
True
True
True
True
True
True
True
True
True
True
True
True
True
True
Protocol
Online Mapped
------------- -----windows_gpt
True
True
windows_gpt
True
True
image
True False
windows_gpt
True
True
windows_gpt
True False
windows_gpt
True
True
windows_gpt
True
True
windows_gpt
True False
windows_gpt
True False
windows_gpt
True
True
windows_gpt
True
True
windows_gpt
True
True
windows_gpt
True
True
windows_gpt
True
True
windows_2008 False False
image
True False
Thin
---True
True
True
True
True
True
True
True
True
True
True
True
True
True
True
True
Comment
------Virtual machine 1
data volume for VM3
test
data volume for VM3
TotalSize
--------20.0 GB
20.0 GB
2.3 GB
20.0 GB
20.0 GB
20.0 GB
2.0 GB
2.0 GB
20.1 GB
20.0 GB
20.0 GB
34.0 GB
1.0 GB
1.0 GB
1.0 GB
10.0 GB
Comment
-------
Virtual machine 1
Virtual machine 1
data volume for VM3
data volume for VM3
Connection enhancements
Connect-NaController adds three new switch parameters (-RPC, -HTTP, -HTTPS) that allow more explicit control over
which protocol is used by Toolkit connections. RPC is still the default if no credentials are available, but with the
addition of the credentials cache, it is no longer true that RPC is always used if the -Credential parameter is not
specified. The previously available parameters, -ForceSecure and -ForceUnsecure, are deprecated but still work via
parameter aliases.
Connect-NaController also adds a -Timeout parameter that affects all Toolkit cmdlets that use the resulting connection.
The parameter is specified in milliseconds and only affects HTTP/HTTPS connections. The default value is 10 seconds.
There were a few reports of Windows HTTP proxy settings preventing Toolkit connections. Toolkit 1.3 ignores HTTP
proxy settings.
Parameter aliases
PowerShell cmdlets often support parameter aliases, but it is not obvious how to discover those. Toolkit 1.3 adds a
cmdlet, Get-NaHelpAlias, which displays parameter aliases. It works with all cmdlets, not just those of the Toolkit.
PS C:\Software\Toolkit\1.3.0> Get-NaHelpAlias New-NaVol
Name
---Name
Aggregate
SnapLock
LanguageCode
SpaceReserve
Controller
Size
SnapLockType
Verbose
Debug
ErrorAction
WarningAction
ErrorVariable
WarningVariable
OutVariable
OutBuffer
WhatIf
Confirm
Aliases
------{}
{Aggr}
{}
{Language, Lang}
{Reserve}
{Filer, Server}
{}
{}
{vb}
{db}
{ea}
{wa}
{ev}
{wv}
{ov}
{ob}
{wi}
{cf}
New cmdlets
These are the new cmdlets in Data ONTAP PowerShell Toolkit 1.3:
Disable-NaPriority
Enable-NaPriority
Get-NaPriority
Get-NaPriorityDefault
Get-NaPriorityVolume
Set-NaPriority
Set-NaPriorityDefault
Set-NaPriorityVolume
Set-NaQtree
Add-NaCredential
Get-NaCredential
Remove-NaCredential
Mount-NaController
Dismount-NaController
Invoke-NaSsh
Get-NaHelpAlias
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
True
block
aggr1
8
622580
155
True
False
False
False
unmirrored
testvol
0
1
{/aggr1/plex0}
0
16
raid_dp,sis
0
0
0
NetApp.Ontapi.Filer.Volume.Sis
17175863296
17179869184
4005888
volume
True
online
flex
ac4b29ba-3293-11df-87b2-00a09806c227
True
True
True
State
----online
online
online
online
online
online
online
online
online
online
online
online
online
TotalSize
--------16.0 GB
4.0 GB
96.1 GB
16.0 GB
180.0 GB
8.0 GB
24.0 GB
118.0 GB
2.4 GB
16.0 GB
180.0 GB
16.0 GB
16.0 GB
Used
---0%
4%
16%
5%
50%
0%
88%
100%
1%
5%
46%
0%
0%
Available Dedupe
--------- -----16.0 GB True
3.9 GB True
80.9 GB True
15.2 GB True
89.3 GB True
8.0 GB True
2.8 GB True
0 True
2.4 GB True
15.2 GB True
97.3 GB True
16.0 GB True
16.0 GB True
The data formatters are optimized for a 120-character display width. You can set the default shell width by modifying
your PowerShell profile like this:
$a = (Get-Host).UI.RawUI
$b = $a.WindowSize
$b.Height = 75
$b.Width = 120
$a.WindowSize = $b
$b = $a.BufferSize
$b.Height = 3000
$a.BufferSize = $b
You can also customize the data formatters as needed by modifying the file DataONTAP.Format.ps1xml in the Toolkit
module installation directory, i.e. C:\Windows\System32\WindowsPowerShell\v1.0\Modules\DataONTAP. If you edit
the file, make sure to keep a backup copy of your changes in a separate location, as future Toolkit updates will overwrite
the file.
The formatters also streamline list and wide views for many common object types. To see the unformatted objects, try
something like: Get-NaVol | Format-List *
Guid
---68073F14-5B9A-44F2-923F-766432BE9A68
F4043F56-79A1-4FA3-8F71-77E2CEBCF0E7
Storage
------{O:\OpalisVM.vhd, Disk 2 50.01 GB Bus 0 Lun 1 Target 2}
{P:\W2k3OpalisVM.vhd}
:
:
:
:
:
:
:
:
:
:
:
O:\OpalisVM.vhd
VHD
O:\
\\.\PHYSICALDRIVE6
\\?\Volume{4044589b-4fd9-4c90-8495-f430945e7439}\
False
dunn
viaRPC.iqn.1991-05.com.microsoft:x3550rre7.rtprre.testdomain
10.61.167.60
/vol/opalis/opalisVM
opalis
VmDiskResourceName
VmDiskResourceType
HostDrivePath
HostDiskName
HostVolume
HostVolumeIsCsv
ControllerName
ControllerIgroup
ControllerAddress
ControllerLunPath
ControllerVolumeName
:
:
:
:
:
:
:
:
:
:
:
Get-NaHyperV requires no credentials but requires the Hyper-V role to be installed. The values returned in the
ControllerName or ControllerAddress fields may be passed to Connect-NaController for further
storage queries or manipulation.
Network configuration
By popular request, Toolkit 1.2 adds twenty cmdlets for configuring network interfaces, VLANs, VIFs, routes and
ipspaces. By design, all cmdlets that change the network settings modify both the active configuration and the
persistent configuration stored in /etc/rc. This ensures that all changes are maintained across reboots. Non-network
items in /etc/rc are preserved by Data ONTAP. Most of the new network cmdlets require Data ONTAP 7.3.3 or later and
arent yet supported in the Data ONTAP 8.x releases.
New cmdlets
These are the new cmdlets in Data ONTAP PowerShell Toolkit 1.2. Many of these require APIs that are new in Data
ONTAP 7.3.3 or later and arent yet available in the Data ONTAP 8.x releases.
Get-NaCifsShareAcl
Remove-NaCifsShareAcl
Set-NaCifsShareAcl
Clear-NaLunPersistentReservation
Get-NaLunPersistentReservation
Set-NaLunDeviceId
Get-NaLunSelect
Set-NaLunSelect
Add-NaNetRoute
Add-NaNetVlan
Get-NaNetActiveConfig
Get-NaNetInterface
Get-NaNetIpspace
Get-NaNetPersistentConfig
Get-NaNetRoute
Get-NaNetVif
Get-NaNetVlan
New-NaNetIpspace
New-NaNetVif
Remove-NaNetIpspace
Remove-NaNetRoute
Remove-NaNetVif
Remove-NaNetVlan
Set-NaNetInterface
Set-NaNetIpspace
Set-NaNetPersistentConfig
Set-NaNetVif
Set-NaNetVlan
Get-NaShelf
Get-NaShelfEnvironment
Set-NaShelfLight
Start-NaShelfUpdate
Get-NaSystemAvailableReplicationTransfers
ConvertTo-FormattedNumber
Get-NaHyperV
Get-NaToolkitVersion
Get-NaVolCloneSplitEstimate