Is there a way to gather and show the disk usage stats of CephFS subvolumes?
Is there anything similar to rbd du
for CephFS subvolumes?
The only idea I have is something really ugly:
filesystem="ceph-filesystem"
group_name="csi"
for subvolume in $(ceph fs subvolume ls "${filesystem}" --group-name "${group_name}" | jq -cr '.[].name?'); do
subvolume_info=$(ceph fs subvolume info "${filesystem}" "${subvolume}" "${group_name}")
bytes_quota="$(echo "${subvolume_info}" | jq '.bytes_quota')"
bytes_used=$(echo "${subvolume_info}" | jq '.bytes_used')
echo "${subvolume} ${bytes_quota} ${bytes_used}"
done
I believe, there should be something more elegant.
Thanks in advance.
0 Answers