ONTAP Discussions
ONTAP Discussions
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,
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
Thanks!
Unfortunately, I don't have POWERSHELL tool kit in-paced yet.
Is there a way to do this via CLI or Unified Manager?
Hi
How about the "aggr show_space" CLI command?
Does that give the info you need?
Good Luck!
Richard.
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.
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