CEPH filesystem development
 help / color / mirror / Atom feed
* Determining RBD storage utilization
@ 2012-10-10 17:10 Travis Rhoden
  2012-10-10 17:28 ` Damien Churchill
  2012-10-10 17:54 ` Josh Durgin
  0 siblings, 2 replies; 8+ messages in thread
From: Travis Rhoden @ 2012-10-10 17:10 UTC (permalink / raw)
  To: ceph-devel

Hey folks,

I have two questions about determining how much storage has been used
*inside* of an RBD.

First, I'm confused by the output of df.  I've created, mapped, and
mounted a 500GB RBD, and see the following:

# df -h /srv/test
Filesystem      Size  Used Avail Use% Mounted on
/dev/rbd44      500G  7.5G  467G   2% /srv/test

# cd /srv/test
# du -sh .
20K	.


Any ideas way a brand-new, no files added mount shows 7.5GB of used
space?  Does this happen from the file system formatting (ext4 in this
case)?
Additionally, 500G - 7.5G != 467G (the number shown as Avail).  Why
the huge discrepancy?  I don't expect the numbers to add up exact due
to rounding from kB, MB, GB, etc, but they should be darn close, a la

df -h /dev/sda1
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1        15G  1.7G   13G  12% /


Second question, is it possible to know how much storage has been used
in the RBD without mounting it and running df or du?  For the same RBD
as above, I see:

# rbd info test
rbd image 'test'':
	size 500 GB in 128000 objects
	order 22 (4096 KB objects)
	block_name_prefix: rb.0.18f9.2d9c66c6
	parent:  (pool -1)

Is there perhaps a way to know the number of objects that have been
'used'?  Then I could take that and multiply by the object size (4MB).

I'm running 0.48.1argonaut on Ubuntu 12.04.
RBD maps are also on Ubuntu 12.04, with the stock 3.2.0-29-generic kernel.

Thanks,

 - Travis

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-10-11  9:15 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-10 17:10 Determining RBD storage utilization Travis Rhoden
2012-10-10 17:28 ` Damien Churchill
2012-10-10 17:49   ` Travis Rhoden
2012-10-10 17:55   ` Gregory Farnum
2012-10-10 18:47     ` Travis Rhoden
2012-10-10 20:37     ` Sage Weil
2012-10-11  9:15     ` Damien Churchill
2012-10-10 17:54 ` Josh Durgin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox