9 Replies Latest reply: Jan 30, 2013 10:40 AM by JGPSHNTAP RSS

Automating Disk and shelf firmware Updating

JGPSHNTAP Kart Racer
Currently Being Moderated

Hey all -

 

So, I have some questions regarding start-nadiskupdate and start-nashelfupdate.

 

I've written a simple script to copy the firmware files from our http server over to each filer... 

 

####

cls

$file = read-host "enter File list"

$ftype = read-host "enter file you want to copy"

$Hosts = gc $file

 

$Hosts | % {

 

$filer = $_

 

Write-Host "Copying $ftype to filer" $_

 

copy-item -path "\\httpserver\c$\home\http\firmware\$ftype" -destination "\\$filer\etc$\software" -force

 

}

 

###


I've also done it this way as well -

 

##

$warningpreference = "SilentlyContinue"

#### Reset registry key

## Set credentials

$pwd = Read-Host "enter password"

cls

$password = ConvertTo-SecureString $pwd -AsPlainText -Force

$cred = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList "northamerica\jgoldfar",$password

 

$file = read-host "enter File list"

$Hosts = gc $file

 

$Hosts | % {

 

#Write-Host Connecting to controller: $_

$c = connect-nacontroller $_ -https -cred $cred

Write-Host "Copying All.zip to filer" $_

Invoke-NaSsh -command "software get http://httpserver/firmware/all.zip -f"

 

 

}

###

 

I prefer option 1. 

So, let's say we get the firmware files to the software directory.   Now I wanted to play around with get-nadiskupdate and get-nashelfupdate.


I was surprised to know that these cmdlets don't actually do some sort of software install all.zip or all_shelf_fw.zip.   So, when I ran get-nadisk | start-nadiskupdate - I saw in the messages file that all disks are updated.  Obviously, it didn't do a software extract.

 

Am I now forced to go back to connecting via https and issuing the commands via ssh?   I didn't find a powershell cmdlet that will do software install. 

 

Also - as per the man page on start-nadiskupdate - I tried this.

 

PS C:\powershell> start-nadiskupdate

start-nadiskupdate : Value cannot be null.

Parameter name: value

At line:1 char:1

+ start-nadiskupdate

+ ~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : InvalidOperation: (uswsns015a:NaController) [Start-NaDiskUpdate], ArgumentNullException

    + FullyQualifiedErrorId : ApiException,DataONTAP.PowerShell.SDK.Cmdlets.Disk.StartNaDiskUpdate

 

I'm using version 2.1.

 

