Revision c1a798ae

View differences:

src/datastore_mad/remotes/ceph/monitor
82 82
    echo "\$value"
83 83
}
84 84

  
85
REPSIZE=\$($CEPH osd pool get "$POOL_NAME" size | cut -d':' -f2)
86 85
MAXAVAIL=\$($CEPH df | grep "$POOL_NAME" | awk '{print \$5}')
87 86
USED=\$($CEPH df | grep "$POOL_NAME" | awk '{print \$3}')
88
TOTAL=\$($RADOS df | grep 'total space' | awk '{print \$3}')
89 87

  
90 88
USED_MB=\$(to_mb \$USED)
91 89
FREE_MB=\$(to_mb \$MAX_AVAIL)
92
TOTAL_MB=\$(expr \$TOTAL / 1024 / \$REPSIZE)
93

  
94
if [ \$FREE_MB -eq 0 ] ; then FREE_MB=\$(expr \$TOTAL_MB - \$USED_MB) ; fi
90
TOTAL_MB=\$(expr \$USED_MB + \$FREE_MB)
95 91

  
96 92
echo "USED_MB=\$USED_MB"
97 93
echo "FREE_MB=\$FREE_MB"

Also available in: Unified diff