Data ONTAP PowerShell Toolkit - Discover controllers

by Extraordinary Contributor on ‎2010-08-13 12:21 PM

Toolkit 1.1 has a new cmdlet, Find-NaController.  It uses SNMP, not ZAPI, so no credentials are required.  There are lots of interesting use cases.  Here are a few:

Discover a single controller, or an address range, or an entire subnet:

PS C:\> Find-NaController 10.61.167.60/24

Model            : FAS3050

Type             : Clustered_controller

SystemID         : 101167411

SerialNumber     : 1056394

VolumeCount      : 24

AggregateCount   : 6

PartnerName      : 3050-6

Status           : Critical

StatusMessage    : This node has taken over 3050-6.

Description      : NetApp Release 7.3.3X16: Wed Dec  9 23:29:44 PST 2009

ObjectIdentifier : 1.3.6.1.4.1.789.2.3

Contact          :

Location         :

Address          : 10.61.167.16

Name             : 3050-3

Model            : FAS3050

Type             : Clustered_controller

SystemID         : 101180548

SerialNumber     : 1072602

VolumeCount      : 11

AggregateCount   : 4

PartnerName      : 3050-8

Status           : Critical

StatusMessage    : This node has taken over 3050-8.

Description      : NetApp Release 7.3.3X16: Wed Dec  9 23:29:44 PST 2009

ObjectIdentifier : 1.3.6.1.4.1.789.2.3

Contact          :

Location         :

Address          : 10.61.167.18

Name             : 3050-7

Check overall status of controllers:

PS C:\> Find-NaController 10.61.165.1/24 | ft Name, Status, StatusMessage -Autosize

Name     Status      StatusMessage

----     ------      -------------

nasbetor OK          The system's global status is normal.

naspike  OK          The system's global status is normal.

prak     Noncritical Disk on adapter 4a, shelf 1, bay 13, failed.  There are not enough spare disks. /vol0/plex0/rg0...

sulu1    OK          The system's global status is normal.

sulu2    OK          The system's global status is normal.

jabba    Critical    Disk shelf fault.

hutt     Critical    Disk on adapter 2a, shelf 1, bay 9, failed.  Disk shelf fault.

sato     Critical    Cluster failover of trip is not possible: waiting for partner to recover. /vol/esx_win_vol2 is ...

FAS270c1 Critical    Cluster failover of FAS270c2 is not possible: cluster takeover disabled. Disk on adapter 0b, sh...

FAS270c2 Critical    Cluster failover of FAS270c1 is not possible: cluster takeover disabled. Disk on adapter 0b, sh...

indy     OK          The system's global status is normal.

monza    Noncritical Disk on adapter 0c, shelf 66, bay 5, failed.

bele     Critical    mira has taken over this node.

mira     Critical    This node has taken over bele.

See what ONTAP versions you’re running:

PS C:\> Find-NaController 10.61.167.1/24 | sort Description | ft Name, Description -Autosize

Name         Description

----         -----------

nashelbig2   NetApp Release 7.1.2.1P1: Tue Apr 17 08:11:00 PDT 2007

nashelbig1   NetApp Release 7.1.2.1P1: Tue Apr 17 08:11:00 PDT 2007

nasrotate3   NetApp Release 7.1.2.1P1: Tue Apr 17 08:11:00 PDT 2007

iroquois     NetApp Release 7.2.4P6: Wed Mar  5 14:49:26 PST 2008

iroquois     NetApp Release 7.2.4P6: Wed Mar  5 14:49:26 PST 2008

galaxy       NetApp Release 7.2.4P6: Wed Mar  5 14:49:26 PST 2008

globemaster  NetApp Release 7.2.4P6: Wed Mar  5 14:49:26 PST 2008

blackhawk    NetApp Release 7.2.4P6: Wed Mar  5 14:49:26 PST 2008

2050-rre-1   NetApp Release 7.2.5.1: Wed Jun 25 09:11:11 PDT 2008

2050-rre-2   NetApp Release 7.2.5.1: Wed Jun 25 09:11:11 PDT 2008

tng1         NetApp Release 7.2.6.1: Wed Dec 10 21:26:02 PST 2008

tng2         NetApp Release 7.2.6.1: Wed Dec 10 21:26:02 PST 2008

Imahara-1    NetApp Release 7.3.1P2: Sat Mar  7 11:51:42 PST 2009

Imahara-1    NetApp Release 7.3.1P2: Sat Mar  7 11:51:42 PST 2009

Imahara-1    NetApp Release 7.3.1P2: Sat Mar  7 11:51:42 PST 2009

fas3070rre1  NetApp Release 7.3.2: Thu Oct 15 04:12:15 PDT 2009

fas3070rre2  NetApp Release 7.3.2: Thu Oct 15 04:12:15 PDT 2009

3020ROTATE-2 NetApp Release 7.3.2X20: Mon Jul 20 15:38:16 PDT 2009

3020ROTATE-1 NetApp Release 7.3.2X20: Mon Jul 20 15:38:16 PDT 2009

Imahara-2    NetApp Release 7.3.3: Thu Mar 11 22:29:52 PST 2010

Imahara-2    NetApp Release 7.3.3: Thu Mar 11 22:29:52 PST 2010

benson       NetApp Release 7.3.3: Thu Mar 11 22:29:52 PST 2010

dunn         NetApp Release 7.3.3: Thu Mar 11 22:29:52 PST 2010

3050-7       NetApp Release 7.3.3X16: Wed Dec  9 23:29:44 PST 2009

3050-3       NetApp Release 7.3.3X16: Wed Dec  9 23:29:44 PST 2009

