Samba – Modern transparent folder compression in Ubuntu 18.04

compressionnetwork-sharesambastorageubuntu-18.04

I'm looking for a way to transparently compress files in a directory, that will be shared over SMB.

I have a server, running Ubuntu 18.04.1 LTS, and I use it for file storage. Mainly what I want to do is transparently compress a folder containing ISO files so that they can be read by any computer on my network, without that computer even knowing they are compressed.

I CANNOT compress the ISO files themselves, for example into a .7z archive, or a .cso file, as they're PS2 ISO files that can only be streamed to a modded PS2 as ISO files, and not compressed. I've tried to compile both versions of fusecompress tex AND hexxellor both REFUSE to compile on my system, despite having all the packages needed, and following a few different guides. Like this one, for example.

I've seen guides on how to use programs like archivemount to mount a compressed archive as r/w, but I don't like the way they operate. They don't do the compression on-the-fly, and instead wait until you unmount the archive. I would like a way to do it seamlessly, the way NTFS compression works on Windows PCs. I've read that btrfs doesn't work well on the current kernel >4.0, and it's already an ext4 partition.

It's an LVM volume over 3 disks, used solely for storage capacity, and ZFS probably wouldn't like it very much.

Best Answer

I would like a way to do it seamlessly, the way NTFS compression works on Windows PCs.

If that's your requirement, then you require a filesystem that supports native compression. That means ZFS or BTRFS, unless you think Reiser4 is still supported to your satisfaction.

Your current LVM/ext4 configuration does not support your stated requirement.

Either abandon the requirement or the configuration.