Den tors 29 feb. 2024 kl 08:48 skrev garcetto <garcetto(a)gmail.com>om>:
good morning,
i am trying to understand how ceph snapshot works.
i have read that snap are cow, which means if i am correct that if a new write update an
exising block on a volume, the "old" block is copied to snap before overwrite it
on original volume, am i right?
so, i creted a volume say 10 GB in size, empty, then created a snap.
so, coming to my doubt, why the snap is 10GB in size? it should be 0, because no new
write update were done, am i right?
This could be dependent on how you ask about the size. The snapshot
should present itself as having 10G in size, if you as a consumer of
it asks how large it is. If you run something like "rbd info <name>"
and "rbd du <name>" you should be able to see the differences between
its apparent size and how much storage it consumes on the cluster.
rbd du -p glance-images 12345678-0e1e-4d51-abcd-484604d1df0a
NAME PROVISIONED USED
12345678-0e1e-4d51-abcd-484604d1df0a@snap 40GiB 40GiB
12345678-0e1e-4d51-abcd-484604d1df0a 40GiB 0B
<TOTAL> 40GiB 40GiB
--
May the most significant bit of your life be positive.