How-to-simply...

Decompress a Btrfs Subvolume Compressed with zstd

  • 1 Remove compress=zstd:1 option from subvolume in /etc/fstab and reboot.
  • 2 cd /path/to/btrfs/subvolume
    find . \( -path /proc -o -path /sys -o -path /dev -o -path /run -o -path /var/run \) -prune -o -type f -exec cp --reflink=never --preserve=mode,ownership,timestamps,context {} {}.tmp \; -exec mv {}.tmp {} \;
  • N WARNING: Do not run this command on a live root filesystem as it may cause system instability or data corruption. Always back up your data before proceeding and perform such operations from a separate live or rescue environment. This operation is heavy and requires space, it's best to have free space at least equal to the largest file plus a safety margin (10-20%).

References