*Edit: I have figured out how to use BTRFS and enable what it calls “transparent file compression”, and I’m going to use that on most of my old storage devices. 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 the device and I was told by multiple users that F2FS also supports transparent file compression, but I can’t get files to compress and I’m not getting any error messages to try and fix it. 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.*
I’m rewriting the old portion for clarification:
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.


https://btrfs.readthedocs.io/en/latest/mkfs.btrfs.html
Have you tried
--metadata singleand--mixedas well as mounting with-o nospace_cache?I tried that but it wont mount if I add nospace_cache. It’ll mount with:
sudo mount -o compress=zstd:15 /dev/mmcblk0p1 '/home/j/mountpoint/128mb'But if I add nospace_cache to this command, it’ll give me an error saying “mount: bad usage”.
You may have to clear it first.
Check dmesg output for usually more verbose mount errors.
Also I’d use compress-force and test out the other compression algorithms with your data set.
Even though the “nospace_cache” option isn’t working, the rest of what you mentioned worked fine and there’s about 120MB of free space now, which is most of the device. I’m not sure if nospace_cache is worth trying to get since BTRFS only uses about 5MB of the device now. Also, with the files I was testing, I was able to get almost 250MB onto the device, which is better than what I think I would have gotten with F2FS.
Anyways, thanks for helping me.
Mind you that “free space” figures with compression, with btrfs and with such tiny file systems are tricky at best. You’d have to test all options by actually copying your data set first.