[pve-devel] [PATCH manager 3/5] ceph tools: add function to get pool properties

Aaron Lauterer a.lauterer at proxmox.com
Thu Apr 28 13:58:07 CEST 2022


Signed-off-by: Aaron Lauterer <a.lauterer at proxmox.com>
---
 PVE/Ceph/Tools.pm | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/PVE/Ceph/Tools.pm b/PVE/Ceph/Tools.pm
index 0c75df0e..b5e60783 100644
--- a/PVE/Ceph/Tools.pm
+++ b/PVE/Ceph/Tools.pm
@@ -255,6 +255,19 @@ sub set_pool {
 
 }
 
+sub get_pool_properties {
+    my ($pool) = @_;
+    my $command = {
+	prefix => "osd pool get",
+	pool   => "$pool",
+	var    => "all",
+	format => 'json',
+    };
+
+    my $rados = PVE::RADOS->new();
+    return $rados->mon_command($command);
+}
+
 sub create_pool {
     my ($pool, $param, $rados) = @_;
 
-- 
2.30.2






More information about the pve-devel mailing list