this post was submitted on 06 May 2024
66 points (97.1% liked)

Linux Gaming

15315 readers
12 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
66
submitted 6 months ago* (last edited 6 months ago) by [email protected] to c/linux_gaming
 

I'm using EndeavourOS with ext4 file system for daily usage and a dual bootable Windows for gaming. What I want to have right now is getting rid of Windows completely.

When I tried it before, I had to try multiple tweaks for a game and find which one worked on Linux. Therefore, I want to take a snapshot with BTRFS and try it until I find the right configuration.

While I have quite a bit of experience with Linux, I've never used BTRFS. Do you think it's worth it?

I thought about keeping the games on the ext4 system, but I hate splitting the disk. I'm thinking of keeping the games in a non-snapshot volume.

UPDATE: I just re-installed EndeavourOS with BTRFS + snapper + BTRFS Assistant :)

you are viewing a single comment's thread
view the rest of the comments
[–] victorz 1 points 6 months ago (1 children)

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?

[–] [email protected] 6 points 6 months ago (2 children)

It is only for new data.

For example, you would have to defragment your filesystem again with btrfs filesystem defragment -r -v -czstd /. Where zstd 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 or compress-force=zstd:1 to the mount options (fstab or while mounting manually)

[–] [email protected] 2 points 6 months ago* (last edited 6 months ago) (1 children)

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.

[–] [email protected] 1 points 6 months ago (1 children)

If I know correctly, defrag will always duplicate the reflink files.

https://btrfs.readthedocs.io/en/latest/Defragmentation.html

Defragmentation does not preserve extent sharing, e.g. files created by cp --reflink or existing on multiple snapshots. Due to that the data space consumption may increase.

[–] [email protected] 1 points 6 months ago

Well, compression doubled my available space. ;-)

[–] [email protected] 1 points 6 months ago (1 children)

So I set up my system with btrfs in the last days and I converted two external drives (from ext4) (mainly game) and run defrag and balance, because it was mentioned in a guide to compress the existing files. Was that a bad idea? Didn't read anything about duplicates.

[–] [email protected] 1 points 6 months ago* (last edited 6 months ago)

It is fine. You can use the duperemove tool (or bees) to find and remove duplicates.

https://btrfs.readthedocs.io/en/latest/Deduplication.html

So it is out-of-band deduplication and has to be done manually.

Also, by default cp and most file managers use a reflink copy (data blocks are copied only when modified)