Validate-LIF-Config

by Occasional Contributor on ‎2014-01-27 01:29 AM - edited on ‎2015-02-27 07:02 AM by allison Former NetApp Employee

.Name Validate-LIF-Config .SYNOPSIS

This is a PowerShell script can help with identification of network configuration issues related to misconfiguration of failover groups and to give information of a lif.

 

.DESCRIPTION This PowerShell script used the OnTap PowerShell tool kit. IT provide configuration issues and alerts on misonfiguration.

 

The information provided includes:

- general lif information (IP/WWPN,Role,Allowed protocols)

- failover group and policy

- failover group members and their status

- current port and home port information

 

 .EXAMPLE

PS C:\Scripts\PowerShell> .\Validate-LIF-Config.ps1 -cluster cluster -username admin -password password -vs vs_p* -lif vs_pNFS_lif1

gathering cluster cluster configuration..........configuration gathered successfully

Analyzing vserver:vs_pNFS Type:data State:running LIF:vs_pNFS_lif1 IP:10.68.65.163/24 Status:up/up Role:data FailoverGroup:system-defined FailoverPolicy:nextavail AutoRevert:True Failover Group Members NODE:m-cmode01 PORT:e0a up/up Role:data Type:physical Speed:1000 PORT:e0b up/up Role:data Type:physical Speed:1000 PORT:e4b up/down Role:data Type:physical Speed:10 ERROR:PORT IS NOT ACTIVE PORT:e4c up/down Role:data Type:physical Speed:10 ERROR:PORT IS NOT ACTIVE PORT:e4d up/up Role:data Type:physical Speed:1000 PORT:e4d-2 up/up Role:data Type:vlan Speed:1000 PORT:e4d-3 up/up Role:data Type:vlan Speed:1000 PORT:e4d-4 up/up Role:data Type:vlan Speed:1000 NODE:m-cmode02 PORT:e0a up/up Role:data Type:physical Speed:1000 PORT:e0b up/up Role:data Type:physical Speed:1000 PORT:e4b up/down Role:data Type:physical Speed:10 ERROR:PORT IS NOT ACTIVE PORT:e4c up/down Role:data Type:physical Speed:10 ERROR:PORT IS NOT ACTIVE PORT:e4d up/down Role:data Type:physical Speed:10 ERROR:PORT IS NOT ACTIVE NODE:m-cmode03 PORT:e0a up/up Role:data Type:physical Speed:1000 PORT:e0b up/up Role:data Type:physical Speed:1000 PORT:e1b up/up Role:data Type:physical Speed:10000 PORT:e2b up/down Role:data Type:physical Speed:10 ERROR:PORT IS NOT ACTIVE NODE:m-cmode04 PORT:e0a up/up Role:data Type:physical Speed:1000 PORT:e0b up/up Role:data Type:physical Speed:1000 ERROR:MUILITPLE (4) NETWORKS ON LIFS USING FAILOVER GROUP MEMBERS 1.1.1.0/24 m-cmode02:e4d 10.68.65.0/24 m-cmode01:e0a m-cmode01:e0a m-cmode01:e0a m-cmode01:e0a m-cmode01:e0a m-cmode01:e0b m-cmode01:e4d m-cmode01:e4d m-cmode01:e4d m-cmode01:e4d m-cmode01:e4d m-cmode02:e0a m-cmode02:e0a m-cmode02:e0a m-cmode02:e0a m-cmode02:e0b m-cmode02:e4d m-cmode03:e0a m-cmode03:e0a m-cmode03:e0a m-cmode03:e0a m-cmode03:e0b m-cmode04:e0a m-cmode04:e0a m-cmode04:e0a m-cmode04:e0a m-cmode04:e0b 1.1.2.0/24 m-cmode02:e4d 172.16.0.0/24 m-cmode03:e1b m-cmode03:e1b m-cmode03:e1b m-cmode03:e1b Routing Group:d10.68.65.0/24 DataProtocols: nfs cifs CurrentPort: m-cmode01:e4d Summary report: Vserver: vs_pNFS LIF:vs_pNFS_lif1 ERROR:MUILITPLE NETWORKS ON LIFS USING FAILOVER GROUP MEMBERS !!! ERROR:SOME PORTS ARE NOT ACTIVE !!!

 

Comments
Member

Nice work Haim - I'l definitely be giving this a go.

How much work would be required to expand the script to do it's checks from autosupport data ? This would also be really handy...

Cheers,

Duane.

Frequent Contributor

This is great work and really answers a large problem we see during takeovers.  Thanks for sharing.  Is the 1.1 version the most current?

Works great on 8.2.   

With 8.3 is gives false errors for the failover-groups.  Says there aren't any local ports on the groups...when there are.

 

Great tool otherwise!!

 

Thanks

JamesH Former NetApp Employee

What about for 7 mode.........

 

Frequent Contributor

For 8.3 try this for the failover section.

 

$FailoverGroupFull = Get-NcNetFailoverGroup | Select Targets,FailoverGroup | Where-Object {$_.FailoverGroup -eq $fpgroup}
ForEach ($FailoverTarget in $FailoverGroupFull.Targets) {
     $FailoverTarget = $FailoverTarget -split ":"
     $FailoverTargetNode = $FailoverTarget[0]
     $FailoverTargetPort = $FailoverTarget[1]
     if (-not $pg.ContainsKey($FailoverTargetNode)) {
          $pg.Add($FailoverTargetNode,@($FailoverTargetPort))
     } else {
          $pg[$FailoverTargetNode] += $FailoverTargetPort
     }
}

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.