fas3040rre1  NetApp Release 8.0 7-Mode: Thu Mar 11 16:17:13 PST 2010

goldston     NetApp Release 8.0RC1: Thu Aug 13 15:59:02 PDT 2009

pittsboro    NetApp Release 8.0RC1: Thu Aug 13 15:59:02 PDT 2009

Tory1        NetApp Release 8.0RC3 7-Mode

Tory2        NetApp Release 8.0RC3 7-Mode

List all SNMP devices, not just NetApp ones:

PS C:\> Find-NaController 10.61.165.1/24 -All | ft Name, Address, Description -Autosize

Name                Address       Description
----                -------       -----------
nasbetor            10.61.165.23  NetApp Release 7.2.6.1: Wed Dec 10 21:26:02 PST 2008
naspike             10.61.165.24  NetApp Release 7.2.6.1: Wed Dec 10 21:26:02 PST 2008
prak                10.61.165.41  NetApp Release 7.2.3P4: Fri Sep  7 03:00:16 PDT 2007
brocade_p1          10.61.165.55  Fibre Channel Switch.
fabric2_60          10.61.165.60  SANbox 5602 FC Switch
BRO_3200_65         10.61.165.65  Fibre Channel Switch
Xsigo VP780 Chassis 10.61.165.70  Xsigo System
sulu1               10.61.165.71  NetApp Release 7.3.3X16: Wed Dec  9 23:29:44 PST 2009
Cp0                 10.61.165.83  Fibre Channel Switch.
cp1                 10.61.165.84  Fibre Channel Switch.
brocade200e-13      10.61.165.100 Fibre Channel Switch.
warf                10.61.165.110 SunOS warf 5.10 Generic sun4us
sulu2               10.61.165.115 NetApp Release 7.3.3X16: Wed Dec  9 23:29:44 PST 2009
ak_sw2              10.61.165.119 Fibre Channel Switch
brocade4100-5       10.61.165.121 Fibre Channel Switch.
jabba               10.61.165.122 NetApp Release 7.3.1.1: Mon Apr 20 22:58:46 PDT 2009
hutt                10.61.165.123 NetApp Release 7.3.1.1: Mon Apr 20 22:58:46 PDT 2009
elrond              10.61.165.125 SunOS elrond 5.10 Generic_141444-09 sun4u
brocade3800_2       10.61.165.128 Fibre Channel Switch
brocade4100-6       10.61.165.129 Fibre Channel Switch.
MCD6140-rtp2        10.61.165.131 MCDATA ED-6140 Model 001 Fibre Channel Switch, firmware 09.06.01 3
sato                10.61.165.134 NetApp Release 7.3.1.1: Mon Apr 20 22:58:46 PDT 2009
FB060003420         10.61.165.141 Fibre Channel Switch.
brocade4100_9       10.61.165.146 Fibre Channel Switch.
FB030002056         10.61.165.159 Fibre Channel Switch.
malibu              10.61.165.175 SunOS malibu 5.10 Generic_139555-08 sun4u
kes                 10.61.165.176 SunOS kes 5.10 Generic_127128-11 i86pc
sybok               10.61.165.180 SunOS sybok 5.10 Generic_137111-01 sun4us
joker1              10.61.165.183 SunOS joker1 5.10 Generic_139555-08 sun4v
FAS270c1            10.61.165.187 NetApp Release 7.3.1: Thu Jan  8 01:24:50 PST 2009
FAS270c2            10.61.165.188 NetApp Release 7.3.1: Thu Jan  8 01:24:50 PST 2009
brocade3850-2       10.61.165.191 Fibre Channel Switch.
NH060029600         10.61.165.192 Fibre Channel Switch.
borg1of5            10.61.165.221 Sun SNMP Agent,
indy                10.61.165.227 NetApp Release 7.2.7: Thu Oct 22 08:07:09 PDT 2009
bele                10.61.165.232 NetApp Release 7.2.3: Thu Jul  5 09:51:46 PDT 2007
mira                10.61.165.233 NetApp Release 7.2.3: Thu Jul  5 09:51:46 PDT 2007
brocade4100-7       10.61.165.251 Fibre Channel Switch.
brocade4100-8       10.61.165.252 Fibre Channel Switch.

Connect to all discovered controllers:

PS C:\> Find-NaController -StartAddress 10.61.167.60 -EndAddress 10.61.167.61 | Connect-NaController

OntapiMajorVersion : 1

OntapiMinorVersion : 12

Protocol           : RPC

Vfiler             :

Name               : dunn

Address            : 10.61.167.60

Port               : 0

Credentials        :

ValidateIncoming   : False

ValidateOutgoing   : False

Trace              : False

OntapiMajorVersion : 1

OntapiMinorVersion : 12

Protocol           : RPC

Vfiler             :

Name               : benson

Address            : 10.61.167.61

Port               : 0

Credentials        :

ValidateIncoming   : False

ValidateOutgoing   : False

Trace              : False

Warning!

This NetApp Community is public and open website that is indexed by search engines such as Google. Participation in the NetApp Community is voluntary. All content posted on the NetApp Community is publicly viewable and available. This includes the rich text editor which is not encrypted for https.

In accordance to our Code of Conduct and Community Terms of Use DO NOT post or attach the following:

  • Software files (compressed or uncompressed)
  • Files that require an End User License Agreement (EULA)
  • Confidential information
  • Personal data you do not want publicly available
  • Another’s personally identifiable information
  • Copyrighted materials without the permission of the copyright owner

Files and content that do not abide by the Community Terms of Use or Code of Conduct will be removed. Continued non-compliance may result in NetApp Community account restrictions or termination.