Is it possible to enable compression on existing F2FS filesystem?

I just noticed f2fs now have transparent compression support, but I can’t find information on how to enable it. Anyone know how to do this?

man mkfs.f2fs do not mention compression?

1 Like

According to this, has to be enabled at creation of the filesystem:
https://wiki.archlinux.org/index.php/F2FS#Compression

It would be strange if it wasn’t, considering the file system supports even just compressing a bunch of files.
https://www.kernel.org/doc/html/latest/filesystems/f2fs.html

You would have to write again your existing files for the new setting to apply though.

Not worth the effort, see old forum, there is a post about it.

Just use plain f2fs.

Where?
And recently? Because F2FS gained lzo-rle and zstd as of lately.

I would have posted it anyway despite your “Where?”

And what part of that would suggest compression is not worth the effort?

I would like to run some experiments and measure the compression ratio achieved in f2fs. But the sizes reported by standard tools seem to be the uncompressed sizes. That is the same for btrfs with compression. For btrfs, one can determine the compressed size with the tool compsize. What tool should I use for f2fs?

4 Likes