Thanks all in advance.

  • Re: Automating Disk and shelf firmware Updating
    vinith NetApp Employee Cyclist
    Currently Being Moderated

    Hi Goldyfarbs,

     

    Could you please emulate the scenario by using the PS toolkit v 2.2 ? i guess you are using version 2.1

     

    also Can you try Invoke-NaSsh cmdlet, it sends a Data ONTAP CLI command via SSH.

     

    Invoke-NaSsh -Name <ControllerName> -Credential root "ndmpd status"

    Invoke-NaSsh -Name <ControllerName> -Credential root "ndmp probe"

     

    Here are some more details regarding this cmdlet.

     

    Invoke-NaSsh -Command <String[]> [-Credential <PSCredential>] [-Port <Int32>] [-Timeout <Int32>] [-WhatIf]

    [-Confirm] [<CommonParameters>]

     

     

    PARAMETERS

        -Command <String[]>

            The command string to send to Data ONTAP.  If the command string contains hyphens, enclose the command in

            quotes lest PowerShell attempt to interpret those as cmdlet arguments.

     

        -Credential <PSCredential>

            Use this argument to explicitly provide SSH credentials for authenticating with Data ONTAP.  If credentials

            are provided, they take precedence over any other credentials that may be available.  If not provided, the

            cmdlet will look for valid credentials from either the specified NaController object or

            $global:CurrentNaController as appropriate.  Failing that, credentials will be sought in the Toolkit's

            credential cache.

     

        -Port <Int32>

            The port on which to connect to the storage controller.

     

        -Timeout <Int32>

            Connection timeout in milliseconds.

     

        -WhatIf

     

     

        -Confirm

     

     

        -Name <String>

            The name or address of the controller to connect to.  If a hostname is specified, it must be resolvable to an

            IP address.  Specify either this argument or the -Controller argument, but not both.

     

        -Controller <NaController>

            The controller to connect to, embodied in an NaController object as returned by Connect-NaController.  Specify

            either this argument or the -Name argument, but not both.

    • Re: Automating Disk and shelf firmware Updating
      JGPSHNTAP Kart Racer
      Currently Being Moderated

      Vinith -

       

      I'm very familiar with invoke-nassh.  I try to avoid using that b/c I would rather use the standard cmdlet's from powershell but I didn't find anything that suited software install.   So, in my opinion, start-nadiskupdate is not very useful b/c if you have the proper options on, once you do a software install the disks automagically start to upgrade.

       

      As for shelf firmware upgrade, you would have to initiate a software install all_shelf_fw.zip and then do a storage download shelf from a controller.  I can initiate a invoke-nassh -command "software install all_shelf_fw.zip" and then do start-nashelfupdate.

       

      I am currently using ontap toolkit 2.1 with PS 3.0

       

      I can upgrade to 2.2

      • Re: Automating Disk and shelf firmware Updating
        JGPSHNTAP Kart Racer
        Currently Being Moderated

        Vinith -

         

        v2.2 doesn't have any affect -

         

        PS C:\powershell> start-nadiskupdate

        start-nadiskupdate : Value cannot be null.

        Parameter name: value

        At line:1 char:1

        + start-nadiskupdate

        + ~~~~~~~~~~~~~~~~~~

            + CategoryInfo          : InvalidOperation: (uswsns015a:NaController) [Start-NaDiskUpdate], ArgumentNullException

            + FullyQualifiedErrorId : ApiException,DataONTAP.PowerShell.SDK.Cmdlets.Disk.StartNaDiskUpdate

         

        PS C:\powershell> get-natoolkitversion

         

        Major  Minor  Build  Revision

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

        2      2      0      84

        • Re: Automating Disk and shelf firmware Updating
          JGPSHNTAP Kart Racer
          Currently Being Moderated

          Also - I'm seeing this as well -

           

          PS C:\powershell> invoke-nassh -command "software install all_shelf_fw.zip"

          software: installing software, this could take a few minutes...

          software: installation of all_shelf_fw.zip completed.

          sw_find_kernel: exec_status=1

           

          WARNING: software: installation of all_shelf_fw.zip was not successful.

           

          If I check the messages log, I see the following

           

          Tue Jan 29 10:18:12 EST [filerb:cmds.software.installDone:info]: Software: Installation of all_shelf_fw.zip was completed. 

          Tue Jan 29 10:18:12 EST filerb:cmds.software.installNotDone:info]: Software: Installation of all_shelf_fw.zip failed.

           

          So has it completed or has it not completed.  ??  Wierd..

          • Re: Automating Disk and shelf firmware Updating
            bsti@plex.com Certified Cyclist
            Currently Being Moderated

            Goldyfarbs,

             

              Have you ever been able to install a shelf firmware update using a zip file?  I've never tried it, and don't think it works.  What I've always done, and is per the installation instructions, is to unzip the file first then copy the firmware files (.sfw and .fvf) to the /etc/shelf_fw directory.  Then you can issue the storage download shelf command (or Start-NaShelfUpdate cmdlet).

             

            Perhaps you can edit your PoSH process where you manually unzip the firmware files to a directory first, then perform a copy with PoSH and then issue the update command.

  • Re: Automating Disk and shelf firmware Updating
    JGPSHNTAP Kart Racer
    Currently Being Moderated

    B -

     

    Can you try doing an invoke-nassh -command "software install all_shelf_fw.zip" and see if you're seeing the same results we are seeing.

More Like This

  • Retrieving data ...

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points