you are viewing a single comment's thread
view the rest of the comments
[–] 6 points 2 months ago (3 children)

Modern filesystems can corrupt as well with unclean shutdown. They are just less likely to do so. My server stores photos of our life over couple of decades with other nearly irreplaceable data so having the UPS and clean shutdown on power loss gives at least some confidence that the files stay where they are.

Of course I also run backups of the data, but it's another layer on data safety setup.

  • source
  • parent
  • hideshow 3 child comments
  • [–] 2 points 2 months ago (2 children)

    Modern filesystems can corrupt as well with unclean shutdown. They are just less likely to do so.

    It shouldn't be possible for them to become corrupt on an unclean shutdown, at all. Not at the filesystem level. It isn't just a question of probability.

    It's possible that there is some bug in the implementation of a filesystem that causes it to violate its guarantees.

    There could be, oh...hardware bugs, say, where hardware violates guarantees.

    Files can be partially-written. Software might not handle that, though properly-written software designed like a DBMS will be set up so that a partially-written file will not become corrupt at the file level.

    Some filesystems permit disabling features that guard against filesystem corruption.

    But absent something like that, it should not be possible for one of the filesystems to become corrupt on an unclean shutdown, at all.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 4 points 2 months ago (1 child)

    Not all modern filesystems are CoW like btrfs. ext4 is merely journaled, which means that there are rare instances where it can be corrupted, but recovery is fast. However in both cases you can still end up with individualy inconsistent files if, say, the power goes out while the CoW b-tree is percolating up and so the file never gets updated or if the ram cache never has a chance to flush.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 2 points 2 months ago* (last edited 2 months ago)

    ext4 is merely journaled, which means that there are rare instances where it can be corrupted, but recovery is fast.

    None of these things mean that the filesystem becomes corrupted; the filesystem will be in a filesystem consistent state when remounted. You can have a write that is partially performed on a file, but that does not cause the filesystem to become corrupt when it does not complete being written. The journal can contain that write, but it can not yet be committed, and won't yet be visible to a user. But that doesn't make the filesystem corrupt; the commit itself is atomic.

  • source
  • parent