[RBD] Amend the formula of retrieving total_capacity for a rbd pool
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
Fix Released
|
Medium
|
Gorka Eguileor |
Bug Description
Description
===========
At present, the value of free_capacity for a rbd pool is "max_avail"
retrieved from the command 'ceph df -f json' when quota limit is not
set for this pool. And in that scenario the value of total_capacity
is sum of free_capacity and 'bytes_used' also retrieved from the
command 'ceph df -f json' in the case of dynamic total capacity.
However, there is a considerably difference for the command
'ceph df -f json' for different ceph versions. For example, the output
of that command of the version 12.2.11 of ceph lacks 'STORED' field and
the formula of its '%USED' filed is relevant to 'USED' field while the
output of that command of the version 12.2.13 possesses 'STORED' field
and the formula of its '%USED' filed is relevant to 'STORED' field.
More concrete outputs and formulas are as follows.
root@cmn01:~# ceph --version
ceph version 12.2.11 (26dc3775efc7bb
root@cmn01:~# ceph df
GLOBAL:
SIZE AVAIL RAW USED %RAW USED
375TiB 320TiB 54.5TiB 14.54
POOLS:
NAME ID USED %USED MAX AVAIL OBJECTS
cn-a.rgw.meta 1 219KiB 0 68.6TiB 789
cn-
cn-
cn-
.rgw.root 5 23.3KiB 0 68.6TiB 37
volumes 6 3.99TiB 31.37 8.73TiB 1123150
images 7 6.31TiB 41.47 8.90TiB 828990
vms 8 3.40TiB 24.84 10.3TiB 889292
cn-a.rgw.log 9 197B 0 68.6TiB 316
cn-
volumes_nvme 44 4.25TiB 29.24 10.3TiB 1913190
cn-
%USED of volumes pool:USED/(USED+MAX AVAIL) = 3.99/(3.99+8.73) ≈ 31.37%
root@stor-mgt01:~# ceph --version
ceph version 12.2.13 (584a20eb0237c6
root@stor-mgt01:~# ceph df
RAW STORAGE:
CLASS SIZE AVAIL USED RAW USED %RAW USED
sas 1.6 TiB 1.6 TiB 522 MiB 6.5 GiB 0.39
sata 106 TiB 104 TiB 2.2 TiB 2.2 TiB 2.08
ssd 21 TiB 18 TiB 3.2 TiB 3.2 TiB 15.42
TOTAL 129 TiB 124 TiB 5.4 TiB 5.5 TiB 4.23
POOLS:
POOL ID PGS STORED OBJECTS USED %USED MAX AVAIL
nova.vms 3 64 277 GiB 84.14k 831 GiB 4.97 5.2 TiB
cinder.
glance.images 5 256 565 GiB 73.36k 1.7 TiB 9.63 5.2 TiB
cinder.
cinder.
region-
.rgw.root 20 16 7.7 KiB 19 3.4 MiB 0 33 TiB
region-
region-
region-
region-
region-
region-
rbd 32 64 389 B 1 132 KiB 0 32 TiB
%USED of cinder.volumes_ssd pool:STORED/
The presently rbd driver calculates the total_capacity by free_capacity plus 'bytes_used' which just corresponds to 'USED' field.
Therefore, is it better to take into accout to 'STORED' field when this field exists?
description: | updated |
description: | updated |
description: | updated |
summary: |
- Amend the formula of retrieving total_capacity for the rbd driver + Amend the formula of retrieving total_capacity for a rbd pool |
summary: |
- Amend the formula of retrieving total_capacity for a rbd pool + [RBD] Amend the formula of retrieving total_capacity for a rbd pool |
Changed in cinder: | |
importance: | Undecided → Medium |
tags: | added: quotas rbd total-capacity |
Changed in cinder: | |
importance: | Medium → Low |
tags: | removed: quotas |
Changed in cinder: | |
assignee: | nobody → Gorka Eguileor (gorka) |
description: | updated |
Changed in cinder: | |
importance: | Low → Medium |
Fix proposed to branch: master /review. opendev. org/c/openstack /cinder/ +/829565
Review: https:/