How to get the used space by client in OpenEBS?

9/18/2018

Setup JIVA OpenEBS 0.5.3 I’ve been taking a look at the Prometheus metrics exported and I’m not seeing a metric for the used space from the perspective of the client.

I’m seeing ‘OpenEBS_logical_size’ and ‘OpenEBS_actual_used’ but they both appear to show the size of my host disk usage and neither show the usage from my client’s perspective.

For reference, my volume is 10G in size, my used space on the host is 8.1G, and my client application shows 1.9G of data. Both ‘OpenEBS_logical_size’ and ‘OpenEBS_actual_used’ show 8.09G used. Is there a metric that I’m not seeing that would show me the usage from the client’s perspective?

-- Ajesh
kubernetes
openebs
storage

1 Answer

9/18/2018

There are three layers here:

/var/lib/mysql (user data) --> sits on /iscsi-vol (ext4 formatted) --> sits on replicas ( /var/openebs/volname..)

(1) User (du) on /var/lib/mysql shows the space as seen from ext4.

(2) /iscsi-vol size is tracked by OpenEBS-actual-used, which is showing the blocks used by ext4. Unless unmap is enabled on ext4, the OpenEBS-actual-used will be higher than what is really used.

(3) /var/openebs/volname.. space used is tracked by OpenEBS-logical-used, which is the space used by each replica for storing the data. This is the sum of data currently served as well as data retained by the snapshots. The OpenEBS-logical-used will be higher, when data blocks are modified after taking the snapshots.

-- Ranjith Raveendran
Source: StackOverflow