Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Dec 2010 15:17:51 +1100
From:      Jean-Yves Avenard <jyavenard@gmail.com>
To:        freebsd-stable@freebsd.org
Subject:   Re: New ZFSv28 patchset for 8-STABLE: Kernel Panic
Message-ID:  <AANLkTimNv1%2BfL2KUrxLoTO2oQ=ziOO6raWT5TMZJkH4f@mail.gmail.com>
In-Reply-To: <AANLkTinxvU_QuAd6SG1hig7-YeC8tCdwAmwgL1AXfHNN@mail.gmail.com>
References:  <AANLkTinxvU_QuAd6SG1hig7-YeC8tCdwAmwgL1AXfHNN@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Responding to myself again :P

On 27 December 2010 13:28, Jean-Yves Avenard <jyavenard@gmail.com> wrote:
> tried to force a zpool import
>
> got a kernel panic:
> panic: solaris assert: weight >=3D space && weight <=3D 2 * space, file:
> /usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs=
/metaslab.c,
> line: 793
>
> cpuid =3D 5
> KDB: stack backtrace
> #0: 0xffffffffff805f64be at kdb_backtrace
> #1 .. =A0panic+0x187
> #2 .. metaslab_weight+0xe1
> #3: metaslab_sync_done+0x21e
> #4: vdev_sync_done
> #5: spa_sync+0x6a2
> #6 txg_sync_thread+0x147
> #7: fork_exit+0x118
> #8: fork_trampoline+0xe
>
> uptime 2m25s..
>

Command used to import in FreeBSD was:
zpool import -fF -R / pool
which told me that zil was missing, and to use -m

I booted openindiana (which is the only distribution I could ifnd with
a live CD supporting zpool v28)

Doing a zpool import actually made it show that the pool had
successfully been repaired by the command above.
It did think that the pool was in use (and it was, as I didn't do a
zpool export).

So I run zpool import -f pool in openindiana, and luckily, all my
files were there. Not sure if anything was lost...

in openindiana, I then ran zpool export and rebooted into FreeBSD.

I ran zpool import there, and got the same original behaviour of a
zpool import hanging, I can't sigbreak it nothing. Only left with the
option of rebooting.

Back into openindiana, tried to remove the log drive, but no luck.
Always end up with the message:
cannot remove log: no such device in pool

Googling that error seems to be a common issue when trying to remove a
ZIL but while that message is displayed, the log drive is actually
removed.
Not in my case..

So I tried something brave:
In Open Indiana
zpool export pool

rebooted the PC, disconnected the SSD drive I had use and rebooted
into openindiana
ran zpool import -fF -R / pool (complained that log device was
missing) and again zpool import -fF -m -R / pool

zfs status showed that logs device being unavailable this time.

ran zpool remove pool log hex_number_showing_in_place

It showed the error "cannot remove log: no such device in pool"
but zpool status showed that everything was allright

zpool export pool , then reboot into FreeBSD

zpool import this time didn't hang and successfully imported my pool.
All data seems to be there.


Summary: v28 is still buggy when it comes to removing the log
device... And once something is screwed, zpool utility becomes
hopeless as it hangs.

So better have a OpenIndiana live CD to repair things :(

But I won't be trying to remove the log device for a long time ! at
least the data can be recovered when it happens..

Could it be that this is related to the v28 patch I used
(http://people.freebsd.org/~mm/patches/zfs/v28/stable-8-zfsv28-20101223-nop=
ython.patch.xz
and should have stuck to the standard one).

Jean-Yves
Breezing again !



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTimNv1%2BfL2KUrxLoTO2oQ=ziOO6raWT5TMZJkH4f>