Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


EXT4 vs btrfs for raspberry pi
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

EXT4 vs btrfs for raspberry pi

I'm running a raspberry pi with a 32GB MicroSD card for a couple years.
it runs home assistant, adguard home and unbound.
there is an IPS, but the IPS backup time isn't great and sometimes it do face power cuts.

I've been using ext4, but faced corruption after a power cut a few times.
It usually recovers after such small corruptions, but last time it corrupted a little too bad I guess. It doesn't boot anymore.

I can mount the SD card on another PC and see the files though, but in the SBC, it says /dev/mmcblk0p1 does not exist during boot.
Haven't been able to repair that.

So, I'm going to need a reinstall.
Should I go with btrfs this time?
I heard it has more data protection.
Or should I go with ext4 with additional tweaking?
https://serverfault.com/questions/356507/safe-ext4-configuration-for-systems-running-unattended

I haven't used btrfs before. so not sure if that will be the correct choice.
I'm concerned about the MicrSD card life as well. will btrfs cause it to deteriorate faster?

Please advise.

Comments

  • btrfs won't save you from it.
    if you are using ext4, consider turn down the commit time, use journal first write mode or enable fsync(you can find how to do it on google)
    It's also possible that the controller or firmware of your SDCard is not well designed one(I faced once).

    Thanked by 2glitch tentor
  • You can buy slightly better SD cards but it’s just not a good technology for this.

    If you can mount it read only and put all the writes on another device then you’ll have a much happier time.

  • @blorged said:
    You can buy slightly better SD cards but it’s just not a good technology for this.

    If you can mount it read only and put all the writes on another device then you’ll have a much happier time.

    can the boot partition be read only?
    in that case, I can have /home /etc and /var on different partition.
    will it make it immune?

Sign In or Register to comment.