1

If sync=disabled is set, I understand that the ZIL isn't written to disk and, instead, changes are written directly to disk. Aside from possibly inconsistent data from an application-standpoint due, especially in networked situations where data that is supposedly committed is not and thus not written after storage comes back on-line, are there any other data corruption risks? More specifically, if I have a snapshot I have previously taken of the data, is that data at risk of being corrupted?

For example, suppose I have some kiosk machines running off an iSCSI volume that I restore to a snapshot daily. Suppose, further, that I've disabled sync and the server crashes mid-write (perhaps updating some file system structures). Is it guaranteed that if I run a zfs rollback operation that the snapshot I roll back to is still consistent and that any other volumes in the same pool (say, with sync=always) are not trashed?

If it matters, I'm running Solaris 11.3 or 11.4.

lungj
  • 386
  • 2
  • 13

1 Answers1

1

The short answer is that snapshots cannot be corrupted by future writes, even when you’ve disabled the ZIL. Also, nothing you do to one dataset should affect any other dataset (besides properties being inherited from parent dataset to child dataset, but that doesn’t affect the data itself). Old data could be corrupted if there’s a cosmic ray, or a major bug causing data to be overwritten (which I have never heard of), but either of those would be detected through checksum failures.

Of course, if sync is disabled when you take the snapshot, you might end up with application-level corruptions (same guarantees as if you crash and reboot). That has nothing to do with writes after the snapshot though.

Dan
  • 1,088