Use f2fs for ARM Manjaro Images?


I own a bunch of Raspberry Pis (mostly running RaspberryPi OS, some Manjaro) and I’ve noticed that all of my Pis that have an ext4 filesystem end up with a dead SD card after a year or two.

So I now use to backup, reformat the sd-card with f2fs, restore, and I haven’t noticed a single SD card failure on my Pis using f2fs, some after 4 years, and these are generally more active than the ones I left with ext4.

So I wonder why Manjaro choses to stay with ext4 for its ARM images, and whether you might consider moving to f2fs, which has an excellent record and is now the internal filesystem of many reputable brands Android phones (i.e. Samsung), as f2fs is designed to be as friendly as posssible for those devices eMMCs, which ext4 is definitely not ?

Benchmarks also show that f2fs is much faster than ext4, wich is appreciable on devices that tend to be somewhat slow by themselves.

I know that Manjaro can support this with no hassle as, basically, when I want to change the FS type on my device, I just backup, reformat to f2fs then restore… and it just works great.

I realize this question is more for the Manjaro Devs, but I will chime in anyway. This topic has been discussed in the forums a few times in the past along with my own experiments. If you use the manjaro-arm-installer you can install using f2fs. While f2fs is a pretty good filesystem and worthy of consideration, it is not perfect. ext4 is better when considering power outages and low power conditions. And the repair tools available are more extensive. f2fs can place less wear on an SD, but ext4 is better at preserving the integrity of the filesystem. And if I am not mistaken, most phone makers continue to use ext4, even Samsung phones, and they are the ones writing f2fs.

Well I’ve had a few kernel panics and other crashes on my Pinebook Pro with f2fs and haven’t lost anny data yet…
Same experience with all my f2fs Raspberry Pi devices : never seen any data loss issue, even in really sudden system crashes, kernel panics or power losses.
I consider it rather solid.

f2fs is good and I would not try to persuade you otherwise. But for the RPI, a filesystem image must be supplied and ext4 is the most commonly used and preferred, so Manjaro uses it for the images. The manjaro-arm-installer is for those that wish to make a more customized build… you can even choose btrfs, if I recall correctly… which also works well for SD media and has more features, but has the drawback of more memory required.

If longevity of your SD is top priority, the use of overlayfs for the root filesystem is the best choice. :slight_smile:

Edit: For more information that I used in my considerations, refer to this link for a more detailed look at filesystems and of course the warnings and limitations listed on the Arch f2fs wiki page.

f2fs has one major drawback, which is the main reason that it likely won’t be the default filesystem on our images. You can’t resize the filesystem when the system is booted (also called online resize).

Which would mean, users would need to manually resize the filesystem, from a separate computer before they can use the newly flashed image.

Both ext4 and btrfs can do this.

Oh this one is damn right and a reason good enough :slight_smile: