Le mardi 27 août 2013 à 13:44 -0700, Josh Durgin a écrit :
> On 08/27/2013 01:39 PM, Timofey Koolin wrote:
> > Is way to know real size of rbd image and rbd snapshots?
> > rbd ls -l write declared size of image, but I want to know real size.
> 
> You can sum the sizes of the extents reported by:
> 
>      rbd diff pool/image[@snap] [--format json]
> 
> That's the difference since the beginning of time, so it reports all
> used extents.
> 
> Josh


Very good tip Josh ! It's the fastest way I seen.


As a result, with awk to sum all extents :
    rbd diff $POOL/$IMAGE | awk '{ SUM += $2 } END { print SUM/1024/1024 " MB" 
}'


Really fast, thanks.

Olivier

_______________________________________________
ceph-users mailing list
ceph-users@lists.ceph.com
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

Reply via email to