mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
parent
926ec70a29
commit
5235aa8323
@ -208,7 +208,8 @@ rbd_rm_r() {
|
||||
#--------------------------------------------------------------------------------
|
||||
rbd_df_monitor() {
|
||||
|
||||
local monitor_data i j xpath_elements pool_name stored quota_bytes free
|
||||
local monitor_data i j xpath_elements pool_name
|
||||
local quota_bytes free bytes_used stored
|
||||
|
||||
monitor_data=$1
|
||||
pool_name=$2
|
||||
@ -216,13 +217,19 @@ rbd_df_monitor() {
|
||||
while IFS= read -r -d '' element; do
|
||||
xpath_elements[i++]="$element"
|
||||
done < <(echo $monitor_data | $XPATH \
|
||||
"/stats/pools/pool[name = \"${pool_name}\"]/stats/stored" \
|
||||
"/stats/pools/pool[name = \"${pool_name}\"]/stats/quota_bytes" \
|
||||
"/stats/pools/pool[name = \"${pool_name}\"]/stats/max_avail")
|
||||
"/stats/pools/pool[name = \"${pool_name}\"]/stats/max_avail" \
|
||||
"/stats/pools/pool[name = \"${pool_name}\"]/stats/bytes_used" \
|
||||
"/stats/pools/pool[name = \"${pool_name}\"]/stats/stored")
|
||||
|
||||
stored="${xpath_elements[j++]:-0}"
|
||||
quota_bytes="${xpath_elements[j++]:-0}"
|
||||
free="${xpath_elements[j++]:-0}"
|
||||
bytes_used="${xpath_elements[j++]:-0}"
|
||||
stored="${xpath_elements[j++]:-0}"
|
||||
|
||||
# https://docs.ceph.com/docs/master/releases/nautilus/
|
||||
# ‘BYTES USED’ column renamed to ‘STORED’. Represents amount of data stored by the user.
|
||||
[ $stored = "0" ] && stored=$bytes_used
|
||||
|
||||
if [ $quota_bytes -ne 0 ]; then
|
||||
if [ $quota_bytes -lt $free ]; then
|
||||
|
Loading…
x
Reference in New Issue
Block a user