Comment by viraptor

4 years ago

Slightly related: if a drive runs with a properly journaled, fully checksummed filesystem, for example zfs or btrfs - does the write-through mode guarantee that you can only lose new data and not corrupt the old?

Found it kind of answered in the side thread: https://mobile.twitter.com/marcan42/status/14942278033275985...

In short - no, you'll still see corruption.

  • No, you won't see corruption on ZFS. Cutting power to the drive is always safe, you can slice a SATA cable with a guillotine if you want, you'll always see a consistent state of the filesystem. ZFS transactions are entirely atomic.

    ZFS (and btrfs) is not "journaled", it's copy-on-write.

    • You won't see corruption of the filesystem itself, but you'll see data corruption as described in the thread. If the writes are delayed, the write ordering can get messed up. + Zfs has ZIL, which is basically journal equivalent.

      1 reply →

  • Filesystem corruption on ZFS would indicate that REQ_PREFLUSH is not being implemented correctly by either the hardware or the device driver.