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



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 Clustermode force delete a reference snapshot


For Reference: To Force Delete the SnapMirror Snapshot

na81::> set diag

na81::*> snapshot delete -vserver vs1 -volume testshare -snapshot snapmirror.15991611-422d-11e3-8578-123478563412_9_2147484694.2013-11-30_142009 -ignore-owners true

Warning: This Snapshot copy is currently used as a reference Snapshot copy by one or more SnapMirror relationships. Deleting the Snapshot copy can cause future SnapMirror operations to fail. Are you sure you want to delete ‘snapmirror.15991611-422d-11e3-8578-123478563412_9_2147484694.2013-11-30_142009’ for volume ‘testshare’ in Vserver ‘vs1’? YES