Microsoft Virtualization Discussions

Automating Disk and shelf firmware Updating

JGPSHNTAP
5,750 Views

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.

9 REPLIES 9

vinith
5,750 Views

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.

JGPSHNTAP
5,750 Views

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

JGPSHNTAP
5,750 Views

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

JGPSHNTAP
5,750 Views

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..

bsti
5,751 Views

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.

vinith
5,751 Views

Yes i guess we should give the unzip and install a try.

bsti
5,751 Views

Come to think of it, I don't beleive you do that with disk firware either.  You don't use the normal "software install" procedures for those.  I've only used them for ONTAP upgrades, SP updates, and sometimes mobo updates and similar.  Can you point me to the procedure where you use a software update or software instlall command for shelf and disk FW upgrades?  I'm not sure you can do this.

JGPSHNTAP
5,751 Views

B -

We do that all the time.. We do software install all.zip - Then the disks start upgrading in the background.

For shelves, we do software install all_shelf_fw.zip.  on both nodes and then do storage download shelf command on A node. 

You can do it your way as well..  I'm just finding the start-nadiskupdate to not be worth it

JGPSHNTAP
5,750 Views

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.

Public