Microsoft Virtualization Discussions

Shelf Firmware Output

billyd
4,698 Views

Looks like there may be an error with the get-nashelf command.  The output looks good for the older shelf technology since the firmware versions are only 2 digits in length.  For the IOM3/6, the firmware is 4 digits in length.  Is this a known issue?  Am I using the command incorrectly?  Output of command below.

PS C:\scripts> get-nashelf | select name,FirmwareRevA,FirmwareRevB

Name                                                                 FirmwareRevA                                                        FirmwareRevB                                                      

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

0a.shelf10                                                           01                                                                  62                                                                

0a.shelf11                                                           01                                                                  62                                                                

0b.shelf10                                                           01                                                                  62                                                                

0b.shelf11                                                           01                                                                  62                                                                

3a.shelf0                                                            01                                                                  72                                                                

3a.shelf1                                                            01                                                                  72                                                                

3d.shelf0                                                            01                                                                  72                                                                

3d.shelf1                                                            01                                                                  72                                                                

5a.shelf1                                                            20                                                                  20                                                                

5a.shelf2                                                            20                                                                  20                                                                

5a.shelf3                                                            20                                                                  20                                                                

5a.shelf4                                                            20                                                                  20                                                                

5d.shelf1                                                            20                                                                  20                                                                

5d.shelf2                                                            20                                                                  20                                                                

5d.shelf3                                                            20                                                                  20                                                                

5d.shelf4                                                            20                                                                  20                                                                

6b.shelf1                                                            20                                                                  20                                                                

6b.shelf2                                                            20                                                                  20                                                                

6b.shelf3                                                            20                                                                  20                                                                

6b.shelf4                                                            20                                                                  20                                                                

6b.shelf5                                                            14                                                                  14                                                                

6c.shelf1                                                            20                                                                  20                                                                

6c.shelf2                                                            20                                                                  20                                                                

6c.shelf3                                                            20                                                                  20                                                                

6c.shelf4                                                            20                                                                  20                                                                

6c.shelf5                                                            14                                                                  14                                                                

S C:\scripts> invoke-nassh "sysconfig -a" | findstr Firmware

        Firmware Version:   1.3P1

        Firmware rev:       01.11.00.00

        Shelf  10: IOM6  Firmware rev. IOM6 A: 0162 IOM6 B: 0162

        Shelf  11: IOM6  Firmware rev. IOM6 A: 0162 IOM6 B: 0162

        Firmware rev:       01.11.00.00

        Shelf  10: IOM6  Firmware rev. IOM6 A: 0162 IOM6 B: 0162

        Shelf  11: IOM6  Firmware rev. IOM6 A: 0162 IOM6 B: 0162

                Firmware rev:     5.5.2

                Firmware rev:     5.5.2

        Firmware rev:       01.11.00.00

        Shelf   0: IOM3  Firmware rev. IOM3 A: 0172 IOM3 B: 0172

        Shelf   1: IOM3  Firmware rev. IOM3 A: 0172 IOM3 B: 0172

        Firmware rev:       01.11.00.00

        Firmware rev:       01.11.00.00

        Firmware rev:       01.11.00.00

        Shelf   0: IOM3  Firmware rev. IOM3 A: 0172 IOM3 B: 0172

        Shelf   1: IOM3  Firmware rev. IOM3 A: 0172 IOM3 B: 0172

        Firmware rev:      5.4.100

        Shelf 1: AT-FCX  Firmware rev. AT-FCX A: 38  AT-FCX B: 38

        Firmware rev:      5.4.100

        Shelf 1: AT-FCX  Firmware rev. AT-FCX A: 38  AT-FCX B: 38

        Shelf 2: AT-FCX  Firmware rev. AT-FCX A: 38  AT-FCX B: 38

        Shelf 3: AT-FCX  Firmware rev. AT-FCX A: 38  AT-FCX B: 38

5 REPLIES 5

JGPSHNTAP
4,698 Views

it looks fine.. Your IOM's are showing up as 0172,

as firmware revision A and B

JGPSHNTAP
4,698 Views

I wrote this a while back.. This collects shelf firmware

Let me know if it still runs.. I haven't run it in sometime

<#
.SYNOPSIS
  Collects Shelf Firmware on filers
.DESCRIPTION
  Collects Shelf firmware
.EXAMPLE
  .\Shelf_firmware.ps1
.Notes
  .Author
   Josh Goldfarb
#>


