Hello, I noticed that when Ceph creates snapshot objects, it detects partial object change and creates an overlap record. This overlapping space is then subtracted from the total space occupied by objects. This makes sense to some extent, however, this is little inconsistent when a file storage backend is used. See the example: Create RBD device: > ./rbd create --size 16M rbd/image01 > dd if=/dev/urandom of=/dev/rbd1 bs=1M count=16 oflag=direct > sudo ./rbd map rbd/image01 --id dummy-id3 Pools stats: > POOLS: > NAME ID USED %USED MAX AVAIL OBJECTS > rbd 0 16384k 0.08 15459M 7 Create snapshot > ./rbd snap create rbd/image01@snap01 So far so good: > POOLS: > NAME ID USED %USED MAX AVAIL OBJECTS > rbd 0 16384k 0.08 15458M 7 Overwrite first object partially (leaving 3/4MiB overlap): > dd if=/dev/zero of=/dev/rbd1 bs=1M count=1 oflag=direct New object is created and only the non-overlapping space is added to USED: > POOLS: > NAME ID USED %USED MAX AVAIL OBJECTS > rbd 0 17408k 0.08 15450M 8 OTOH, we can see that whole object is duplicated when only the first quarter was duplicated: > -rw-r--r-- 1 mkoutny users 4.0M Mar 24 15:22 'osd1/current/0.2_head/rbd\udata.10276b8b4567.0000000000000000__4_3015A682__0' > -rw-r--r-- 1 mkoutny users 4.0M Mar 24 15:22 'osd1/current/0.2_head/rbd\udata.10276b8b4567.0000000000000000__head_3015A682__0' This was done with Ceph version v10.2.3. Is such behavior expected (i.e. it assumes backed will store data efficiently) or is it a bug? Thanks, Michal
Attachment:
signature.asc
Description: OpenPGP digital signature
_______________________________________________ ceph-users mailing list ceph-users@xxxxxxxxxxxxxx http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com