[OpenIndiana-discuss] What happens when a ZIL drive dies?
Bob Friesenhahn
bfriesen at simple.dallas.tx.us
Tue Jun 5 17:41:24 UTC 2012
On Tue, 5 Jun 2012, Nick Hall wrote:
>
> I'm just wondering, for my own personal knowledge and for anyone else who
> finds this thread later, for some clarification on the above quote. So, if
> I'm understanding this correctly, are you saying that, say I have an
> application and it writes to file A, then it writes to file B, then it
> writes to file C, then finally calls fsync, that there could be a case
> where if the computer crashed and at the same time the SLOG got fried
> (after files A B and C were written to, but before the sync was finished),
> then upon restart, the write to file B may have taken affect on the pool
> but the write to file A wouldn't be on there? Or am I misunderstanding?
While this is the case with most popular filesystems, I don't think
that it is the case for zfs if the zil went missing at power-up. ZFS
always uses ordered writes with transaction groups and each
transaction group represents a loss point/barrier. If the system had
a working zil and the system lost power, then the sync writes in the
zil would be used to update the filesystem so that async data since
the last TXG would be missing while the sync data is now there. Due
to this, it is wise to be consistent about how related data is
written.
Bob
--
Bob Friesenhahn
bfriesen at simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/
More information about the OpenIndiana-discuss
mailing list