this post was submitted on 06 May 2024
66 points (97.1% liked)
Linux Gaming
15282 readers
229 users here now
Discussions and news about gaming on the GNU/Linux family of operating systems (including the Steam Deck). Potentially a $HOME
away from home for disgruntled /r/linux_gaming denizens of the redditarian demesne.
This page can be subscribed to via RSS.
Original /r/linux_gaming pengwing by uoou.
Resources
WWW:
Discord:
IRC:
Matrix:
Telegram:
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Ah okay, cool. It's that easy? Does it compress all existing data after that or is it only for new data?
What would I have to do to compress existing data?
It is only for new data.
For example, you would have to defragment your filesystem again with
btrfs filesystem defragment -r -v -czstd /
. Wherezstd
is an algorithm and/
, a root path. With this command, the default compression level will be used, which is level 3.Be careful, defragmenting the btrfs file system will/can duplicate the data.
As for a mount point, if you decided to use zstd algorithm with level 1 compression, just add the
compress=zstd:1
orcompress-force=zstd:1
to the mount options (fstab or while mounting manually)Reading the manpage (btrfs-filesystem), duplication can happen on some odd kernel versions, so no danger.
Edit: that was my interpretation of breaking up reflinks of cow data anyway. Seems there's more.
If I know correctly, defrag will always duplicate the reflink files.
https://btrfs.readthedocs.io/en/latest/Defragmentation.html
Well, compression doubled my available space. ;-)