Gargi-jais11 commented on PR #11322:
URL: https://github.com/apache/ozone/pull/11322#issuecomment-6083574042

   Here is how diskbalancer report and status looks like now:
   **Report**
   ```
   bash-5.1$ ozone admin datanode diskbalancer report --in-service-datanodes
   Report result:
   Datanode: ozone-datanode-2.ozone_default (172.18.0.8:19864)
   Aggregate VolumeDataDensity: 0.00%
   Storage Type Details:
     DISK: IdealUsage: 8.41% | ThresholdRange: (0.00%, 18.41%) | 
VolumeDataDensity: 0.00% | EstBytesToMove: 0 B
   
   Volume Details:
   
   StorageType  StorageID                                     StoragePath       
                         OzoneCapacity  OzoneAvailable       OzoneUsed     
ContainerPreAllocatedSpace   EffectiveUsedSpace     Utilization   VolumeDensity
   DISK         DS-d70c5391-2628-4a6b-965e-1c3271993a46       /data/hdds1/hdds  
                            1006.75 GB       922.08 GB         4.18 MB          
                  0 B             84.67 GB           8.41%           0.00%
   DISK         DS-c8d8a002-1447-44e7-8df9-ec3e909e3075       /data/hdds2/hdds  
                            1006.75 GB       922.08 GB         4.18 MB          
                  0 B             84.67 GB           8.41%           0.00%
   DISK         DS-66c17232-1039-4546-b57c-7d86e82a77d7       /data/hdds3/hdds  
                            1006.75 GB       922.08 GB         4.18 MB          
                  0 B             84.67 GB           8.41%           0.00%
   
   -------
   Note:
     - Aggregate VolumeDataDensity: Sum of per-volume density from each storage 
type's ideal; higher means more imbalance.
     - IdealUsage: Target utilization (0-100%) when volumes are evenly balanced.
     - ThresholdRange: Acceptable deviation (percent); volumes within 
IdealUsage +/- Threshold are considered balanced.
     - VolumeDensity: Deviation of a particular volume's utilization from 
IdealUsage.
     - Utilization: how much a particular volume is utilized 
(effectiveUsedSpace / ozoneCapacity) in %.
     - OzoneCapacity: Ozone data volume capacity.
     - OzoneAvailable: Ozone data volume available space.
     - OzoneUsed: Ozone data volume used space.
     - ContainerPreAllocatedSpace: Space reserved for containers not yet 
written to disk.
     - EffectiveUsedSpace: This is the actual used space of volume which is 
visible to the diskBalancer : (ozoneCapacity minus ozoneAvailable) + 
containerPreAllocatedSpace + move delta.
     - move delta: source volume space to be reclaimed after move completion; 
this value is reflected only when diskBalancer is running else it is 0.
   ```
   
   **Status:**
   ```
   bash-5.1$ ozone admin datanode diskbalancer status --in-service-datanodes
   Status result:
   Datanode                                                     Status     
Threshold(%)    BandwidthInMB   Threads    StopAfterDiskEven  ContainerStates   
             SuccessMove  FailureMove  BytesMoved(MB)  EstBytesToMove(MB) 
StorageTypeEstBytesToMove(MB)            EstTimeLeft(min)    
   ozone-datanode-2.ozone_default (172.18.0.8:19864)            STOPPED    
10.0000         10              5          true               
CLOSED,QUASI_CLOSED            0            0            0               0      
            DISK=0                                   0                   
   ozone-datanode-3.ozone_default (172.18.0.9:19864)            STOPPED    
10.0000         10              5          true               
CLOSED,QUASI_CLOSED            0            0            0               0      
            DISK=0                                   0                   
   ozone-datanode-1.ozone_default (172.18.0.7:19864)            STOPPED    
10.0000         10              5          true               
CLOSED,QUASI_CLOSED            0            0            0               0      
            DISK=0                                   0                   
   
   Note:
    - EstBytesToMove is calculated based on the target disk even state with the 
configured threshold.
    - EstTimeLeft is calculated based on EstimatedBytesToMove and configured 
disk bandwidth.
    - Both EstimatedBytes and EstTimeLeft could be non-zero while no containers 
can be moved, especially when the configured threshold or disk capacity is too 
small.
    - ContainerStates indicates which container lifecycle states are eligible 
for balancing; by default, CLOSED and QUASI_CLOSED are allowed.
    
    // json output
    bash-5.1$ ozone admin datanode diskbalancer status --in-service-datanodes 
--json
   [ {
     "datanode" : "ozone-datanode-2.ozone_default (172.18.0.8:19864)",
     "action" : "status",
     "status" : "success",
     "serviceStatus" : "STOPPED",
     "threshold" : 10.0,
     "bandwidthInMB" : 10,
     "threads" : 5,
     "stopAfterDiskEven" : true,
     "containerStates" : "CLOSED,QUASI_CLOSED",
     "successMove" : 0,
     "failureMove" : 0,
     "bytesMovedMB" : 0,
     "estBytesToMoveMB" : 0,
     "storageTypes" : [ {
       "storageType" : "DISK",
       "balanceable" : true,
       "usableVolumeCount" : 3,
       "estBytesToMoveMB" : 0
     } ],
     "estTimeLeftMin" : 0
   }
   ```
   Output also looks good to me.


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