From owner-freebsd-fs@FreeBSD.ORG Wed Jan 25 20:50:29 2012 Return-Path: Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 58042106566B for ; Wed, 25 Jan 2012 20:50:29 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 9CB958FC1E for ; Wed, 25 Jan 2012 20:50:28 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id WAA14087; Wed, 25 Jan 2012 22:50:23 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1Rq9nT-0006tZ-Le; Wed, 25 Jan 2012 22:50:23 +0200 Message-ID: <4F206B0E.90102@FreeBSD.org> Date: Wed, 25 Jan 2012 22:50:22 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0) Gecko/20111222 Thunderbird/9.0 MIME-Version: 1.0 To: Martin Ranne References: <39C592E81AEC0B418EAD826FC1BBB09B25031D@mailgate> <4F18459F.7040309@FreeBSD.org> <39C592E81AEC0B418EAD826FC1BBB09B252444@mailgate> <4F1858FE.7020509@FreeBSD.org> <39C592E81AEC0B418EAD826FC1BBB09B25253F@mailgate> <4F1878AC.6060704@FreeBSD.org> <39C592E81AEC0B418EAD826FC1BBB09B25284B@mailgate> <4F1AC995.7050506@FreeBSD.org> <39C592E81AEC0B418EAD826FC1BBB09B255E15@mailgate> <4F1D75CD.6050000@FreeBSD.org> <39C592E81AEC0B418EAD826FC1BBB09B25607F@mailgate> <4F1DC398.3050502@FreeBSD.org> <39C592E81AEC0B418EAD826FC1BBB09B25CF08@mailgate> In-Reply-To: <39C592E81AEC0B418EAD826FC1BBB09B25CF08@mailgate> X-Enigmail-Version: undefined Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: "'freebsd-fs@freebsd.org'" Subject: Re: zpool import reboots computer X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jan 2012 20:50:29 -0000 on 25/01/2012 18:10 Martin Ranne said the following: > Thank you everyone who have helped me with hacking zfs. We have now been able to do an import of the pool and transfered all the data to another computer. Next step is to see if we can quickly repair the pool or just delete it and make it new again. > > We hacked the functions vdev_mirror_child_select() and vdev_mirror_io_start(). In vdev_mirror_io_start() we added the code below just after the mc pointer was set in both loops. Great! I think that it might be useful for you to track down where and why the NULL value sneaks into mc_vd. Perhaps the problem is only with vdev label. > if (mc->mc_vd == NULL) { > (void) printf("mc->mc_vd is NULL. Child %i\n", c); > continue; > } > > In vdev_mirror_child_select(), we added the code below just after the mc pointer was set. > > if (mc->mc_vd == NULL) { > (void) printf("mc->mc_vd is NULL. Child %i\n", c); > mc->mc_tried = 1; > mc->mc_skipped = 1; > continue; > } -- Andriy Gapon