Devesh Kumar Singh created HDDS-17725:
-----------------------------------------
Summary: Enforce same-storage-type moves in Disk Balancer
regardless of the configured choosing policy
Key: HDDS-17725
URL: https://issues.apache.org/jira/browse/HDDS-17725
Project: Apache Ozone
Issue Type: Sub-task
Components: Ozone Datanode
Reporter: Devesh Kumar Singh
Assignee: Devesh Kumar Singh
Disk Balancer allows a configurable ContainerChoosingPolicy to select a
container and its source/destination volumes. The default policy already
selects volumes of the same storage type, but DiskBalancerService does not
independently enforce this rule before copying data.
A custom policy could therefore return a cross-type pair, causing ordinary disk
balancing to change a replica’s storage placement.
The configuration is:
*hdds.datanode.disk.balancer.container.choosing.policy*
For example, consider these volumes on one datanode:
| Volume | Storage type | Utilization |
| SSD-1 | SSD | 80% |
| SSD-2 | SSD | 40% |
| DISK-1 | DISK | 10% |
A custom policy choosing the fullest and emptiest volumes could select SSD-1 →
DISK-1. Disk Balancer should reject that move. An eligible SSD-1 → SSD-2 move
should remain allowed.
Add a service/task-level check that rejects moves between different source and
destination volume storage types before copying data. Ensure rejection releases
any destination space reserved during selection and leaves the source container
unchanged.
*Acceptance criteria:*
- Enforce same-type movement regardless of the configured choosing policy.
- Reject cross-type candidates before data copy and clean up
reservations/accounting.
- Preserve existing same-type movement, container eligibility and failure
handling.
- Add regression tests using an injected custom policy that returns a
cross-type candidate.
- Keep cross-tier policy migration/promotion separate from ordinary Disk
Balancer behavior.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]