Sample Header Ad - 728x90

How to set a non default zstd compression level at btrfs filesystem defragment?

17 votes
3 answers
15525 views
# btrfs filesystem defragment -r -v -czstd:15 / ERROR: unknown compression type zstd:15 # btrfs filesystem defragment -r -v -czstd_15 / ERROR: unknown compression type zstd_15 # btrfs filesystem defragment -r -v -czstd15 / ERROR: unknown compression type zstd15 The btrfs manual page doesn't give the clue on how to select a compression level: > **-c[algo]** > > compress file contents while defragmenting. Optional argument selects the compression algorithm, zlib (default), lzo or zstd. > Currently it’s not possible to select no compression. See also section > EXAMPLES. How to select a non-default zstd compression level to re-compress existing btrfs filesystems?


--- Note: btrfs filesystem defragment on **snapshots** might result in much larger disk space consumption : > Warning: Defragmenting with Linux kernel versions as well as with Linux stable kernel versions ≥ 3.10.31, ≥ 3.12.12 or ≥ > 3.13.4 **will break up the ref-links of COW data** (for example files copied with cp --reflink, snapshots or de-duplicated data). This may > cause **considerable increase of space usage** depending on the broken up > ref-links.
Asked by Pro Backup (5114 rep)
Dec 22, 2017, 11:07 AM
Last activity: Mar 18, 2019, 09:28 AM