symious opened a new pull request, #7927:
URL: https://github.com/apache/ozone/pull/7927
## What changes were proposed in this pull request?
The current logic for "hdds.datanode.dir.du.reserved" is as follows:
```
private long getRemainingReserved(){
return Math.max(reservedInBytes - getOtherUsed(), 0L);
}
```
which means if OtherUsed() is larger than reservedInBytes, then
remainingReserved will be count to 0.
When we set a "hdds.datanode.dir.du.reserved" to 100GB, we actually want the
disk to spare 100GB in case of "SPACE not enough exceptions".
But normally servers have a system level block reservation, which is 5%. So
for a 10T disk, the system level reserved space is about 500GB, when we set the
configuration to 100GB, the "remaningReserved" is calculated as 0, so for
capacity and availabilty, reservation is not counted.
In current calculation logic ,in order to reserve a 100GB space, we need to
set configuration to "600GB" (500 + 100) or "0.06" (0.05 + 0.01 for percent).
This ticket is to change the logic of the reservation calculation to have a
more intuitive aspect for the users, thus no need to take care of the Other
usages.
## What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-12373
## How was this patch tested?
unit test.
--
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]