Graham Ashmore
1 Copper

Setting multiple snapshots offline via powershell

Jump to solution

We have an issue where the snapshots created by DPM on multiple volumes are not being deleted, I need to delete over 150 snapshots from a volume but need to set them offline first, obviously I can do this via the gui but it would take ages!!


I have found the requred PowerShell commands to set a single snapshot offline but the Set-EqlSnapshot command doesnt accept wildcards and im not a powershell expert, I have looked around the net but cant seem to find an example, I presume I would need to use the 'Get-EqlSnapshot -volumename' command to pipe the returned name of all of the snapshots for that particular volume into the Set-EqlSnapshot command to set them all offline, or something similar?

If anyone could help I would be very grateful, or if there is another way of doing it?

Cheers

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Graham Ashmore
1 Copper

RE: Setting multiple snapshots offline via powershell

Jump to solution

Thanks for the info, A colleague and myself actually worked out the powershell commands to set all the snapshots to offline and then we could mass delete, details below:

Get-EqlSnapshot –VolumeName yourvolumename | Set-EqlSnapshot -OnlineStatus offline

Then:

Remove-EqlSnapshot -VolumeName yourvolumename

(this will remove ALL snapshots for given volume!!!)

Use at your own risk!

Regards.

0 Kudos
6 Replies

RE: Setting multiple snapshots offline via powershell

Jump to solution

Sounds like you are using HIT/ME with EQL FW v7.0?  There's a fix in HTI/ME v4.7 that will allow DPM to delete the online snapshot.   The delete snapshot behaviour changed in 7.0.  It won't get rid of the existing ones.

AFAIK there's no global snapshot delete option at the CLI/PowerShell.   The script would have to get the list of available snapshots and walk through the list one at a time.

Social Media and Community Professional
#IWork4Dell
Get Support on Twitter - @dellcarespro

Graham Ashmore
1 Copper

RE: Setting multiple snapshots offline via powershell

Jump to solution

Hey Don,

Thanks for your response, yes we are using firmware version 7.01 with the HIT 4.7 EPA - these snapshots are from an earlier firmware version - I understand there are issues (or by design?) with delete snapshot behaviour.

Im hoping that someone who loves PowerShell can come to my aid! Im amazed that you cant multiple select throguh the GUI to be honest, Im new to using Dell products, so are unfamiliar with the correct way of doing things.

Maybe I should escalate it as a support call to Dell perhaps?

0 Kudos

RE: Setting multiple snapshots offline via powershell

Jump to solution

Re: Behaviour.  The change came from customer requests.  Some customers either by accident or without understanding the consequences ran live volumes using a snapshot.   When you have a snapshot schedule trimming on max keep, it would also delete that live snapshot.  With potentially catastrophic consequences.   So it was changed to online offline snapshots would be trimmed.

Prior to HIT/ME v4.7 the VSS HW provider for EQL didn't take that into account.

Social Media and Community Professional
#IWork4Dell
Get Support on Twitter - @dellcarespro

0 Kudos
Highlighted
Graham Ashmore
1 Copper

RE: Setting multiple snapshots offline via powershell

Jump to solution

Thanks for the info, A colleague and myself actually worked out the powershell commands to set all the snapshots to offline and then we could mass delete, details below:

Get-EqlSnapshot –VolumeName yourvolumename | Set-EqlSnapshot -OnlineStatus offline

Then:

Remove-EqlSnapshot -VolumeName yourvolumename

(this will remove ALL snapshots for given volume!!!)

Use at your own risk!

Regards.

0 Kudos

RE: Setting multiple snapshots offline via powershell

Jump to solution

Nice!  I'm not a PowerShell guy,  I use EQL CLI, and sometimes use Python.

Thank you for posting this.

Social Media and Community Professional
#IWork4Dell
Get Support on Twitter - @dellcarespro

0 Kudos
Sean459084
1 Copper

RE: Setting multiple snapshots offline via powershell

Jump to solution

To set ALL snapshots offline:

Get-EqlVolume | Get-EqlSnapshot | Set-EqlSnapshot -OnlineStatus offline

0 Kudos