Powershell Pocket Guide for Netapp Clustered Ontap

This page provides a list of Powershell commands that I commonly use with Netapp C-Mode SANs. Like with the other Pocket Guide pages on this site, it will be updated constantly.

Last Update 4th Novemeber 2013

Download Powershell for Netapp Clustered Ontap

Data Ontap Powershell Toolkit v3 – This toolkit is used for both 7-mode and clustered ontap

General

Connect-NaController cluster1 -credential (get-credential) (This commands connects and authenticates you to your cluster)

$global:CurrentNcController.Vserver = “vserver1” (Sets the context to vserver1, so all commands will run against vserver1)

Volumes

Get-NcVol (Lists all volumes in the vserver)

New-NcVol volume1 aggr1 50g -JunctionPath /volume1 (Create a new volume called volume1 with 50gb)

New-NcVolClone volume1_clone volume1 -ParentSnapshot volconedemo -JunctionPath /volume1_clone (Creates a volume clone of volume1, called volume1_clone based off snapshot volconedemo)

Dismount-NcVol volume1_clone (Unmounts a volume from its parent volume and deletes the Junction Path)

Set-NcVol volume1_clone -offline (Sets volume offline)

Remove-NcVol volume1_clone (Removes/Destroys volume. Append with -Confirm:$false to not prompt)

Volume Efficiency (Dedupe)

Enable-NcSis volume1 (enabled dedupe on volume1)

Disable-NcSis volume1 (disabled dedupe on volume1)

Snapshots

Get-NcSnapshot (Lists all snapshots on the vserver)

New-NcSnapshot volume1 snapdemo (Creates a snapshot called snapdemo on volume1)

Remove-NcSnapshot volume1 snapdemo (Removes a snapshot called snapdemo on volume1)

Luns

New-NcLun /vol/volume1/exchangedb 20gb -Unreserved (Creates an unreserved Lun of 20gb)

Add-NcLunMap /vol/volume1/volume1_lun vmware-cluster (Maps the following lun to vmware-cluster igroup)

Remove-NcLunMap /vol/volume1/volume1_lun vmware-cluster (Un maps the following lun from vmware-cluster igroup)

Remove-NcLun /vol/volume1/exchangedb (Removes a lun)

Disclaimer:
All the tutorials included on this site are performed in a lab environment to simulate a real world production scenario. As everything is done to provide the most accurate steps to date, we take no responsibility if you implement any of these steps in a production environment.

 

Be the first to comment

Leave a Reply

Your email address will not be published.


*


*

This site uses Akismet to reduce spam. Learn how your comment data is processed.