NetApp: Identify Snapshots Not Managed by Policy

The function below can be used to identify snapshots on a NetApp Cluster Mode system that do not have a corresponding snapshot schedule applied to the volume in question. It can be used to find odd snapshots that have been taken ad-hoc, and also to find snapshots that are left orphaned by changing the snapshot policy that has been applied to a volume.

Once the function has been run inside a PowerShell session, it is simple to obtain details of unmanaged snapshots on either a single volume or all volumes in the cluster:

If you are certain of the outcome and just want to clean all of the identified snapshots up then you can pipe the results out and remove all of the snapshots identified:

The script ignores snapmirror destination volumes, and can detect and ignore snapshots used for snapmirrors, load sharing mirrors and snapvault (etc). SMVI, SME and SMS snapshots are ignored as they should be managed by the host system. If you spot a snapshot included that shouldn’t be in the list though, please let me know so that I can update the code.

Be the first to like.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.