The sparseness is actually preserved, but the fast-diff stats are
incorrect because zero-byte objects were being created during the
flatten operation. This should be fixed under Luminous [1] where the
flatten operation (and any writes to a clone more generally) no longer
performs a zero-byte copy-up operation. The change was a little too
invasive for comfort to backport to Jewel, however.

[1] http://tracker.ceph.com/issues/15028

On Thu, Oct 12, 2017 at 5:06 PM, Massey, Kevin <[email protected]> wrote:
> Hi,
>
> I'm evaluating ceph (Jewel) for an application that will have a chain of 
> layered images, with the need to sometimes flatten from the top to limit 
> chain length. However, it appears that running "rbd flatten" causes loss of 
> sparseness in the clone. For example:
>
> $ rbd --version
> ceph version 10.2.2 (45107e21c568dd033c2f0a3107dec8f0b0e58374)
> $ rbd du
> NAME        PROVISIONED USED
> child            10240k    0
> parent@snap      10240k    0
> parent           10240k    0
> <TOTAL>          20480k    0
> $ rbd info child
> rbd image 'child':
>         size 10240 kB in 3 objects
>         order 22 (4096 kB objects)
>         block_name_prefix: rbd_data.18c852eb141f2
>         format: 2
>         features: layering, exclusive-lock, object-map, fast-diff, 
> deep-flatten
>         flags:
>         parent: rbd/parent@snap
>         overlap: 10240 kB
> $ rbd flatten child
> Image flatten: 100% complete...done.
> $ rbd du
> NAME        PROVISIONED   USED
> child            10240k 10240k
> parent@snap      10240k      0
> parent           10240k      0
> <TOTAL>          20480k 10240k
>
> Is there any way to flatten a clone while retaining its sparseness, perhaps 
> in Luminous or with BlueStore backend?
>
> Thanks,
> Kevin
>
>
>
>
> _______________________________________________
> ceph-users mailing list
> [email protected]
> http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com



-- 
Jason
_______________________________________________
ceph-users mailing list
[email protected]
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

Reply via email to