When I send a compressed subvol (i.e., one part of a filesystem mounted with the compress
mount option) with btrfs-send
, does btrfs-send
send it compressed, or does it decompress it first?
Similarly, when I receive the subvol with btrfs-receive
, does btrfs-receive
re-compress?
Best Answer
btrfs-send
will performread
syscalls, which means it will decompress the data indeed. Then data are streamed uncompressed, andbtrfs-receive
will performwrite
syscalls, which will compress depending on the targetbtrfs
systemcompress
mount option.So for instance, you could have an existing
btrfs
system with all kinds of compression used for different files, and write to a new one where all data will bezstd
-compressed.