Hopefully this is my final edit before getting a full solution but I just want to say that if you are going to either resort to belittling me for not using better/newer hardware or you make it obvious that you haven’t fully read the post before commenting, I’m not going to respond to your comment.

In Windows, there’s a file/folder option called “Compress contents to save disk space”. What it does is it compresses the files, as the name suggests, but leaves them accessible as though they aren’t. This doesn’t really have much of a benefit on newer storage devices but on older storage devices, in addition to saving space, it allows files to potentially read faster.

As I have some old storage devices that I want to run games from, I think this will be a great option to have if I could find something similar for Linux. I tried looking online myself but search engines are terrible and I couldn’t find anything though them. So, I decided to post about this here, to see if anyone knows of anything I could try.

Edit: I have figured out how to use BTRFS and enable what it calls “transparent file compression”. Games are running decently well and I’m able to run games that are much larger than the devices original capacity (it seems to be around 2 to 2.5 times the original free space, on average), so I’m going to use that on most of my old storage devices at least for the time being. The only problem I’m having is that I want to use F2FS on my oldest storage device, as BTRFS takes up too much space on that device.

When formatted to BTRFS, there’s only about 40MB of free space and with compression it can hold around 100MB worth of files. Meanwhile, there’s about 80MB of free space with F2FS and I was told by multiple users that F2FS also supports transparent file compression, which should get me around 200MB worth of files on that device because it’s documented to support the same compression methods as BTRFS. But I can’t get files to compress and I’m not getting any error messages to try and diagnose the problem. Based on what the documentation says, I’m supposed to do something like this:

sudo mkfs.f2fs -f -O extra_attr,inode_checksum,sb_checksum,compression /dev/mmcblk0p1
sudo mount -o compress_algorithm=zstd,compress_extension=* /dev/mmcblk0p1 '/home/j/mountpoint/128mb'
chattr -R +c '/home/j/mountpoint/128mb'

The device will mount like this but files aren’t compressing when added, nor are they compressed if using the last command after they’ve been moved.

  • HubertManne@piefed.social
    link
    fedilink
    English
    arrow-up
    2
    arrow-down
    1
    ·
    1 day ago

    Never really had the need. My linux install already takes up way less space than my old windows one so I have much more space.

    • vortexal@lemmy.mlOP
      link
      fedilink
      arrow-up
      1
      ·
      1 day ago

      I don’t need it for my OS, I have a full 512 GB hard drive for my Linux Mint installation. I need this for specifically running games on old storage devices that hold less than 32 GB and have terrible read and write speeds.

      • utopiah@lemmy.ml
        link
        fedilink
        arrow-up
        1
        arrow-down
        1
        ·
        12 hours ago

        running games on old storage devices that hold less than 32 GB and have terrible read and write speeds.

        I’m confused. How about copying that to newer storage devices?

        Also typically game assets are VERY well compressed so I would suggest doing a comparison with/without compression before a full on migration. Compression tools help but aren’t magical. If your assets are e.g. .jpg or .mp4 or .mp3 or a combination of that (as typically game assets are, including 3D models with their textures) then you can test yourself to .zip them (or bzip2 or whatever you prefer) and you will seem some gains but they’ll be nearly negligible, e.g. < 10% reduction.

        • vortexal@lemmy.mlOP
          link
          fedilink
          arrow-up
          1
          ·
          edit-2
          7 hours ago

          It’s because I’m trying to preserve my hard drives. Also, believe it or not, a lot of the games I have are not already compressed that well and I have games that are over 4GB that will now fit on my 1GB flash drive because of BTRFS’s transparent file compression and they run decently this way. Obviously, not all games are like this, there’s only a few that can be compressed that well, but it does seem like the average might be closer to 2 to 2.5 GB for the games I have, which is still much more than I was expecting.

          On a side note, this kind of comment is the exact reason I was considering not posting this. I know what I’m doing and why I’m doing it. I hate it when people are like “why do something this way when this way is better”. I chose to do this, this way, because of the reason I mentioned above. If I was some billionare, like Jeff Bezos, not only would I be using SSDs exclusively, I wouldn’t be playing games on a 200$ laptop that I bought refurbished from Amazon. I’m unemployed and my only means of making money is through online sites which don’t pay well, I’m trying to do what I can with what I have.

      • greedytacothief@lemmy.dbzer0.com
        link
        fedilink
        English
        arrow-up
        5
        ·
        1 day ago

        Probably been mentioned already, but ZFS and BTRFS have options for full disk compression. Though there is cpu overhead with higher compression settings.

        • vortexal@lemmy.mlOP
          link
          fedilink
          arrow-up
          1
          ·
          1 day ago

          I’ve gotten BTRFS to work and I’m going to use that for most of my devices. I’m not sure if I’m going to use ZFS though, the documentation that I was given for how to use it seems to be written from the perspective of someone who already knows how the it works and not from the perspective of someone who doesn’t, so I’m very confused by it.

          I’d like to get F2FS working on one of my devices though, but the commands needed to enable compression don’t seem to be working for me and I’m not getting any error messages so I have no idea how to fix it.