Function main_block {
## Clear screen
cls

## Starting Main
# Importing input file

$hosts = import-csv -path $inputfile

$array = @()

$hosts |  % {
$filer = $_.filer

#$customobject = New-Object psobject
#Add-Member -inputobject $customobject -membertype Noteproperty -name Filer -value $filer

Write-Host "`nConnecting to filer:" $Filer
Try {
$c = connect-nacontroller $filer -erroraction "silentlycontinue"
} catch {
[system.exception] | Out-Null

    }
# Check if connecting to filer


if ($c -ne $null) 
{
###
write-host "`n`t`t`tChecking Shelf Firmware on Filer:" $filer
## Gather Shelf information
$Shelf = Get-NaShelf | ? {$_.type -like "*IOM*"}
## Check for $Null Object
If ($Shelf -ne $Null) {
# Create custom object
## Loop through shelves
         foreach ($s in $Shelf) {
            $customobject = New-Object psobject
         Add-Member -inputobject $customobject -membertype Noteproperty -name Filer -value $filer
   Add-Member -inputobject $customobject -membertype Noteproperty -name "Connected to filer" -value "Yes"
   Add-Member -inputobject $customobject -membertype Noteproperty -name "Shelves Present" -value "Yes" 
   Add-Member -inputobject $customobject -membertype Noteproperty -name Name -value $S.name
   Add-Member -inputobject $customobject -membertype Noteproperty -name Status -value $S.status
   Add-Member -inputobject $customobject -membertype Noteproperty -name "type" -value $S.type
   Add-Member -inputobject $customobject -membertype Noteproperty -name FirmwareA -value $S.FirmwareRevA
   Add-Member -inputobject $customobject -membertype Noteproperty -name Firmwareb -value $S.FirmwareRevb
   $array += $customobject
   }
   } Else {
   Write-Host "`n`t`t`tFiler:" $filer  "Does not have any IOM3 or IOM6 Shelves"
   $customobject = New-Object psobject
   Add-Member -inputobject $customobject -membertype Noteproperty -name Filer -value $filer
   Add-Member -inputobject $customobject -membertype Noteproperty -name "Connected to filer" -value "Yes"
   Add-Member -inputobject $customobject -membertype Noteproperty -name "Shelves Present" -value "NO"
   Add-Member -inputobject $customobject -membertype Noteproperty -name Name -value ""
   Add-Member -inputobject $customobject -membertype Noteproperty -name Status -value ""
   Add-Member -inputobject $customobject -membertype Noteproperty -name "type" -value ""
   Add-Member -inputobject $customobject -membertype Noteproperty -name FirmwareA -value ""
   Add-Member -inputobject $customobject -membertype Noteproperty -name Firmwareb -value ""
   $array += $customobject
   }

   } else  {

    Write-Host "`n`t`t`tCould not connect to filer:" $filer
    $customobject = New-Object psobject
Add-Member -inputobject $customobject -membertype Noteproperty -name Filer -value $filer
    Add-Member -inputobject $customobject -membertype Noteproperty -name "Connected to filer" -value "No"
Add-Member -inputobject $customobject -membertype Noteproperty -name "Shelves Present" -value "NO"
   Add-Member -inputobject $customobject -membertype Noteproperty -name Name -value ""
   Add-Member -inputobject $customobject -membertype Noteproperty -name Status -value ""
   Add-Member -inputobject $customobject -membertype Noteproperty -name "type" -value ""
   Add-Member -inputobject $customobject -membertype Noteproperty -name FirmwareA -value ""
   Add-Member -inputobject $customobject -membertype Noteproperty -name Firmwareb -value ""
    $array += $customobject
}
   #$array += $customobject

Clear-Variable c
clear-variable filer

}
  $2day = (get-date).tostring("MM-dd-yyyy-hh_mm")
$array | Export-Csv c:\temp\shelfinformation_$2day.csv -NoTypeInformation
$array | ft -autosize

### Close Main Function
}

cls
$Host.UI.RAWUI.WindowTitle="Shelf Firmware Checker"

