Hi there! So, after many years of putting it off, I finally switched from Windows to Linux. I’m writing this post so everyone can flood me, and anyone else who decides they don’t wanna be a Microsoft or Mac slave anymore but still wants to play games, with their advice. Anyone who has a question can just post it under this and hopefully they’ll have an answer.

Personally I’d like to ask the more experienced Linux gamers for some general advice, what to do and what not to do when trying to get a game working or searching for a wine prefix for example.

  • Riskable@programming.dev
    link
    fedilink
    English
    arrow-up
    4
    ·
    2 days ago

    Once a month, you need to run a scrub:

    sudo btrfs scrub start /mountpoint

    It’s very IO intensive, but it runs in the background with a very low priority. You can check the status of it:

    sudo btrfs scrub status /mountpoint

    Also, because of how it works (chunking copy-on-write FS), every time data gets deleted, you end up with a little bit of empty space inside each chunk. This can result in a filesystem with 200gb of free space only showing >1gb (or worse: no free space!). To fix this, you need to run a balancing command across chunks of varying sizes:

    # Reclaim data chunks that are less than 50% full
    sudo btrfs balance start -dusage=50 /mountpoint
    
    # Reclaim metadata chunks that are less than 30% full (use cautiously)
    sudo btrfs balance start -musage=30 /mountpoint
    

    Basically, you want a number of commands running regularly via cron or systemd timers as root to keep things running smoothly or you’re going to be in for a world of hurt.

    I have a single script that runs via cron once a week that takes care of everything in the middle of the night on Monday morning (2AM I think) on all my hosts using btrfs. I’d share it but I’m not at home right now. Just ask AI to find or generate one for you and I’m sure it’ll be fine since that’s a very, very common thing.

    • Ewoks Are Based@lemmy.mlOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      edit-2
      1 day ago

      What do you mean 50% or 30% full? Also is there like a risk with scrub or balancing, like it may delete something or is it safe?

      • Riskable@programming.dev
        link
        fedilink
        English
        arrow-up
        1
        ·
        17 hours ago

        No risk at all. Just slows down disk IO for a little while 👍

        In my script, I do 10%, 20%, 30%, etc all the way up to 90%. Though I doubt it does anything at all after 60%.