Is it possible to compress a full file system on Linux?

On Windows I can use NTFS drive compression to save heaps of disk space; usually 30%, often much more. It also improves read and write speeds at the cost of higher CPU usage; which isn’t an argument in my situation with CPU power to spare.

So on my Windows machines it’s always enabled. Is there a similar function on Ext4, or is there a different file system on (Ubuntu) Linux which supports compression? If so, how can I migrate my Ext4 file systems to that compressed file system?


There are two filesystems I'm familiar with that will give you compression on Linux: BTRFS and ZFS.

ZFS has a big following in the Sun/Solaris, FreeBSD, and FreeNAS communities. It works well on Linux, based on my experience with it. It doesn't come included in any of the big name distributions, but there are add-on repositories that make it very easy to install. See ZFS on Linux

BTRFS is newer and is Linux-only. I've been running it on Ubuntu 14.04 and found it stable. It supports multiple compression methods. I've found LZO compresses fairly well and is really fast; I don't see any performance slowdown from the compression operation.


Btrfs (B-tree file system) is your answer, it has parallels with Ext4, but offers a bigger change in features and design.

It is still relatively new, and majority of the production Linux installations are quite conservative, so you are probably going to have relatively limited community support.