Subscribe
Accepted Solution

Get-NaStorageAdapterInfo issue (v3.2) - No FcPortName Info

While working on pulling FC Initiator Type Adapter ( Not Target Type) Info, I found this comlet might be helpful since I did not find anything I need from

 

-Get-NaFcAdapter  (list Target Adapter only)

-Get-NaFCPAdapter (list Target Adapter only)

-Get-NaStorageAdapter ( List Adapter Names only, with no details of WWNN and WWPN)

-Get-NaHostFCAdapter ( looks like for host not controller ports...)

 

Unless we use sysconfig -v from Data ONTAP, I can not find an easy way to get the WWPN for the FC Initiator Type Adapters ( We used it for backup to Tape)

 

For Get-NaStorageAdapterInfo, it did give Adapter info, including WWNN ( FcNodeName) but not WWPN ( FcPortName ) in my version v3.2, as below, (Note: 6a is the Adapter I know that is Initiator type)

 

PS C:\Scripts\NetApp\GetNStorageAdapterInfo> get-module DataONTAP |select version

Version                                                                                                                                             
-------                                                                                                                                             
3.2.0

 

PS C:\Scripts\NetApp\GetNStorageAdapterInfo> (Get-NaStorageAdapterInfo -Name 6a).AdapterDetailInfo.AdapterFc.AdapterFcInfo|get-member



   TypeName: DataONTAP.Types.StorageAdapter.AdapterFcInfo

Name                    MemberType Definition                                                             
----                    ---------- ----------                                                             
Equals                  Method     bool Equals(System.Object obj)                                         
GetHashCode             Method     int GetHashCode()                                                      
GetType                 Method     type GetType()                                                         
ToString                Method     string ToString()                                                      
Validate                Method     void Validate()                                                        
AdapterBar              Property   DataONTAP.Types.StorageAdapter.AdapterBarInfo[] AdapterBar {get;set;}  
AdapterModel            Property   string AdapterModel {get;set;}                                         
AdapterSffInfo          Property   DataONTAP.Types.StorageAdapter.AdapterSffInfo AdapterSffInfo {get;set;}
AdapterSfpInfo          Property   DataONTAP.Types.StorageAdapter.AdapterSfpInfo AdapterSfpInfo {get;set;}
CacheLineSz             Property   System.Nullable[int] CacheLineSz {get;set;}                            
CacheLineSzSpecified    Property   bool CacheLineSzSpecified {get;set;}                                   
FcLinkRate              Property   System.Nullable[int] FcLinkRate {get;set;}                             
FcNodeName              Property   string FcNodeName {get;set;}                                           
FcPacketSize            Property   System.Nullable[long] FcPacketSize {get;set;}                          
FirmwareRev             Property   string FirmwareRev {get;set;}                                          
HardwareRev             Property   string HardwareRev {get;set;}                                          
HostLoopId              Property   System.Nullable[int] HostLoopId {get;set;}                             
HostLoopIdSpecified     Property   bool HostLoopIdSpecified {get;set;}                                    
HostPortId              Property   string HostPortId {get;set;}                                           
HostPortIdSpecified     Property   bool HostPortIdSpecified {get;set;}                                    
IsEnabled               Property   System.Nullable[bool] IsEnabled {get;set;}                             
IsExtGbic               Property   System.Nullable[bool] IsExtGbic {get;set;}                             
IsInUse                 Property   System.Nullable[bool] IsInUse {get;set;}                               
IsPci64Capable          Property   System.Nullable[bool] IsPci64Capable {get;set;}                        
IsPci64CapableSpecified Property   bool IsPci64CapableSpecified {get;set;}                                
IsRedundant             Property   System.Nullable[bool] IsRedundant {get;set;}                           
IsSramParity            Property   System.Nullable[bool] IsSramParity {get;set;}                          
IsSramParitySpecified   Property   bool IsSramParitySpecified {get;set;}        

 

