Hey Guys,
Have a powershell question, if you could help me?
I have a volume and clone volume in the same svm. the svm is in a snapmirror relationship every 15 minutes. At some point after a month or two I remove the clone, create a new one and want to get rid of the unneeded data = remove old snapshot.
situation before:
> Connect-NcController –name filer1 -Vserver svmtest
> get-ncvol | foreach-object {$ParentName=$_.Name;get-ncsnapshot $_.Name clone*}
Name Volume Vserver Created Total Cumulative Dependency
---- ------ ------- ------- ----- ---------- ----------
clone_volftest.0 volftest svmtest 3/27/2017 800.0 KB 888.0 KB
clone_volftest.1 voltest svmtest 3/27/2017 456.0 KB 1.4 MB snapmirror
clone_volftest.0 voltest svmtest 3/27/2017 84.0 KB 180.0 KB busy,vclone
I'm running this cmdlet to get rid of the obsolete snapshots:
get-ncvol | foreach-object {$ParentName=$_.Name;get-ncsnapshot $_.Name clone*} | where-object {$_.Dependency -eq $null} | remove-ncsnapshot -Confirm:0 -ErrorAction SilentlyContinue
situation after:
Name Volume Vserver Created Total Cumulative Dependency
---- ------ ------- ------- ----- ---------- ----------
clone_volftest.0 voltest svmtest 3/27/2017 84.0 KB 280.0 KB busy,vclone
Can anyone tell me why it's removing the snapshot that still has Dependency "snapmirror" in it? Dependency is not empty in this case, why is he removing that one too?
Problem is that this one is breaking my mirror and completely replicates my clone volumes which turns out to fill up my space in the DR.
Thanks,
axsys