Re: Real size of rbd image

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/26/2013 02:22 PM, Stephen Taylor wrote:
 From ceph-users archive 08/27/2013:

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

I don’t seem to be able to find any documentation supporting the [@snap]
parameter for this call, but it seems to work, at least in part. I have
a requirement to find the size of a snapshot relative to another
snapshot. Here is what I’ve used:

                 rbd diff pool/image@snap2 --from-snap snap1

Most rbd commands work on snapshots too. The help text could certainly
be improved - suggestions welcome!

The returned list of extents seems to include all changes since snap1,
not just those up to snap2, but those that have been written after snap2
are labeled “zero” rather than as “data” extents. If I ignore the “zero”
extents and sum the lengths of the “data” extents, it seems to give me
an accurate relative snapshot size. Is this expected behavior and the
correct way to calculate the size I’m looking for?

Do you have discard/trim enabled for whatever's using the image?
The diff will include discarded extents as "zero". For calculating
size, it's fine to ignore them. It would be unexpected if these
aren't listed when you leave out the @snap2 portion though.

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





[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Ceph Dev]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux