Panic on ZFS startup after crash
Pawel Jakub Dawidek
pjd at FreeBSD.org
Mon Jul 21 14:28:02 UTC 2008
On Mon, Jul 21, 2008 at 03:51:56PM +0200, Pawel Jakub Dawidek wrote:
> On Mon, Jul 21, 2008 at 03:49:24PM +0200, Daniel Eriksson wrote:
> > Pawel Jakub Dawidek wrote:
> >
> > > I'm afraid your pool's metadata is
> > > somehow corrupted that ZFS can't handle that.
> >
> > Yes, that's my conclusion also. It looks like the intent log is messed
> > up enough to trigger an assert while ZFS tries to parse/replay it.
> >
> > > I saw warnings in your
> > > first e-mail about ZFS not beeing able to replay ZIL. Can you try
> > > disabling ZIL? Something like:
> >
> > I've already tried this, and it made no difference. When the box crashed
> > ZIL was enabled, and for some reason garbage got written into the ZIL.
> > Now whenever ZFS tries to import the pool it sees a non-empty ZIL and
> > tries to parse/replay it.
> >
> > Is there an easy way to trick ZFS into thinking the ZIL is empty?
>
> I'll check that.
Ok. We may try not to replay the ZIL, but leave it there and see what
will happen. We can also try to destroy the ZIL without replaying it.
What we do from now on can mess up your pool even further, so you may
want to backup entire disks if you want.
To skip replaying the ZIL you need to edit
/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c file, find
zil_replay() function and make the head of it looks like this:
void
zil_replay(objset_t *os, void *arg, uint64_t *txgp,
zil_replay_func_t *replay_func[TX_MAX_TYPE])
{
zilog_t *zilog = dmu_objset_zil(os);
const zil_header_t *zh = zilog->zl_header;
zil_replay_arg_t zr;
/* XXX: Try to skip the ZIL replay. */
return;
if (zil_empty(zilog)) {
zil_destroy(zilog, B_TRUE);
return;
}
[...]
If that won't work, we can try to destroy the ZIL without replaying it:
void
zil_replay(objset_t *os, void *arg, uint64_t *txgp,
zil_replay_func_t *replay_func[TX_MAX_TYPE])
{
zilog_t *zilog = dmu_objset_zil(os);
const zil_header_t *zh = zilog->zl_header;
zil_replay_arg_t zr;
/* XXX: Destroy the ZIL without replaying it. */
zil_destroy(zilog, B_FALSE);
return;
if (zil_empty(zilog)) {
zil_destroy(zilog, B_TRUE);
return;
}
[...]
--
Pawel Jakub Dawidek http://www.wheel.pl
pjd at FreeBSD.org http://www.FreeBSD.org
FreeBSD committer Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20080721/eedd1850/attachment.pgp
More information about the freebsd-stable
mailing list