NetApp snapmirror lagtime check cdot with PowerShell

# Snapmirror cleanup – update all snapmirrors with lagtime over one week and idle

$mirrors = @()

Get-NcSnapmirror | %{
$sm = “” | Select “Source”,”Destination”,”Status”,”State”,”LagTime”

$sm.Source = $_.SourceLocation
$sm.Destination = $_.DestinationLocation
$sm.Status = $_.Status
$sm.State = $_.MirrorState
$sm.LagTime = $_.LagTime

$mirrors += $sm

}

$mirrors

write-output $mirrors | export-csv snap.csv

# write-output $mirrors | Format-table -AutoSize

# write-Output $mirrors | where- {$sm.LagTime -gt 604800 -and $sm.Status -eq “idle”} | Format-Table -AutoSize

NetApp update shelf firmware cdot

From the CDOT CLI:

Change to the advanced privilege level:

set -priv adv

To download the firmware:

system firmware download -package http://web_server/all_shelf_fw.zip -nodenodename

To manually update the disk shelf firmware without rebooting:

system node run -node nodename -command storage download shelf

To manually update the ACPP firmware without rebooting:

system node run -node nodename -command storage download acp

~ from cosonoks’s blog

Delete volumes, relationships, snapshots, snapvaults, snapmirrors in NetApp cDot

anystor300::*> volume delete -vserver anyvsrv001_esxh -volume T2C0_vol1320_someipms325_Export -disable-offline-check true

Error: command failed: Volume “T2C0_vol1320_someipms325_Export” in Vserver “anyvsrv001_esxh” is the source endpoint of one or more SnapMirror relationships. Before you
delete the volume, you must release the source information of the SnapMirror relationships using “snapmirror release”. To display the destinations to be used in the
“snapmirror release” commands, use the “snapmirror list-destinations -source-vserver anyvsrv001_esxh -source-volume T2C0_vol1320_someipms325_Export” command.

anystor300::*> snapmirror list-destinations -source-vserver anyvsrv001_esxh -source-volume T2C0_vol1320_someipms325_Export
Progress
Source             Destination         Transfer   Last         Relationship
Path         Type  Path         Status Progress   Updated      Id
———– —– ———— ——- ——— ———— —————
anyvsrv001_esxh:T2C0_vol1320_someipms325_Export
DP    somevsrv001_esxh:T2C0_lun1026_someipms325_Export_vol
Idle    –         –            2a3a0416-40f0-11e5-9b65-123478563412

anystor300::*> snapmirror release -source-vserver anyvsrv001_esxh -source-volume T2C0_vol1320_someipms325_Export *
[Job 39418] Job succeeded: SnapMirror Release Succeeded
1 entry was acted on.

anystor300::*> volume delete -vserver anyvsrv001_esxh -volume T2C0_vol1320_someipms325_Export -disable-offline-check true

Warning: Are you sure you want to delete volume “T2C0_vol1320_someipms325_Export” in Vserver “anyvsrv001_esxh” ? {y|n}: y
[Job 39419] Job succeeded: Successful