anuragp010 opened a new pull request, #11420: URL: https://github.com/apache/ozone/pull/11420
Co-authored-by: XiChen [[email protected]](mailto:[email protected]) ## What changes were proposed in this pull request? With the introduction of the Storage Policy feature, a Datanode's usage can vary significantly across different `StorageType`'s. Today, `ozone admin datanode usageinfo` only reports usage aggregated across all storage types per datanode, so there's no way to see how capacity is used within a single type. This PR adds a new SCM admin RPC (`listStorageTypeUsageInfo`) and CLI command, `ozone admin storagepolicy usageinfo`, that reports `capacity`/`used`/`remaining`/`committed`/`freeSpaceToSpare` broken down per `StorageType`, both as a cluster-wide summary and (with `--with-datanode`) a per-datanode breakdown. Generated with Claude code. ## What is the link to the Apache JIRA [HDDS-16042](https://issues.apache.org/jira/browse/HDDS-16042) ## How was this patch tested? 1. Newly added Unit Tests and Integration Test. 2. ```shell bash-5.1$ ozone admin storagepolicy usageinfo Cluster StorageType Usage Summary DISK Datanode Count : 3 DISK Capacity : 315229967100 B (293.58 GB) DISK Ozone Used : 13217085 B (12.60 MB) DISK Remaining : 239481778176 B (223.03 GB) DISK Committed : 3221156547 B (3.00 GB) DISK FreeSpaceToSpare : 314572800 B (300 MB) ``` ```shell bash-5.1$ ozone admin storagepolicy usageinfo --with-datanode Cluster StorageType Usage Summary DISK Datanode Count : 3 DISK Capacity : 315229967100 B (293.58 GB) DISK Ozone Used : 13217085 B (12.60 MB) DISK Remaining : 239481778176 B (223.03 GB) DISK Committed : 3221156547 B (3.00 GB) DISK FreeSpaceToSpare : 314572800 B (300 MB) Datanode StorageType Usage List StorageType DISK: Datanode : 88503a6d-9385-4c19-93f9-ac8ba88a6b70 (ozone-datanode-2.ozone_default, 172.18.0.4, /default-rack) DISK Capacity : 105076655700 B (97.86 GB) DISK Ozone Used : 4405695 B (4.20 MB) DISK Remaining : 79827259392 B (74.34 GB) DISK Committed : 1073718849 B (1023.98 MB) DISK FreeSpaceToSpare : 104857600 B (100 MB) Datanode : a604d537-e725-4e30-9181-6dc6f422ad60 (ozone-datanode-3.ozone_default, 172.18.0.9, /default-rack) DISK Capacity : 105076655700 B (97.86 GB) DISK Ozone Used : 4405695 B (4.20 MB) DISK Remaining : 79827259392 B (74.34 GB) DISK Committed : 1073718849 B (1023.98 MB) DISK FreeSpaceToSpare : 104857600 B (100 MB) Datanode : 28396f46-2315-4529-bf68-640612c01e85 (ozone-datanode-1.ozone_default, 172.18.0.8, /default-rack) DISK Capacity : 105076655700 B (97.86 GB) DISK Ozone Used : 4405695 B (4.20 MB) DISK Remaining : 79827259392 B (74.34 GB) DISK Committed : 1073718849 B (1023.98 MB) DISK FreeSpaceToSpare : 104857600 B (100 MB) ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
