Microsoft Virtualization Discussions

Get-NcStorageAdapterInfo for specific node

Medvitz
3,441 Views

 

I'm putting together a script to document SAS cabling for a FAS8040.  I have two nodes in the cluster node-01 and node-02.  I need to get the Adapter BaseWWN for each port on each node, which I can get by the following Powershell command

 

(Get-NcStorageAdapterInfo -Name 0a -Node node-01).AdapterDetailInfo.AdapterSas.AdapterSasInfo

 

My issue comes when I try to get the info for node-02.  No matter what I put in the node parameter (including invalid node names), I get the info from node-01.

 

I've tried connecting to the individual nodes via Connect-NcController with the same results.  When I don't include the node parameter, I only get the node-01 data.

 

Any thoughts or insights would be appreciated.

 

-Medvitz

1 ACCEPTED SOLUTION

asulliva
3,423 Views

Hello Medvitz,

 

This appears to be a bug, I've opened a BURT for it.

 

As a temporary workaround, you can use the "Invoke-NcSystemApi" cmdlet to do a raw query:

 

$result = @()

foreach ($adapter in (Get-NcStorageAdapter)) {
    $adapterInfo = Invoke-NcSystemApi "<storage-adapter-get-adapter-info><node-name>$($adapter.NodeName)</node-name><adapter-name>$($adapter.AdapterName)</adapter-name></storage-adapter-get-adapter-info>"
    
    $o = "" | Select Node,Adapter,Type,WWN
    $o.Node = $adapter.NodeName
    $o.Adapter = $adapter.AdapterName
    $o.Type = $adapterInfo.results.'adapter-details'.'adapter-detail-info'.'adapter-type'

    if ($o.Type -eq "ADT_IF_FC") {
        $o.WWN = $adapterInfo.results.'adapter-details'.'adapter-detail-info'.'adapter-fc'.'adapter-fc-info'.'fc-port-name'
    } elseif ($o.Type -eq "ADT_IF_SAS") {
        $o.WWN = $adapterInfo.results.'adapter-details'.'adapter-detail-info'.'adapter-sas'.'adapter-sas-info'.'base-wwn'
    }

    $result += $o
}

$result

Hope that helps.

 

Andrew

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

View solution in original post

6 REPLIES 6

JGPSHNTAP
3,430 Views

I'm just curious, why you want to document SAS cabling.. this is all done on the Now site under myautosupport?

 

Youre command looks, ok

 

((Get-NcStorageAdapterInfo -Name 0a -Node node1).AdapterDetailInfo.AdapterSas.AdapterSasInfo).basewwn

 

5:00a098:0037224:c9

 

You need to connect to cluster vserver not node

asulliva
3,424 Views

Hello Medvitz,

 

This appears to be a bug, I've opened a BURT for it.

 

As a temporary workaround, you can use the "Invoke-NcSystemApi" cmdlet to do a raw query:

 

$result = @()

foreach ($adapter in (Get-NcStorageAdapter)) {
    $adapterInfo = Invoke-NcSystemApi "<storage-adapter-get-adapter-info><node-name>$($adapter.NodeName)</node-name><adapter-name>$($adapter.AdapterName)</adapter-name></storage-adapter-get-adapter-info>"
    
    $o = "" | Select Node,Adapter,Type,WWN
    $o.Node = $adapter.NodeName
    $o.Adapter = $adapter.AdapterName
    $o.Type = $adapterInfo.results.'adapter-details'.'adapter-detail-info'.'adapter-type'

    if ($o.Type -eq "ADT_IF_FC") {
        $o.WWN = $adapterInfo.results.'adapter-details'.'adapter-detail-info'.'adapter-fc'.'adapter-fc-info'.'fc-port-name'
    } elseif ($o.Type -eq "ADT_IF_SAS") {
        $o.WWN = $adapterInfo.results.'adapter-details'.'adapter-detail-info'.'adapter-sas'.'adapter-sas-info'.'base-wwn'
    }

    $result += $o
}

$result

Hope that helps.

 

Andrew

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

Medvitz
3,374 Views

 

Thank you....  That did the trick

JIATI0111
3,272 Views

Medvitz,

 

Which version of the PowerShell ToolKit you are using when you bit this bug? I noticed it today and I am using Data ONTAP PSTK 3.2 and I am wondering if this is fixed in the new version of v4.1 , which combined with SANtricity PSTK as well.

 

Thanks,

Timothy

asulliva
3,260 Views

Hello,

 

NPTK 4.1 only updated the Santricity cmdlets in the budle, so the ONTAP cmdlets will still have this particular issue.  There is an open bug and it is scheduled to be fixed in a future release.

 

Andrew

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

JIATI0111
3,250 Views

Thanks Andrew!

Public