As I mentioned in the title, I’m not looking to save space, I want to test something. In Windows, you could use this option on a folder and still access the contents and run executables while keeping the folder and it’s contents compressed. The benefit to doing this, outside of saving space, is that files could potentially be accessed faster on slower storage devices.

As I’ve been trying to get the most out of some old storage devices I have, I think that something like this would be a great option for this. The only problem is that I’ve tried looking online for a way to do this but search engines are terrible. So, I’m posting about this here in case someone knows of a way to do this.

Edit: I forgot to specify this but I’m trying this for gaming. I know it’s not recommended to this but as a result, I mostly need something that’s not read-only. It might work fine for some games but this obviously wont work for all games.

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

    I actually figure out the problem, I was actually supposed to just enable compression and then use the command when mounting. Only problem is, it’s not compressing the files even though I mounted it with zstd enabled. I know this because I’m using a file that’s slightly larger than the free space but it’s still giving errors about not having enough space.

    • hendrik@palaver.p3x.de
      link
      fedilink
      English
      arrow-up
      2
      ·
      edit-2
      1 hour ago

      Did you read the Wiki? You need to either pass the compress_extension option when mounting it. The Arch Wiki lists how to enable compression on all text files. And I gave you the version with a ‘*’, which enables compression for all files. Or you do a chattr -R +c ... on specific files or directories to compress them. Maybe you missed that and that’s why it doesn’t compress?!

      There’s probably also a way to debug it and somehow figure out what it does and how many files/sectors got compressed on the filesystem. Linux usually buries that kind of information somewhere in /sys or /proc, or there’s special commands to figure it out. But I’m not really an expert on it.

      And there’s also files which just can not be compressed any further because they’re already compressed. Most images, for example. Or music or ZIP archives. If you try to compress those, they’ll usually stay the same size.

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

        Nope, I just reformatted sd card back to f2fs, mounted it the way both you and the documentation specified, and files are still not being compressed.

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

        No I did read it, I did the commands like it said but files weren’t being compressed. I can try it again though, if it turns out I did still do something wrong.

        Also, I tried formatting the sd card to btrfs without using gparted and it did work, and files are being compressed. Only problem is is that btrfs is using about 2/3 of the cd card, so I hope I can get f2fs working on it.

        • hendrik@palaver.p3x.de
          link
          fedilink
          English
          arrow-up
          2
          ·
          1 hour ago

          Sounds reasonable. Yeah, good luck. I’m sure you’ll figure it out. Unfortunately it’s always a bit difficult to diagnose problems over the internet, without typing in the commands and seeing the exact output. But there should be a way to make it work, F2FS is designed for something like this.