I came across this article in the community (http://community.netapp.com/t5/Microsoft-Cloud-and-Virtualization-Discussions/Get-NaStorageAdapterInfo-issue/m-p/26667#M1206) and it is abviously available in v3.01 and v3.1, it looks like it gets dropped in v3.2.0, even as we storage administrators know that it might be the most info we need. :-)

 

I also noticed that some of the cmdlets have a switch of -Old (http://community.netapp.com/t5/Microsoft-Cloud-and-Virtualization-Discussions/Issue-with-Get-NADisk-in-PowerShell-Toolkit-3-2/td-p/97803), but it looks like this one does not.

 

So, any one in the community knows

 

1. If it is planned to be fixed/added back? ( I tested the new v4.1 which has DATA ONTAP v3.3.0, it is not there yet)

2. How can I get the WWPN info for the Initiator Type FC Adapter WWPNs through any other possible cmdlets in PSTK?

 

I hate to script in bash using Data ONTAP sysconfig -v to get this piece of info.

 

Thanks,

Timothy

 

Re: Get-NaStorageAdapterInfo issue (v3.2) - No FcPortName Info

Does "Get-NaFcpPortName" return the information you're looking for?

 

Andrew

If this post resolved your issue, please help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

Re: Get-NaStorageAdapterInfo issue (v3.2) - No FcPortName Info

Andrew,

 

I forgot to mention this one, but I tried, it does not, I believe every cmdlet that has "Fcp" in its name means Target Adapter..., maybe some one from NetApp PSTK team can confirm this.

 

Thanks,

Timothy

Re: Get-NaStorageAdapterInfo issue (v3.2) - No FcPortName Info

Curiously the port name is in the API response (at least for my test system which is 8.2p3).  I created a sample code snippet which will display the information:

 

# get only online initiator adaptors
Get-NaFcAdapter | ?{ $_.AdapterType -eq "initiator" -and $_.AdapterStatus -eq "online" } | %{
    # an object to hold the result data
    $data = "" | Select AdapterName,WWNN,WWPN
    $data.AdapterName = $_.AdapterName
# invoke the api $apiResult = Invoke-NaSystemApi "<storage-adapter-get-adapter-info><adapter-name>$($_.AdapterName)</adapter-name></storage-adapter-get-adapter-info>" # put the result data into the object $data.WWNN = $apiResult.results.'adapter-details'.'adapter-detail-info'.'adapter-fc'.'adapter-fc-info'.'fc-node-name' $data.WWNP = $apiResult.results.'adapter-details'.'adapter-detail-info'.'adapter-fc'.'adapter-fc-info'.'fc-port-name' # display back $data }

This api, "storage-adapter-get-adapter-info", is the same one used by Get-NaStorageAdapterInfo...however the objects output by that cmdlet do not have the port name property, as you noted.  On my test system the initiator ports are only used as FC-AL initiators for shelves, so the WWPN and WWNN are the same.  It could be that these values are always the same so there is/was no value in having both and that is the rationale behind removing them.  Or it could be a bug...

 

Could you please test the above with your system(s) and let me know if they are different or the same.  If they are different it may be worth opening a bug to determine if it was an oversight due to an API change between ZAPI versions or something similiar.

 

Hope that helps.

 

Andrew

If this post resolved your issue, please help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

Re: Get-NaStorageAdapterInfo issue (v3.2) - No FcPortName Info

Andrew,

 

Thanks for your help and reply. I think you pointed to the right direction. Here is what I found after a few tests against my systems.

 

  1. It appreas that Data ONTAP 7-Mode does NOT assign different strings to WWNN and WWPN if it is initiator type adapter AND the card is from NetApp ( or , with NetAPP OUI 00A098 more acurately speaking) The version I tested is 8.2.3P5, if the card is not from NetApp, let's see it is from QLogic, which I tested, then the WWPN and WWNNs are not the same, which is normal. The version I tested is 8.1.4P9.

      I think to populate both WWPN and WWPN are more desirable and to assign different value to WWPN and WWNN is more practical.

 

  2. Get-NaFcAdapter will return different output depends on Data ONTAP version, again , at least it is true for the two versions I tested. In 8.1.4P9, it reports ONLY TARGET ports, in 8.2.3P5, it report both and got improved.

 That's the reason why I mentioned on very top saying that Get-NaFCAdapter lists only target ports, actually that is a wrong statement, it is version related.

  3. I did ran the code you provided, and the WWPN did not return under both versions

  4. Any documents that I can reference if I want to use Invoke-SystemAPI in case the cmdlets not work properly like what you are doing? I did download the NetApp Manageability SDK, not sure if the doc with it is the one I should reference.

 

Appreciated your help!

 

Timothy

 

 

 

 

 

 

Re: Get-NaStorageAdapterInfo issue (v3.2) - No FcPortName Info

Regarding #2, the PowerShell Toolkit uses the NMSDK, which is itself based on ZAPI versions.  ZAPI periodically changes and will add/remove vaues, options, and entire APIs, so it's no surprise that different ONTAP versions have different results.

 

For #4 you'll want to use the documentation labeled "NetApp Manageability SDK" from the A-Z documentation page.  Once there you'll see links for docs on the .NET, Java, and generic NMSDK (at the bottom).  The latter is the one you want for ZAPI info.

 

Andrew

If this post resolved your issue, please help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

Re: Get-NaStorageAdapterInfo issue (v3.2) - No FcPortName Info

Andrew,

 

Appreciated your help, I will reference the API as needed trying to get what I need and now closer to get it resolved with your help. And yes, it's normal that the APIs changes from version to version, and that's why we get more and more functions out there.

 

Also, tons of thanks to the PSTK team, which makes our management to our 100+ NetApp systems  (Na, Nc and Ne...) much easier.

 

Timothy