View ocum.volumecapacityview | Generated by SchemaSpy |
View Definition:
select `inventoryvolume`.`objid` AS `volumeId`,`inventoryvolume`.`name` AS `volume`,ifnull(`inventoryvolume`.`stateRaw`,'NOT_MAPPED') AS `state`,`inventoryvolume`.`resourceKey` AS `resourceKey`,`inventoryvolume`.`clusterId` AS `clusterId`,(select `cluster`.`name` from `netapp_model_view`.`cluster` where (`cluster`.`objid` = `inventoryvolume`.`clusterId`)) AS `cluster`,`inventoryvolume`.`vserverId` AS `svmId`,(select `vserver`.`name` from `netapp_model_view`.`vserver` where (`vserver`.`objid` = `inventoryvolume`.`vserverId`)) AS `svm`,`ocum`.`na_numBytesToGigaBytes`(`inventoryvolume`.`sizeTotal`) AS `totalDataCapacity`,`ocum`.`na_numBytesToGigaBytes`(`inventoryvolume`.`sizeUsed`) AS `usedDataCapacity`,round(if(((`inventoryvolume`.`sizeTotal` = 0) or isnull(`inventoryvolume`.`sizeTotal`) or isnull(`inventoryvolume`.`sizeUsed`)),0,((`inventoryvolume`.`sizeUsed` * 100) / `inventoryvolume`.`sizeTotal`)),2) AS `usedDataPercentage`,`ocum`.`na_numBytesToGigaBytes`((`inventoryvolume`.`sizeTotal` - `inventoryvolume`.`sizeUsed`)) AS `availableDataCapacity`,round(if(((`inventoryvolume`.`sizeTotal` = 0) or isnull(`inventoryvolume`.`sizeTotal`) or isnull(`inventoryvolume`.`sizeUsed`)),0,(((`inventoryvolume`.`sizeTotal` - `inventoryvolume`.`sizeUsed`) * 100) / `inventoryvolume`.`sizeTotal`)),2) AS `availableDataPercentage`,`ocum`.`na_numBytesToGigaBytes`(`ocum`.`volume`.`dfSnapshotBytesUsed`) AS `snapshotReserveUsedCapacity`,`ocum`.`na_numBytesToGigaBytes`(`ocum`.`volume`.`dfSnapshotBytesAvail`) AS `snapshotReserveAvailableCapacity`,`ocum`.`na_numBytesToGigaBytes`(`inventoryvolume`.`snapshotReserveSize`) AS `snapshotReserveTotalCapacity`,round((case when (isnull(`inventoryvolume`.`snapshotReserveSize`) or (`inventoryvolume`.`snapshotReserveSize` = 0) or isnull(`ocum`.`volume`.`dfSnapshotBytesUsed`) or (`ocum`.`volume`.`dfSnapshotBytesUsed` = 0)) then 0 when (`ocum`.`volume`.`dfSnapshotBytesUsed` > `inventoryvolume`.`snapshotReserveSize`) then (((`ocum`.`volume`.`dfSnapshotBytesUsed` - `inventoryvolume`.`snapshotReserveSize`) * 100) / `inventoryvolume`.`sizeTotal`) else 0 end),2) AS `snapshotOverflowPercentage`,round(if(((`inventoryvolume`.`snapshotReserveSize` = 0) or isnull(`inventoryvolume`.`snapshotReserveSize`) or isnull(`ocum`.`volume`.`dfSnapshotBytesUsed`)),0,((`ocum`.`volume`.`dfSnapshotBytesUsed` * 100) / `inventoryvolume`.`snapshotReserveSize`)),2) AS `snapshotReserveUsedPercentage`,round(if(((`inventoryvolume`.`snapshotReserveSize` = 0) or isnull(`inventoryvolume`.`snapshotReserveSize`) or isnull(`ocum`.`volume`.`dfSnapshotBytesAvail`) or (`ocum`.`volume`.`dfSnapshotBytesAvail` <= 0)),0,((`ocum`.`volume`.`dfSnapshotBytesAvail` * 100) / `inventoryvolume`.`snapshotReserveSize`)),2) AS `snapshotReserveAvailablePercentage`,`ocum`.`na_numBytesToGigaBytes`(`inventoryvolume`.`quotaCommitted`) AS `quotaCommittedCapacity`,`ocum`.`na_numBytesToGigaBytes`(`inventoryvolume`.`quotaOverCommitted`) AS `quotaOverCommittedCapacity`,`inventoryvolume`.`inodeFilesTotal` AS `totalNumberOfInodes`,`inventoryvolume`.`inodeFilesUsed` AS `numberOfInodesUsed`,round(if(((`inventoryvolume`.`inodeFilesTotal` = 0) or isnull(`inventoryvolume`.`inodeFilesTotal`) or isnull(`inventoryvolume`.`inodeFilesUsed`)),0,((`inventoryvolume`.`inodeFilesUsed` * 100) / `inventoryvolume`.`inodeFilesTotal`)),2) AS `inodeUtilizationPercentage`,cast(floor(`calculationview`.`daysUntilFull`) as unsigned) AS `daysToFull`,`ocum`.`volumeregressioninfo`.`bytesUsedPerDay` AS `bytesUsedPerDay`,round(if(((`inventoryvolume`.`sizeTotal` = 0) or isnull(`inventoryvolume`.`sizeTotal`) or isnull(`ocum`.`volumeregressioninfo`.`bytesUsedPerDay`)),0,((`ocum`.`volumeregressioninfo`.`bytesUsedPerDay` * 100) / `inventoryvolume`.`sizeTotal`)),2) AS `dailyGrowthRatePercentage`,if((`inventoryvolume`.`sisStateRaw` = 'enabled'),TRUE,FALSE) AS `deduplication`,if((`inventoryvolume`.`isSisCompressionEnabled` = TRUE),TRUE,FALSE) AS `compression`,if((`inventoryvolume`.`isSnapshotAutoDeleteEnabled` = TRUE),TRUE,FALSE) AS `snapshotAutoDelete`,`ocum`.`na_numBytesToGigaBytes`(`inventoryvolume`.`deduplicationSpaceSaved`) AS `deduplicationSpaceSavings`,`ocum`.`na_numBytesToGigaBytes`(`inventoryvolume`.`compressionSpaceSaved`) AS `compressionSpaceSavings`,if(((`inventoryvolume`.`spaceGuaranteeRaw` = 'none') or (`inventoryvolume`.`spaceGuaranteeRaw` = 'file')),TRUE,FALSE) AS `thinProvisioned`,if(((`inventoryvolume`.`autoSizeModeRaw` = 'grow') or (`inventoryvolume`.`autoSizeModeRaw` = 'grow_shrink')),TRUE,FALSE) AS `autoGrow`,ifnull(`inventoryvolume`.`spaceGuaranteeRaw`,'NOT_MAPPED') AS `spaceGuarantee`,ifnull(`inventoryvolume`.`cachingPolicyRaw`,'NOT_MAPPED') AS `cachingPolicy`,ifnull(`inventoryvolume`.`cacheRetentionPriorityRaw`,'NOT_MAPPED') AS `cacheRetentionPriority`,(case when isnull(`inventoryvolume`.`snapLockTypeRaw`) then 'non_snaplock' else `inventoryvolume`.`snapLockTypeRaw` end) AS `snapLockType`,(select `snaplock`.`volumeExpiryTime` from `netapp_model_view`.`snaplock` where (`snaplock`.`volumeId` = `inventoryvolume`.`objid`)) AS `snapLockExpiryDate`,ifnull(`inventoryvolume`.`tieringPolicyRaw`,'NOT_MAPPED') AS `tieringPolicy`,(case when ((`inventoryvolume`.`volTypeRaw` = 'rw') and isnull(`incominginventorysnapmirror`.`objid`) and isnull(`outgoinginventorysnapmirror`.`sourceVolumeId`)) then 'unprotected' when ((`inventoryvolume`.`volTypeRaw` = 'rw') and (`outgoinginventorysnapmirror`.`sourceVolumeId` is not null)) then 'protected' when ((`inventoryvolume`.`volTypeRaw` = 'dp') or ((`inventoryvolume`.`volTypeRaw` = 'rw') and (`incominginventorysnapmirror`.`objid` is not null) and ((`incominginventorysnapmirror`.`relationshipTypeRaw` = 'data_protection') or (`incominginventorysnapmirror`.`relationshipTypeRaw` = 'extended_data_protection') or (`incominginventorysnapmirror`.`relationshipTypeRaw` = 'vault')))) then 'destination' else 'not_Applicable' end) AS `protectionRole` from (((((`netapp_model_view`.`volume` `inventoryvolume` join `ocum`.`volume` on((`ocum`.`volume`.`id` = `inventoryvolume`.`objid`))) join `ocum`.`managedvolumecalculationsview` `calculationview` on((`calculationview`.`volumeId` = `inventoryvolume`.`objid`))) left join `netapp_model_view`.`snap_mirror` `incominginventorysnapmirror` on(((`incominginventorysnapmirror`.`destinationVolumeId` = `inventoryvolume`.`objid`) and ((`incominginventorysnapmirror`.`relationshipTypeRaw` = 'data_protection') or (`incominginventorysnapmirror`.`relationshipTypeRaw` = 'extended_data_protection') or (`incominginventorysnapmirror`.`relationshipTypeRaw` = 'vault'))))) left join `ocum`.`volumeregressioninfo` on((`ocum`.`volumeregressioninfo`.`volume_id` = `inventoryvolume`.`objid`))) left join `ocum`.`volumeoutgoingrelationshipview` `outgoinginventorysnapmirror` on((`outgoinginventorysnapmirror`.`sourceVolumeId` = `inventoryvolume`.`objid`))) where (`inventoryvolume`.`derivedStyle` in ('FLEXVOL','FLEXGROUP'))
Possibly Referenced Tables/Views: