I am having an issue in many production scripts that are taking advantage of the 'Connect-NcController -Transient:$true' functionality to not set the global variable when connecting to a controller, and instead assign that connection to my own custom variable. It all works fine, except the first time I try to do ANYTHING with that connection it will fail with a generic error coming from the module commandlets. The same action will work fine the second and every other time after that first failure. Get-NcAggr : Object reference not set to an instance of an object.
At line:35 char:27
+ $ncAggr = Get-NcAggr -Controller $ncController
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-NcAggr], NullReferenceException
+ FullyQualifiedErrorId : System.NullReferenceException,DataONTAP.C.PowerShell.SDK.Cmdlets.Aggr.GetNcAggr Here is a simple script to reproduce the issue: # Set this to $true to use the $global:CurrentNcController in the Get-NcAggr command
# Set to $false to use the controller stored in a variable as an object $ncController
$useNcGlobal = $false
# update to your actual controller
$controllerIP = "xxx.xxx.xxx.xxx"
Import-Module NetApp.ONTAP
$global:CurrentNcController = $null
try {
$ncCredential = Get-Credential -Message "Add Admin password" -UserName admin
if ( -not ($useNcGlobal) ) {
# Store controller in variable and use transient to NOT set the global
$ncController = Connect-NcController -Name $controllerIP -Credential $ncCredential -Transient:$true -ErrorAction Stop
Write-Host "Controller varaible '`$ncController' type is '$($nccontroller.GetType())'"
}
else {
# Store controller in the global
Connect-NcController -Name $controllerIP -Credential $ncCredential -ErrorAction Stop
Write-Host "Controller varaible '`$global:CurrentNcController' type is '$($global:CurrentNcController.GetType())'"
}
[int]$i = 0
$ints = 1..10
foreach ($int in $ints) {
try {
$i++
if ( $nccontroller ) {
$ncAggr = Get-NcAggr -Controller $ncController
}
else {
$ncAggr = Get-NcAggr
}
Write-Host "This time, '$i' and subsequent times will always succeed"
if ( $int -eq $($ints | Select-Object -Last 1) ) {
$ncAggr
}
}
catch {
$error[0]
Write-Host "This time, '$i' always fails when using -controller and passing in a controller variable object"
}
}
}
catch {
$error[0]
Write-Host "Uncaught error"
}
... View more
Apologies if I get the terminology all wrong. I've got two netapp filers configured as a cluster. It's ancient hardware, I migrated most of the servers hosted on there in Azure so we didn't bother renewing the support contract. One of the disks died a while ago but we had a spare which kicked in. And it ran without redundancy. As luck would have it, just before the migration project was finished another disk died and that bought down everything. I'm assuming the disk dying bought it down, and that no other hardware has failed. I would have thought the 2nd cluster would have taken over but it didn't. The status on the node says; The takeover cannot be initiated because the storage failover is disabled. I'm guessing that because the disk died in the 1st node, that bought it down. So I thought if I replaced the disk then assigned it to the downed node it would come into life. However, I can only assign the unsigned disk to the node it can see. I can't get to node 1 at all So, I think my only option is to try and force the failover mode to the 2nd node in the cluster. FASCLUS1::> cf status Takeover Node Partner Possible State Description -------------- -------------- -------- ------------------------------------- FASCLUS1-01 ARBFASCLUS1-02 - Unknown FASCLUS1-02 ARBFASCLUS1-01 false Waiting for FASCLUS1-01, Takeover is not possible: Partner node halted after disabling takeover I think my only option would be to run cf forcetakeover from 02 node. Is this a good idea? Anything else I can try?
... View more
We recently placed in production a FAS 8300 (9.14.1P6). Our OCUM version 7.2P1 looks like its still working but we just a built a new server (new IP address) with the latest ActiveIQ Unified Manager 9.14. Prior to connecting to the new NAS, all we have to do is just shutdown the own OCUM? Note: We had a FAS2650, the migrator removed it out of the cluster after the migration was completed. This is where the old OCUM was used. Thanks, SVHO
... View more
My current Ontap version is 9.1P5.
I want to upgrade it to be ontap 9.5P2.
According to upgrade advisor, I need to upgrade it to be 9.3 first.
Therefore, on the same night, I will upgrade ontap from 9.1P5 to 9.3P12 and then 9.5P2.
As I know that, after i upgrade it to 9.3P12, there are several firmware will be update automatically if the version in your cluster is older than the firmware that is bundled with the ONTAP upgrade package.
They are BIOS, Flash Cache, SP, Disk, and Disk shelf.
My question here is
Do I need to wait for all those firmware upgrade completed and then upgrade it from 9.3P12 to 9.5P2 or I can continue to upgrade it to 9.5P2 after veified the version - 9.3P12 and HA status, aggregate, and lifs are home port?
9.3P12 release on 5/27/2019
9.5P2 release on 3/24/2019 which is earlier then 9.3P12.
Does it matter for my upgrade ?
... View more