From: Torsten Bronger <bronger@physik.rwth-aachen.de>
To: linux-btrfs@vger.kernel.org
Subject: Why so much "btrfs send" data for "cp -a --reflink"?
Date: Mon, 05 Oct 2020 09:54:40 +0200 [thread overview]
Message-ID: <87362t3y67.fsf@physik.rwth-aachen.de> (raw)
Hallöchen!
I have two subvolumes A and B. „A“ contains 50GB data, B is empty.
None is a snapshot of the other. Now, I copy all data from A to B
with "cp -a --reflink A/* B". This copying takes less than a
second. So apparently, no bulk data was duplicated. "diff -rq A B"
is empty. So far, so good.
However, it surprises me that
btrfs send -p A B | wc -c
reports 12GB. I would have hoped for very few data (say, a couple
of MBs). Or, the whole 50GB (because A is not a real parent of B,
and never has been). An additional "-c A" does not change anything.
Why is this? In other words, what comprises those 12GB?
It may be insignificant, but the 50GB are almost fully a single
VirtualBox .vdi file, somewhat fragmented (filefrag says 16000).
Regards,
Torsten.
--
Torsten Bronger
next reply other threads:[~2020-10-05 9:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-05 7:54 Torsten Bronger [this message]
2020-10-06 12:48 ` Why so much "btrfs send" data for "cp -a --reflink"? Torsten Bronger
2020-10-06 13:34 ` Filipe Manana
2020-10-06 15:39 ` Torsten Bronger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87362t3y67.fsf@physik.rwth-aachen.de \
--to=bronger@physik.rwth-aachen.de \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).