Community maintenance is complete. Thank you for your patience!

ONTAP Discussions

SnapShot Space Usage

1VINAYKUMAR

Hi Guys,

 

I need to find out the space usage of snapshots on all volumes in 7 mode and cluster mode. Please suggeset if there is any way if we can monitor the space usage of snapshots on all volumes and generate reports weekly basis.

 

regards

VK

2 REPLIES 2

asulliva

To view total snapshot space used for each volume, you can use a short PowerShell script:

 

Get-NcVol | ?{ 
    $_.VolumeStateAttributes.IsNodeRoot -eq $false 
} | %{ 
    $_ | Get-NcSnapshot | Sort-Object -Property Created | Select-Object -First 1 
}

To sum the size of all snapshots, just add the CumulativeTotal property together:

 

$total = 0

Get-NcVol | ?{ 
    $_.VolumeStateAttributes.IsNodeRoot -eq $false 
} | %{ 
    $oldest_snap = $_ | Get-NcSnapshot | Sort-Object -Property Created | Select-Object -First 1 
    $total += $oldest_snap.CumulativeTotal

    $oldest_snap
}

Write-Output "Total size of all snapshots = $([Math]::Round($total / 1GB, 2)) GB"

Andrew

If this post resolved your issue, please help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

JGPSHNTAP

This can be easily done in powershell

Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner
Public