Thread (13 messages) 13 messages, 7 authors, 2015-08-31

Re: (renamed thread) btrfs metrics

From: Daniel Pocock <hidden>
Date: 2012-01-02 16:25:41

   It's actually not possible in general. Since it's possible to have
different bits of the FS (data vs metadata) with different replication
levels, one byte written to the FS could take up either 1 or 2 bytes
of raw disk storage, and there's no way of predicting what the overall
usage will be, so it's not possible to give an accurate estimate of
free space.

   Similarly, if you have a 10G subvolume, and a snapshot of it, then
how much space does each one take up?
Yes, I agree it is not simple

However, the lvs command from LVM does provide a useful way to show how
full a snapshot volume is.  In the btrfs situation, the snapshot is
within the FS, so it is not quite the same metric

I am looking at what metrics are needed to monitor btrfs in production.
 I actually look after the ganglia-modules-linux package, which includes
some FS space metrics, but I figured that btrfs throws all that out the
window.

Can you suggest metrics that would be meaningful, do I look in /proc or
with syscalls, is there any code I should look at for an example of how
to extract them with C?  Ideally, Ganglia runs without root privileges
too, so please let me know if btrfs will allow me to access them
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help