Discussion:
Real size of rbd image
(too old to reply)
Timofey Koolin
2013-08-27 20:39:48 UTC
Permalink
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.
--
Blog: www.rekby.ru
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ceph.com/pipermail/ceph-users-ceph.com/attachments/20130828/05c33fcf/attachment.htm>
Josh Durgin
2013-08-27 20:44:55 UTC
Permalink
Post by Timofey Koolin
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
Olivier Bonvalet
2013-08-27 23:49:48 UTC
Permalink
Post by Josh Durgin
Post by Timofey Koolin
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.
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
Olivier Bonvalet
2013-08-27 23:49:48 UTC
Permalink
Post by Josh Durgin
Post by Timofey Koolin
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.
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
Olivier Bonvalet
2013-08-27 23:49:48 UTC
Permalink
Post by Josh Durgin
Post by Timofey Koolin
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.
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
Olivier Bonvalet
2013-08-27 23:49:48 UTC
Permalink
Post by Josh Durgin
Post by Timofey Koolin
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.
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

Timofey Koolin
2013-08-27 20:39:48 UTC
Permalink
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.
--
Blog: www.rekby.ru
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ceph.com/pipermail/ceph-users-ceph.com/attachments/20130828/05c33fcf/attachment-0002.htm>
Josh Durgin
2013-08-27 20:44:55 UTC
Permalink
Post by Timofey Koolin
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
Timofey Koolin
2013-08-27 20:39:48 UTC
Permalink
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.
--
Blog: www.rekby.ru
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ceph.com/pipermail/ceph-users-ceph.com/attachments/20130828/05c33fcf/attachment-0003.htm>
Josh Durgin
2013-08-27 20:44:55 UTC
Permalink
Post by Timofey Koolin
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
Timofey Koolin
2013-08-27 20:39:48 UTC
Permalink
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.
--
Blog: www.rekby.ru
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ceph.com/pipermail/ceph-users-ceph.com/attachments/20130828/05c33fcf/attachment-0004.htm>
Josh Durgin
2013-08-27 20:44:55 UTC
Permalink
Post by Timofey Koolin
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
Loading...