Equallogic Storage – VSS Backup – Clearing Orphaned Snapshots via PowerShell


I have been using Veeam Backup & Replication now for a few months with very positive results, however our Equallogic storage does suffer occasionally from orphaned snapshots due to issues with the VSS writer when running multiple jobs that run at the same time.

At the start I had been clearing the “offline” snapshots manually when these issues occurred, as to ensure that the snapshots did not borrow space and ultimately consume the entire available space. Then I thought, why am I doing this? surely a SCOM monitor or automated task could clear these snapshots for me.

The below script requires the Group Management IP address and the name of the Hyper-V (assumed) cluster you have your storage connected to. The script connects to a random host within the cluster and registers the Equallogic PowerShell tools, then imports the tools to the machine running the shell before connecting to the storage and finding / removing all snapshots in an Offline state. It can of course be modified to include credentials or to look for other characteristics but this suits my environment as I tend not to use the snapshot features of the storage with the exception of the backup process:

$GrpAddr = "YOUR MANAGEMENT IP ADDRESS"
$AvailableNodes = Get-ClusterNode -Cluster YOUR CLUSTER NAME | ForEach-Object {Write-Output $($_.Name)}
$HyperVNode = Get-Random $AvailableNodes
$HvHost = New-PSSession -ComputerName $HyperVNode
Invoke-Command -Session $HvHost -ScriptBlock {Import-Module "c:\program files\EqualLogic\bin\EqlPSTools.dll"}
Import-PSSession -Session $HvHost -Module EqlPSTools
Connect-EqlGroup -GroupAddress $GrpAddr -Credential (Get-Credential) -AllowClobber
Get-EqlSnapshot | Where-Object {$_.isOnline -eq $false} | Remove-EqlSnapshot
Remove-PSSession $HvHost

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s