Subscribe

How to list All volumes snapshots usage in a Aggregate

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,

Re: How to list All volumes snapshots usage in a Aggregate

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.

Re: How to list All volumes snapshots usage in a Aggregate

[ Edited ]

Thanks!

 

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

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

Re: How to list All volumes snapshots usage in a Aggregate

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

Re: How to list All volumes snapshots usage in a Aggregate

[ Edited ]

Hi

 

How about the "aggr show_space" CLI command?

 

Does that give the info you need?

 

Good Luck!

 

Richard.

Re: How to list All volumes snapshots usage in a Aggregate

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.

Re: How to list All volumes snapshots usage in a Aggregate

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.