all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH v2 storage 1/2] rbd plugin: status: drop outdated fallback
@ 2025-05-14  9:36 Fiona Ebner
  2025-05-14  9:36 ` [pve-devel] [PATCH v2 storage 2/2] rbd plugin: status: use actual storage usage as basis for calculation Fiona Ebner
  0 siblings, 1 reply; 3+ messages in thread
From: Fiona Ebner @ 2025-05-14  9:36 UTC (permalink / raw)
  To: pve-devel

As commit e79ab52 ("Fix #2346: rbd storage shows wrong %-usage")
mentions, Ceph provides a 'stored' field since version 14.2.2 as an
approximation of the actually stored amount of user data. The commit
forgot to update the accompanying comment however.

The 'bytes_used' field refers to the raw usage without factoring out
replication (default: 3). The 'max_avail' value is after factoring out
replication, so using 'bytes_used' in the same calculation would lead
to very confusing results.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---

No changes in v2.

 src/PVE/Storage/RBDPlugin.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/PVE/Storage/RBDPlugin.pm b/src/PVE/Storage/RBDPlugin.pm
index 73bc97e..154fa00 100644
--- a/src/PVE/Storage/RBDPlugin.pm
+++ b/src/PVE/Storage/RBDPlugin.pm
@@ -702,9 +702,9 @@ sub status {
     }
 
     # max_avail -> max available space for data w/o replication in the pool
-    # bytes_used -> data w/o replication in the pool
+    # stored -> amount of user data w/o replication in the pool
     my $free = $d->{stats}->{max_avail};
-    my $used = $d->{stats}->{stored} // $d->{stats}->{bytes_used};
+    my $used = $d->{stats}->{stored};
     my $total = $used + $free;
     my $active = 1;
 
-- 
2.39.5



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-05-22 14:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-14  9:36 [pve-devel] [PATCH v2 storage 1/2] rbd plugin: status: drop outdated fallback Fiona Ebner
2025-05-14  9:36 ` [pve-devel] [PATCH v2 storage 2/2] rbd plugin: status: use actual storage usage as basis for calculation Fiona Ebner
2025-05-22 14:32   ` Fiona Ebner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal