[Pi4] STORAGE partition formated in f2fs

  • Hi,

    I open this post to share my experience.

    I use LE on a RPi4, on a SD card. STORAGE partition is in ext4 by default, but that fs is not the best to be used on flash devices. F2FS is better-suited.

    :!: I explain how to do this from a fresh install. Do not do this if STORAGE partition is not empty or you'll lose all data.

    How I did :

    * flash LE 10 image on a SD card

    * use Gparted to format the STORAGE partition in F2FS (and resize it by the way)

    * note the new UUID of this partition (afaik F2FS doesn't support partition name, so forget about "STORAGE" name)

    * in /flash/cmdline.txt replace the UUID above in disk=UUID=whatEverUUID

    * unmount properly, insert the SD card in the RPi and enjoy.

    I did not test this on previous versions of LE.

  • Sal0kyn while it does work, AFAIK there's no official f2fs support and f2fs binaries are missing from LibreELEC (mkfs.f2fs and fsck.f2fs).

    Also an f2fs partition should be mounted with the "nodiscard" flag, to avoid continuous discard operations.

  • The benefit of F2FS is nowadays (also) rather dubious and could even be harmful as the controllers inside the various flash media have gotten much better. In 'the old days' they were quite dumb and F2FS added (some) intelligence to them, but that intelligence is now present in the (HW) controllers. They have much better info and control of the storage media then the generic F2FS ever could.

    The potentially harmful part is in that 2 parties trying to do the same/similar thing can actually work against each other.