I'm runninga a btrfs raid1 on 5 8 TB disks, where primarily urbackup stores backups to. Urbackup uses snapshots extensively. compsize
produces the following output:
Processed 106161732 files, 57335496 regular extents (190449694 refs), 63766108 inline.
Type Perc Disk Usage Uncompressed Referenced
TOTAL 78% 13T 16T 58T
none 100% 11T 11T 47T
zlib 29% 1.4T 5.0T 10T
For a while I ran btrfs with compression and afterwards disabled it. As compsize
now shows, compression can reduce the disk usage considerably (see line zlib). So I wonder how to compress the existing data without destroying the snapshot structure of the existing data. Due to performance reasons I would also prefer using zstd compression instead of zlib. System is Debian 5.7.10 x86_64 with btrfs-progs 4.20.1 if that matters.
Options I analysed:
btrfs fi defrag -czstd
would destroy the snapshot structure.- Mounting with
force-compress=zstd
andbtrfs fi balance
will not compress rebalanced extents, it will just copy them as they are.
Is there anything I can do to compress the existing data without destroying the snapshot structure?
Ideas:
- Can I somehow copy data to another compressed btrfs partition with keeping the snapshot structure intact?
- What about defrag and offline deduplication with dduper? Will it recreate the snapshot structure?