Gargi-jais11 commented on code in PR #436:
URL: https://github.com/apache/ozone-site/pull/436#discussion_r3273118763


##########
docs/05-administrator-guide/02-configuration/04-performance/11-storage-capacity-planning.md:
##########
@@ -0,0 +1,142 @@
+---
+sidebar_label: Storage Capacity Planning
+---
+
+# Storage Capacity Planning
+
+In Apache Ozone, managing disk capacity is critical for maintaining high 
availability. Ozone uses a multi-layered approach to ensure that Datanodes do 
not run out of physical space, which could lead to data corruption or service 
hangs.
+
+For background on Datanode volumes and related settings, see 
[Datanodes](../../../core-concepts/architecture/datanodes). Full property 
descriptions are in the [configuration appendix](../appendix).
+
+## When is a Disk Considered "Full"?
+
+A disk (or "Volume" in Ozone terminology) is considered **Full** for new data 
allocations and replication targets when the available physical space falls 
below a specific threshold.
+
+This threshold is the sum of two "Reserved Space" configurations plus a safety 
buffer for the operation itself:
+
+`Failure Threshold = (Volume Min Free Space) + (DU Reserved Space) + 
(Operation Buffer)`
+
+If a volume's free space is less than this threshold, SCM will stop selecting 
this volume for new containers or as a destination for re-replication 
(including decommission and maintenance moves).
+
+## Reserved Space Concepts
+
+Ozone provides two types of reserved space to protect the system:
+
+### 1. Volume Min Free Space
+
+This is a safety margin managed by the Datanode to prevent the disk from ever 
reaching 100% capacity. It is the most important setting for capacity planning.
+
+- **Purpose**: Protects the Datanode from OS-level disk-full errors.
+- **Configuration**:
+  - `hdds.datanode.volume.min.free.space`: A fixed value (e.g., `20GB`).

Review Comment:
   @jojochuang Should we also mention about volume min free space hard limit?
   
   **- Soft limit (min.free.space.percent, default 2%):** used for what is 
reported to SCM in heartbeats as freeSpaceToSpare. This governs SCM placement 
decisions.
   **- Hard limit (min.free.space.hard.limit.percent, default 1.5%):** used for 
local write rejection on the Datanode.



##########
docs/05-administrator-guide/02-configuration/04-performance/11-storage-capacity-planning.md:
##########
@@ -0,0 +1,142 @@
+---
+sidebar_label: Storage Capacity Planning
+---
+
+# Storage Capacity Planning
+
+In Apache Ozone, managing disk capacity is critical for maintaining high 
availability. Ozone uses a multi-layered approach to ensure that Datanodes do 
not run out of physical space, which could lead to data corruption or service 
hangs.
+
+For background on Datanode volumes and related settings, see 
[Datanodes](../../../core-concepts/architecture/datanodes). Full property 
descriptions are in the [configuration appendix](../appendix).
+
+## When is a Disk Considered "Full"?
+
+A disk (or "Volume" in Ozone terminology) is considered **Full** for new data 
allocations and replication targets when the available physical space falls 
below a specific threshold.
+
+This threshold is the sum of two "Reserved Space" configurations plus a safety 
buffer for the operation itself:
+
+`Failure Threshold = (Volume Min Free Space) + (DU Reserved Space) + 
(Operation Buffer)`
+
+If a volume's free space is less than this threshold, SCM will stop selecting 
this volume for new containers or as a destination for re-replication 
(including decommission and maintenance moves).
+
+## Reserved Space Concepts
+
+Ozone provides two types of reserved space to protect the system:
+
+### 1. Volume Min Free Space
+
+This is a safety margin managed by the Datanode to prevent the disk from ever 
reaching 100% capacity. It is the most important setting for capacity planning.
+
+- **Purpose**: Protects the Datanode from OS-level disk-full errors.
+- **Configuration**:
+  - `hdds.datanode.volume.min.free.space`: A fixed value (e.g., `20GB`).
+  - `hdds.datanode.volume.min.free.space.percent`: A percentage of the volume 
capacity (e.g., `0.02` for 2%).
+- **Logic**: Ozone uses the **maximum** of the fixed value and the percentage.
+
+### 2. DU Reserved Space
+
+This reserves space for non-Ozone files on the same disk (e.g., OS logs, 
system tools, or other services).
+
+- **Purpose**: Prevents Ozone from consuming space that is intended for other 
uses on the host.
+- **Configuration**:
+  - `hdds.datanode.dir.du.reserved`: Fixed bytes per volume (e.g., 
`/data1:500MB`).
+  - `hdds.datanode.dir.du.reserved.percent`: Percentage per volume (default is 
`0.0001` or 0.01%).
+
+### 3. Operation Buffer (2x Container Size)
+
+When Ozone replicates a container (e.g., during decommissioning), it requires 
space to hold the incoming data in a temporary directory before importing it.
+
+- **Requirement**: Ozone requires free space equal to **2x the Container 
Size**.
+- **Example**: For a default 5 GB container, this is **10 GB**.
+
+## Configuration Parameters
+
+| Property | Default | Description |
+| :--- | :--- | :--- |
+| `hdds.datanode.volume.min.free.space` | `20GB` | Fixed minimum free space 
per volume. |
+| `hdds.datanode.volume.min.free.space.percent` | `0.02` (2%) | 
Percentage-based minimum free space. |
+| `hdds.datanode.dir.du.reserved` | (unset) | Fixed bytes reserved for 
non-Ozone use. |
+| `ozone.scm.container.size` | `5GB` | The target size for containers. |
+| `hdds.datanode.storage.utilization.critical.threshold` | `0.95` (95%) | 
Threshold at which SCM logs a "Critical" space warning. |
+
+## Inspecting Storage Usage
+
+Administrators can inspect the actual and "SCM-usable" space using the Ozone 
CLI or the Recon Web UI.
+
+### 1. Recon Web UI
+
+The [Recon cluster capacity 
guide](../../operations/observability/recon/recon-capacity-distribution) 
describes how to monitor cluster-wide storage:
+
+- **Dashboards**: View aggregated capacity, used space, and remaining space 
for the entire cluster.
+- **Datanodes Page**: Sort Datanodes by utilization to quickly identify nodes 
that are approaching their "Full" threshold.
+
+### 2. Node Usage Summary (CLI)
+
+To see a high-level view of how much space is used across the cluster:
+
+```bash
+ozone admin datanode usageinfo
+```
+
+This command shows the capacity, SCM used, and remaining space for each 
Datanode.
+
+### 3. Detailed Volume Info
+
+To see the status of individual disks on a specific Datanode:
+
+```bash
+ozone admin datanode usageinfo --uuid <datanode-uuid>

Review Comment:
   uuid is deprecated.
   ```suggestion
   ozone admin datanode usageinfo --node-id <datanode-node-id>
   ```
   



-- 
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]

Reply via email to