Long-lived, reliable sd cards in HA-Green, Yellow and Raspberry Pi - using F2FS

I request that HomeAssistant provides an installable version using the F2FS filesystem for SD card based systems.

The F2FS system is specially designed for SD cards. Normal filesystems write data and changes in the same place on an SD card. This causes it to wear out.

F2FS does not write in the same place. This gives flash based systems a much longer lifetime. This would greatly improve the reliability of systems like HA-Green, HA-Yellow and Raspberry PIs.

In addition, F2FS supports on-the-fly compression, which can increase performance (because SD cards are slow, and less data has to be transferred).

Technical suggestions:

  • I would suggest to only configure the /config or /homeassistant partition as F2FS, as its special properties are most applicable there.
  • I do not suggest to move to F2FS completely - just offer the option , with an extra downloadable installation-image, and collect data on its usage and performance.
  • note that currently, F2FS resize might be broken. Easiest way to implement this: Keep the current structure. At first boot, create a new F2FS partition on the rest of the SD card. Copy contents of EXT4 /homeassistant partition to F2FS. Change the fstab to mount the F2FS instead of the EXT4, and reboot.

Have you tried this? Please report back.

No, I do not understand the mounting mechanism enough to do this.

  1. I don’t see the filesystems mounted in fstab, I don’t know where the mount info is, and I do not know the reason why it is not in fstab.
  2. I see the same partition is mounted many times at different mountpoints and without understanding the rationale behind this, I am afraid I’ll break it.

If I knew these two points I could try it.