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?


btrfs-send will perform read syscalls, which means it will decompress the data indeed. Then data are streamed uncompressed, and btrfs-receive will perform write syscalls, which will compress depending on the target btrfs system compress 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 be zstd-compressed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.