linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Defragmentation vw. Deduplication
@ 2021-03-02 21:31 Christian Völker
  2021-03-04  4:54 ` Zygo Blaxell
  0 siblings, 1 reply; 2+ messages in thread
From: Christian Völker @ 2021-03-02 21:31 UTC (permalink / raw)
  To: linux-btrfs@vger.kernel.org

Hi all,

might be a simple question but I did not find a trustable source for this.

BTRFS uses COW which might lead to fragmentation.
So using "btrfs fi defrag -r /mnt" will bring most file extend in a row 
and copy previously deduplicated extends.
Obviously this uses more disk space. This is not what I want, but I need 
to run "defrag" because I initially skipped the "compress=zstd" option 
when mounting. So many files are stored without compression. Therefor I 
neede to do the "defrag".

I am now unsure about the deduplication itself.  How does it work?
I create a file in a directory (ie on Monday). Some days later I create 
a file which has some extents with equal data. Does btrfs recon the 
equal extents and does it doe deduplication then? Or does it only do 
deduplication when ie "cp --reflink" is used?

However as I needed the compression and not the defragmentation is there 
any way to add compression and recreate deduplication later?

Sorry if this is a dumb question.

/KNEBB



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

end of thread, other threads:[~2021-03-04  4:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-02 21:31 Defragmentation vw. Deduplication Christian Völker
2021-03-04  4:54 ` Zygo Blaxell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).