Subscribe

SnapShot Space Usage

[ Edited ]

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

Re: SnapShot Space Usage

This can be easily done in powershell

Re: SnapShot Space Usage

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.