Subscribe

wafliron status through PowerShell Toolkit

Hi All,

 

Currently wafliron is running for 45T of aggregate and am not getting console connection to check wafliron status. But filer is responding for powershell commands. How to check wafl scan status through powershell utility? Is there any other way to check wafliron status? I dont have rsh configured on this filer.

 

Ram

Re: wafliron status through PowerShell Toolkit

Hi,

 

Have you considered using the "Invoke-NaSsh" PowerShell CmdLet? (Assuming you are on 7-Mode). See the CLI reference to check the status here:

 

https://kb.netapp.com/support/index?page=content&id=3011877

 

So in theory you could try something like (modify the ControllerName and username variables to your environment):

 

[String]$ControllerName = "testns01"
[String]$Username       = "root"
[System.Security.SecureString]$password = Read-Host "Please enter the password for user ""$userName"" to connect to ""$controllerName""" -AsSecureString
$credentials = New-Object System.Management.Automation.PSCredential -ArgumentList $username, $password
Import-Module DataONTAP
#'------------------------------------------------------------------------------
#'Connect to the cluster
#'------------------------------------------------------------------------------
Try{
   Connect-NaController -Name $controllerName -Credential $credentials -HTTPS -ErrorAction Stop | Out-Null
   Write-Host "Connected to Controller ""$controllerName"" as ""$username"""
}Catch{
   $errorMessage = $error[0].Exception.Message
   Write-Warning "Failed connecting to Controller ""$controllerName"". $errorMessage"
   Break;
}
#'------------------------------------------------------------------------------
#'Check the WAFL Iron status
#'------------------------------------------------------------------------------
[String]$command = "priv set advanced;aggr wafliron status -s"
Try{
   $results = Invoke-NaSsh -Command $command -ErrorAction Stop
   Write-Host "Executed Command: $command"
}Catch{
   $errorMessage = $error[0].Exception.Message
}
$results
Write-Host "Done!"

 

I wasn't able to view the actual results because i don't have any systems performing a WAFL iron to test it on...but i did get the results i expected:

 

PS C:\Scripts\PowerShell\Projects\WaflIronStatus> .\WaflIronStatus.ps1
Please enter the password for user "root" to connect to "testns01": **************
Connected to Controller "testns01" as "root"
WARNING: Warning: These advanced commands are potentially dangerous; use
         them only when directed to do so by NetApp
         personnel.
aggr wafliron status aggr2: wafliron is not currently active.
aggr wafliron status aggr1: wafliron is not currently active.
aggr wafliron status aggr0: wafliron is not currently active.
Executed Command: priv set advanced;aggr wafliron status -s
aggr wafliron status: no waflirons in progress

Done!

 

Hope that helps

 

/matt

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