[librbd] Add interface of get the snapshot size?

2014-03-24 Thread Haomai Wang
Hi all,

As we know, snapshot is a lightweight resource in librbd and we
doesn't have any statistic informations about it. But it causes some
problems to the cloud management.

We can't measure the size of snapshot, different snapshot will occur
different space. So we don't have way to estimate the resource usage
of user.

Maybe we can have a counter to record space usage when volumn created.
When creating snapshot, the counter is freeze and store as the size of
snapshot. New counter will assign to zero for the volume.

Any feedback is appreciate!

-- 

Best Regards,

Wheat
--
To unsubscribe from this list: send the line unsubscribe ceph-devel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [librbd] Add interface of get the snapshot size?

2014-03-24 Thread Wido den Hollander

On 03/24/2014 02:30 PM, Haomai Wang wrote:

Hi all,

As we know, snapshot is a lightweight resource in librbd and we
doesn't have any statistic informations about it. But it causes some
problems to the cloud management.

We can't measure the size of snapshot, different snapshot will occur
different space. So we don't have way to estimate the resource usage
of user.

Maybe we can have a counter to record space usage when volumn created.


What do you mean with space usage? Cluster wide or pool usage?


When creating snapshot, the counter is freeze and store as the size of
snapshot. New counter will assign to zero for the volume.

Any feedback is appreciate!




--
Wido den Hollander
42on B.V.

Phone: +31 (0)20 700 9902
Skype: contact42on
--
To unsubscribe from this list: send the line unsubscribe ceph-devel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [librbd] Add interface of get the snapshot size?

2014-03-24 Thread Andrey Korolyov
On 03/24/2014 05:30 PM, Haomai Wang wrote:
 Hi all,
 
 As we know, snapshot is a lightweight resource in librbd and we
 doesn't have any statistic informations about it. But it causes some
 problems to the cloud management.
 
 We can't measure the size of snapshot, different snapshot will occur
 different space. So we don't have way to estimate the resource usage
 of user.
 
 Maybe we can have a counter to record space usage when volumn created.
 When creating snapshot, the counter is freeze and store as the size of
 snapshot. New counter will assign to zero for the volume.
 
 Any feedback is appreciate!
 

I believe that there is a rough estimation over 'rados df'. Per-image
statistics would be awesome, though precise stats will be neither rough
too(# of rbd object clones per volume) or introduce new counter
mechanism. Dealing with discard for the filestore, it looks even more
difficult to calculate right estimation, as with XFS preallocation feature.
--
To unsubscribe from this list: send the line unsubscribe ceph-devel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html