All of lore.kernel.org
 help / color / mirror / Atom feed
* Extending "thin_trim"
@ 2024-11-16 16:10 "Thomas Brücker"
  2024-11-16 19:41 ` Zdenek Kabelac
  0 siblings, 1 reply; 2+ messages in thread
From: "Thomas Brücker" @ 2024-11-16 16:10 UTC (permalink / raw)
  To: dm-devel

Hello developers and others,

Intro:
Lets consider a data device of an thin-provisioning combination. On it, some
data blocks are allocated ('by the metadata'), others not. (By using a thin-
provisioning combination, some data_blocks get allocated, then you write to
them, their content is probably not zero, and later, such a data_block is
disallocated.
"thin_trim" discards such unallocated data_blocks on the data device.

'Extending':
It would be fine, if "thin_trim" would have an option, that instead of
releasing
the blocks, "thin_trim" would write zeroes to these blocks.
--> REASON:
e.g.
* if you backup a data device by copying it to another device e.g. by
"dd", it
  would save time, when unallocated blocks are not copied, but just 'jumped'
  by seek (by specifying "conv=sparse" to dd) ("conv=sparse" does its job
  only, if these unallocated blocks are zeroed).

* I have an utility, that backups a data device clusterwise
  (cluster != data_block) to a cloud. To save space on the cloud, clusters
  which contain only zeroes, are not copied to the cloud. Here too, having
  a data device where every unallocated data_block is zero, would be fine.

Thank you for your generous device-mapper efforts.

Sincerely

Thomas Bruecker
Wydacker 43A
CH-3083 Trimtstein





^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Extending "thin_trim"
  2024-11-16 16:10 Extending "thin_trim" "Thomas Brücker"
@ 2024-11-16 19:41 ` Zdenek Kabelac
  0 siblings, 0 replies; 2+ messages in thread
From: Zdenek Kabelac @ 2024-11-16 19:41 UTC (permalink / raw)
  To: Thomas Brücker, dm-devel

Dne 16. 11. 24 v 17:10 "Thomas Brücker" napsal(a):
> Hello developers and others,
>
> Intro:
> Lets consider a data device of an thin-provisioning combination. On it, some
> data blocks are allocated ('by the metadata'), others not. (By using a thin-
> provisioning combination, some data_blocks get allocated, then you write to
> them, their content is probably not zero, and later, such a data_block is
> disallocated.
> "thin_trim" discards such unallocated data_blocks on the data device.
>
> 'Extending':
> It would be fine, if "thin_trim" would have an option, that instead of
> releasing
> the blocks, "thin_trim" would write zeroes to these blocks.
> --> REASON:
> e.g.
> * if you backup a data device by copying it to another device e.g. by
> "dd", it
>    would save time, when unallocated blocks are not copied, but just 'jumped'
>    by seek (by specifying "conv=sparse" to dd) ("conv=sparse" does its job
>    only, if these unallocated blocks are zeroed).
>
> * I have an utility, that backups a data device clusterwise
>    (cluster != data_block) to a cloud. To save space on the cloud, clusters
>    which contain only zeroes, are not copied to the cloud. Here too, having
>    a data device where every unallocated data_block is zero, would be fine.
>
> Thank you for your generous device-mapper efforts.


Hi


I think you should pro probably examine this project: 
https://github.com/jthornber/blk-archive

IMHO zeroing would likely not be so good plan - i.e. imagine you have mostly 
empty 2TiB thinpool...

blk-archive solves this way more efficiently.


Regards


Zdenek




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-11-16 19:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-16 16:10 Extending "thin_trim" "Thomas Brücker"
2024-11-16 19:41 ` Zdenek Kabelac

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.