On Fri, Sep 22, 2023 at 8:40 AM Dominique Ramaekers <dominique.ramaekers@cometal.be> wrote:
Hi,
A question to avoid using a to elaborate method in finding de most recent snapshot of a RBD-image.
So, what would be the preferred way to find the latest snapshot of this image?
root@hvs001:/# rbd snap ls libvirt-pool/CmsrvDOM2-MULTIMEDIA SNAPID NAME SIZE PROTECTED TIMESTAMP 223 snap_5 435 GiB yes Fri Sep 15 15:33:39 2023 262 snap_1 435 GiB yes Mon Sep 18 15:39:36 2023 280 snap_3 435 GiB yes Wed Sep 20 15:39:42 2023
I would tend to select the highest snapid. But at some point, the next snapid will restart at 1? So maybe not the best idea.
Hi Dominique, This is the right, and easiest, way to do it. Snap IDs are 64-bit wide, so it's safe to assume that the wraparound ("restart") would never happen. Thanks, Ilya