If (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator"))
{
cls
Write-Warning -Message "`nYou are attempting to execute this script in an non-elevated shell.
This script requires to be run under Administrator priviledge.
Please Re-launch Powershell as Administrator."
"`n"
"`n"
Timeout /t -1
cls
Exit
}
write-host "`n"
$inputfile = read-host "Please enter an input file of a list of Filers you want to check Shelf Firmware on (i.e. c:\temp\filers.csv)"

$fileloctest = test-path $inputfile

If ($fileloctest -eq $false) {
cls
Write-Warning -Message "`nLocation of the file cannot be found.
Please check the path of the file and re-execute.
Exiting Script."
"`n"
"`n"
Timeout /t -1
Exit
}

## Clear screen
cls

$title = "Shelf Firmware Checker"
$message = @"
`nBefore the script executes we want to ensure that you have entered the proper information:
`n
`t`t`t`t`t`t`tThe input file you entered is: $inputfile
`t`t`t`t`t`t`tInput File's path has been confirmed: $fileloctest
`n
`t`t`t`t`t`t`tIf these are both correct, please (P)roceed  If this is not correct, please (e)xit
"@
  

$proceed= New-Object System.Management.Automation.Host.ChoiceDescription "&Proceed", `
    "(P)roceed with Shelf Firmware Check"

$exit =   New-Object System.Management.Automation.Host.ChoiceDescription "&exit",
"Type exit or (E) to exit the script"

$options = [System.Management.Automation.Host.ChoiceDescription[]]($proceed,$exit)

$result = $host.ui.PromptForChoice($title, $message, $options, 1)

switch ($result)
    {
        0 {
   #             main_block
      }
       
          

        1
        ## Exiting Script
        {
       
        Write-Host "`nYou have selected Exit`n"
        timeout /t -1
  cls
        Exit 
          }
    }
   

billyd
4,698 Views

Hey Josh,


Thanks for responding.  I gave your script a shot and it was failing. I think it's due to not having credentials in the connect-nacontroller line.  I may have not created the CSV properly.

The main concern is the Firmware A showing 01 and Firmware B showing 62.  It's not a huge issue (I can combine the two), it just doesn't seem that the get-nashelf command works properly with the new IOM shelves.

Name                                                                 FirmwareRevA                                                        FirmwareRevB                                                      

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

0a.shelf10                                                           01                                                                  62                 

Thanks again.

JGPSHNTAP
4,698 Views

Ok, if you need credentials to connect to your controller, I can give you that snippit of code...  Also, my controller input is in .csv.. Look at the import.csv and the title is controllers. 

The firmware is 100% showing fine for IOM Modules.  YOu need both A and B...

wmorlett
4,491 Views

Get-NaShelf does not return output for AT/AT-FCX loops, output is only returned for ESH4/ESH2 loops.  Is this a bug?  I'm running Data ONTAP PowerShell Toolkit 3.2.   ONTAP 7-Mode 7.3.3P5

 

PS C:\Windows\SysWOW64> get-nashelf

Name                 Status          Channel    ID  Bays Type
----                 ------          -------    --  ---- ----
1a.shelf1            online             1a      1    14  ESH4
1a.shelf2            online             1a      2    14  ESH4
1a.shelf3            online             1a      3    14  ESH4
1b.shelf1            online             1b      1    14  ESH4
1b.shelf2            online             1b      2    14  ESH4
1b.shelf3            online             1b      3    14  ESH4
1b.shelf4            online             1b      4    14  ESH4
2a.shelf1            online             2a      1    14  ESH4
2a.shelf2            online             2a      2    14  ESH4
2a.shelf3            online             2a      3    14  ESH4
2b.shelf1            online             2b      1    14  ESH4
2b.shelf2            online             2b      2    14  ESH4
2b.shelf3            online             2b      3    14  ESH4
2b.shelf4            online             2b      4    14  ESH4

 

controller> sysconfig

slot 1: FC Host Adapter 1a
                42 Disks:            11424.0GB
                3 shelves with ESH4
        slot 1: FC Host Adapter 1b
                56 Disks:            17276.0GB
                4 shelves with ESH4
        slot 1: FC Host Adapter 1c
                84 Disks:            71194.6GB
                6 shelves with AT-FCX
        slot 1: FC Host Adapter 1d
                84 Disks:            71194.6GB
                6 shelves with AT-FCX
        slot 2: FC Host Adapter 2a
                42 Disks:            11424.0GB
                3 shelves with ESH4
        slot 2: FC Host Adapter 2b
                56 Disks:            17276.0GB
                4 shelves with ESH4
        slot 2: FC Host Adapter 2c
                14 Disks:            11865.7GB
                1 shelf with AT-FCX
        slot 2: FC Host Adapter 2d
                42 Disks:            35597.3GB
                3 shelves with AT-FCX
        slot 3: FC Host Adapter 3a
                14 Disks:            11865.7GB
                1 shelf with AT-FCX
        slot 3: FC Host Adapter 3b
                42 Disks:            35597.3GB
                3 shelves with AT-FCX
        slot 3: FC Host Adapter 3c
                84 Disks:            71194.6GB
                6 shelves with AT-FCX
        slot 3: FC Host Adapter 3d
                84 Disks:            71194.6GB
                6 shelves with AT-FCX

Public