ONTAP Discussions

powershell AggrSpaceAttributes.UsedIncludingSnapshotReserve

Hi  ,

I'm struggling with powershell. I want to know the space used including snapshot reserve on an aggregate.

By default field is empty, i have tried using a template but without success.

 

 


$aggrTemplate = Get-NcAggr -Template
Initialize-NcObjectProperty -Object $aggrTemplate -Name AggrSpaceAttributes
$aggrTemplate.AggrSpaceAttributes.UsedIncludingSnapshotReserveSpecified=$true

$aggrTemplate.Name= "aggregate_name"
$aggrTemplate.AggrSpaceAttributes

AggregateMetadata                        : 
CapacityTierUsed                         : 
DataCoalescedCount                       : 
DataCoalescingSpaceSaved                 : 
DataCoalescingSpaceSavedPercent          : 
DataCompactedCount                       : 
DataCompactionSpaceSaved                 : 
DataCompactionSpaceSavedPercent          : 
HybridCacheSizeTotal                     : 
NcController                             : 
PercentUsedCapacity                      : 
PhysicalUsed                             : 
PhysicalUsedPercent                      : 
SisSharedCount                           : 
SisSpaceSaved                            : 
SisSpaceSavedPercent                     : 
SizeAvailable                            : 
SizeTotal                                : 
SizeUsed                                 : 
TotalReservedSpace                       : 
UsedIncludingSnapshotReserve             : 
VolumeFootprints                         : 
AggregateMetadataSpecified               : False
CapacityTierUsedSpecified                : False
DataCoalescedCountSpecified              : False
DataCoalescingSpaceSavedPercentSpecified : False
DataCoalescingSpaceSavedSpecified        : False
DataCompactedCountSpecified              : False
DataCompactionSpaceSavedPercentSpecified : False
DataCompactionSpaceSavedSpecified        : False
HybridCacheSizeTotalSpecified            : False
PercentUsedCapacitySpecified             : False
PhysicalUsedPercentSpecified             : False
PhysicalUsedSpecified                    : False
SisSharedCountSpecified                  : False
SisSpaceSavedPercentSpecified            : False
SisSpaceSavedSpecified                   : False
SizeAvailableSpecified                   : False
SizeTotalSpecified                       : False
SizeUsedSpecified                        : False
TotalReservedSpaceSpecified              : False
UsedIncludingSnapshotReserveSpecified    : True
VolumeFootprintsSpecified                : False


$A=Get-NcAggr -Query $aggrTemplate 
$A.AggrSpaceAttributes | Select-Object -property *

AggregateMetadata                        : 
CapacityTierUsed                         : 0
DataCoalescedCount                       : 
DataCoalescingSpaceSaved                 : 
DataCoalescingSpaceSavedPercent          : 
DataCompactedCount                       : 1880004370432
DataCompactionSpaceSaved                 : 4183020879872
DataCompactionSpaceSavedPercent          : 8
HybridCacheSizeTotal                     : 0
NcController                             : xxxxxxx
PercentUsedCapacity                      : 69
PhysicalUsed                             : 47364845862912
PhysicalUsedPercent                      : 69
SisSharedCount                           : 1880004370432
SisSpaceSaved                            : 4183020879872
SisSpaceSavedPercent                     : 8
SizeAvailable                            : 20995616858112
SizeTotal                                : 68609634754560
SizeUsed                                 : 47614017896448
TotalReservedSpace                       : 0
UsedIncludingSnapshotReserve             : 
VolumeFootprints                         : 
AggregateMetadataSpecified               : False
CapacityTierUsedSpecified                : True
DataCoalescedCountSpecified              : False
DataCoalescingSpaceSavedPercentSpecified : False
DataCoalescingSpaceSavedSpecified        : False
DataCompactedCountSpecified              : True
DataCompactionSpaceSavedPercentSpecified : True
DataCompactionSpaceSavedSpecified        : True
HybridCacheSizeTotalSpecified            : True
PercentUsedCapacitySpecified             : True
PhysicalUsedPercentSpecified             : True
PhysicalUsedSpecified                    : True
SisSharedCountSpecified                  : True
SisSpaceSavedPercentSpecified            : True
SisSpaceSavedSpecified                   : True
SizeAvailableSpecified                   : True
SizeTotalSpecified                       : True
SizeUsedSpecified                        : True
TotalReservedSpaceSpecified              : True
UsedIncludingSnapshotReserveSpecified    : False
VolumeFootprintsSpecified                : False

 

 

1 REPLY 1

Re: powershell AggrSpaceAttributes.UsedIncludingSnapshotReserve

 

 

 

Connect-NcController $cluster 
$aggrTemplate = Get-NcAggr -Template
Initialize-NcObjectProperty -Object $aggrTemplate -Name AggrSpaceAttributes
$aggrTemplate.AggrSpaceAttributes.UsedIncludingSnapshotReserveSpecified= $true
$aggrTemplate.AggrSpaceAttributes.SizeUsedSpecified= $true

Get-NcAggr   -Attributes $aggrTemplate | select @{ n='Used';e={($_.AggrSpaceAttributes).SizeUsed}},@{ n='UsedIncludingSnapshotReserve';e={($_.AggrSpaceAttributes).UsedIncludingSnapshotReserve}}

 

This code seems to be more accurate but result is the same.  UsedIncludingSnapshotReserve stay empty. 

Cloud Volumes ONTAP
Review Banner
All Community Forums
Public