Thank you Eugen and Nathan! uint64 is big enough, no concerns any more. Tony ________________________________________ From: Nathan Fish <lordcirth@gmail.com> Sent: August 4, 2023 04:19 AM To: Eugen Block Cc: ceph-users@ceph.io Subject: [ceph-users] Re: What's the max of snap ID? 2^64 byte in peta byte = 18446.744073709551616 (peta⋅byte) Assuming that a snapshot requires storing any data at all, which it must, nobody has a Ceph cluster that could store that much snapshot metadata even for empty snapshots. On Fri, Aug 4, 2023 at 7:05 AM Eugen Block <eblock@nde.ag> wrote:
I'm no programmer but if I understand [1] correctly it's an unsigned long long:
int ImageCtx::snap_set(uint64_t in_snap_id) {
which means the max snap_id should be this:
2^64 = 18446744073709551616
Not sure if you can get your cluster to reach that limit, but I also don't know what would happen if you actually would reach it. I also might be misunderstanding so maybe someone with more knowledge can confirm oder correct me.
[1] https://github.com/ceph/ceph/blob/main/src/librbd/ImageCtx.cc#L328
Zitat von Tony Liu <tonyliu0592@hotmail.com>:
Hi,
There is a snap ID for each snapshot. How is this ID allocated, sequentially? Did some tests, it seems this ID is per pool, starting from 4 and always going up. Is that correct? What's the max of this ID? What's going to happen when ID reaches the max, going back to start from 4 again?
Thanks! Tony _______________________________________________ ceph-users mailing list -- ceph-users@ceph.io To unsubscribe send an email to ceph-users-leave@ceph.io
_______________________________________________ ceph-users mailing list -- ceph-users@ceph.io To unsubscribe send an email to ceph-users-leave@ceph.io
_______________________________________________ ceph-users mailing list -- ceph-users@ceph.io To unsubscribe send an email to ceph-users-leave@ceph.io