ONTAP Discussions

How to list All volumes snapshots usage in a Aggregate

heightsnj

I need to list how much space has been taken by volumes Snapshots in an Aggregate. Is there any way to do that either via CLI, or GUIs?

 

Thanks,

6 REPLIES 6

rh

Hi

 

How about the "aggr show_space" CLI command?

 

Does that give the info you need?

 

Good Luck!

 

Richard.

heightsnj

aggr show-space only shows snapshots on aggr level which is not what I want.

 

I want to have a summary report on the amount of the space taken by snapshots for each volume in aggr basis.

asulliva

The total snapshot space used by a volume is reported in the volume object, we just need to display it in a friendly format...

 

Get-NcVol | Select-Object Aggregate,Name,
    @{
        'Name' = "SizeUsedBySnapshots"; 
        'Expression' = { 
            $_.VolumeSpaceAttributes.SizeUsedBySnapshots | ConvertTo-FormattedNumber -Type DataSize 
        }
    } | Sort-Object -Property Aggregate,Name

Hope that helps.

 

Andrew

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

heightsnj
Hi Asullivs,

I have a lot of snapshots for each volume, and wanted to sum them up together. Is you script include or snapshots for each volume or just add one of them up?

Can you please also provide the list of total amount of snapshots for each volume in aggregates basis?

Thanks a lot

asulliva

Not sure about GUI or CLI, but you can use the PowerShell Toolkit to get this done pretty quick...

 

$result = @()

foreach ($aggregate in Get-NcAggr) {
    $data = "" | Select Aggregate,VolSnapSpaceGB
    $data.Aggregate = $aggregate.Name
    $data.VolSnapSpaceGB = 0

    foreach ($volume in (Get-NcVol -Aggregate $aggregate)) {
# get the cumulative total for the oldest snapshot $snapSpace = (Get-NcSnapshot -Volume $volume | Sort-Object -Property Created | Select-Object -First 1).CumulativeTotal $data.VolSnapSpaceGB += [Math]::Round($snapSpace / 1gb, 2) } $result += $data } $result

Andrew

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

heightsnj

Thanks!

 

Unfortunately, I don't have POWERSHELL tool kit in-paced yet. 

Is there a way to do this via CLI or Unified Manager?

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