We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a3b3a01 commit 98840f7Copy full SHA for 98840f7
rbd_client_info.sh
@@ -41,10 +41,17 @@ convert_bytes() {
41
fi
42
}
43
44
-# Get list of pools using jq
+# Get list of all pool names
45
pools=$(ceph osd lspools -f json | jq -r '.[].poolname')
46
47
for pool in $pools; do
48
+ # Check if this pool has the 'rbd' application
49
+ app_list=$(ceph osd pool application get "$pool" --format json 2>/dev/null)
50
+ if ! echo "$app_list" | jq -e 'has("rbd")' > /dev/null; then
51
+ echo "⏩ Skipping pool '$pool' (no 'rbd' application)"
52
+ continue
53
+ fi
54
+
55
images=$(rbd ls "$pool")
56
57
for image in $images; do
@@ -67,4 +74,4 @@ for pool in $pools; do
67
74
done
68
75
69
76
70
-echo "Report saved to $output_file"
77
+echo "✅ Report saved to $output_file"
0 commit comments