Command
ceph df detail --format json | jq '.pools[] | select(.name=="cephfs.data") | {
"Pool名稱": .name,
"原始邏輯大小(GB)": (.stats.stored / 1024 / 1024 / 1024),
"壓縮前數據量(含副本)(GB)": (.stats.compress_under_bytes / 1024 / 1024 / 1024),
"壓縮後實體佔用(含副本)(GB)": (.stats.compress_bytes_used / 1024 / 1024 / 1024),
"精確壓縮倍率": (if .stats.compress_bytes_used == 0 then "0 (尚未有壓縮數據)" else (.stats.compress_under_bytes / .stats.compress_bytes_used) end)
}'output example:
{
"Pool名稱": "ambedded_fs.data",
"原始邏輯大小(GB)": 2.785156488418579,
"壓縮前數據量(含副本)(GB)": 8.35546875,
"壓縮後實體佔用(含副本)(GB)": 1.04443359375,
"精確壓縮倍率": 8
}