From owner-freebsd-fs@FreeBSD.ORG Fri May 18 17:52:28 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 3025B106564A; Fri, 18 May 2012 17:52:28 +0000 (UTC) (envelope-from freebsd@knarf.de) Received: from mail.server-king.de (mail.server-king.de [IPv6:2a01:4f8:100:41a2::25]) by mx1.freebsd.org (Postfix) with ESMTP id 643F38FC08; Fri, 18 May 2012 17:52:27 +0000 (UTC) Received: from cheese.server-king.de (localhost [127.0.0.1]) by mail.server-king.de (8.14.5/8.14.5) with ESMTP id q4IHqPqL044291 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 18 May 2012 19:52:25 +0200 (CEST) (envelope-from freebsd@knarf.de) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=knarf.de; s=mail.server-king.de; t=1337363546; bh=wiMJZlK6iR5T/+34ScABAPnNR4H/ko9xxr+ZXQpJjB4=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=ax4giC8Revj0gp6LiJuToqVD94IhEihhi5fLtlsVjo41U5CJrlQAp+TtbuZ5ergrD rihh9wY/epi4wrrTcSsi5kqbGomIgEVWeGVI1X2e99FBdhOfAeBgZ9BNYTyB8FOHbe D1jbAFu8ZMAaAQe7rDku1l7poH3eCeDGheneSF5Q= Received: (from knarf@localhost) by cheese.server-king.de (8.14.5/8.14.5/Submit) id q4IHqPSO044290; Fri, 18 May 2012 19:52:25 +0200 (CEST) (envelope-from freebsd@knarf.de) X-Authentication-Warning: cheese.server-king.de: knarf set sender to freebsd@knarf.de using -f Date: Fri, 18 May 2012 19:52:25 +0200 From: Frank Bartels To: freebsd-fs@freebsd.org Message-ID: <20120518175225.GA4735@server-king.de> References: <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> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <39C592E81AEC0B418EAD826FC1BBB09B25CF08@mailgate> User-Agent: Mutt/1.5.21 (2010-09-15) X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.7 (mail.server-king.de [127.0.0.1]); Fri, 18 May 2012 19:52:26 +0200 (CEST) Cc: 'Andriy Gapon' 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: Fri, 18 May 2012 17:52:28 -0000 Hi freebsd-fs, I have a similar problem like Martin. It started a while ago with a broken zfs, I was no longer able to delete some files on /home/ncvs: Checking setuid files and devices: find: /home/ncvs/del/efax/Attic/pkg-comment,v: Bad file descriptor find: /home/ncvs/del/libsyncml/files: No such file or directory Two days ago the machine started rebooting every two hours, directly after syncing my local cvsup-server. So I renamed the zfs /home/ncvs to /home/ncvs.del and tried to destroy it including its snapshots. The machine crashed again and now I'm unable to import the pool. First I've seen this backtrace: https://www.server-king.de/download/DSC02742.medium.JPG Then I've added the three blocks above to vdev_mirror.c. It still crashes, but the backtrace has changed: https://www.server-king.de/download/DSC02744.medium.JPG ... calltrap zio_checksum_verify zio_execute arc_read_nolock arc_read ... This is FreeBSD 8.3-RELEASE-p1 amd64 on a Xeon X5650 with 24 GByte RAM and 12 hard disks and 2 SSDs. This is what I see with zpool import -d /dev/gpt pool: zdata id: 18141461787395278116 state: ONLINE action: The pool can be imported using its name or numeric identifier. config: zdata ONLINE raidz2-0 ONLINE gpt/zdata1.eli ONLINE gpt/zdata0.eli ONLINE gpt/zdata2.eli ONLINE gpt/zdata3.eli ONLINE gpt/zdata5.eli ONLINE gpt/zdata4.eli ONLINE gpt/zdata6.eli ONLINE gpt/zdata8.eli ONLINE gpt/zdata9.eli ONLINE cache gpt/zcache0.eli gpt/zcache1.eli spares gpt/zdata7.eli logs mirror-1 ONLINE gpt/zlog0.eli ONLINE gpt/zlog1.eli ONLINE I have no idea why I don't see zcaches and zdata7 as ONLINE. If I use zpool import (without -d) I see dsk/gpt instead of gpt/ on these three disks: cache dsk/gpt/zcache0.eli dsk/gpt/zcache1.eli spares dsk/gpt/zdata7.eli Do you have any idea what I can do? I've tried 9.0-RELEASE (LiveCD) without success. Do you think using 8.3-STABLE or 9.0-STABLE could cure my problem? Thanks, Knarf On Wed, Jan 25, 2012 at 16:10:19 +0000, Martin Ranne wrote: > 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. > > 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; > } > > > Best regards, > > Martin Ranne > > >On 2012-01-23 21:31, Andriy Gapon wrote: > >>on 23/01/2012 20:33 Martin Ranne said the following: > >>Have done some checking and found mc->mc_vd == NULL in the function vdev_mirror_io_start() where the while-loop is. > >> > >>while (children--) { > >> mc = &mm->mm_child[c]; > >> zio_nowait(zio_vdev_child_io(zio, zio->io_bp, > >> mc->mc_vd, mc->mc_offset, zio->io_data, zio->io_size, > >> zio->io_type, zio->io_priority, 0, > >> vdev_mirror_child_done, mc)); > >> c++; > >>} > >> > >>if i set a break before it runs zio_nowait() it will still crash the kernel. > >>What can i check next for it to be able to continue? Is it possible to have it ignore the child where mc_vd is NULL? I am also looking into what more I can do to debug it (adding code to print to console as i can not use kernel dumps). > >> > >Not sure. If by "set a break" you mean inserting a break statement, try > >continue instead. > > > > _______________________________________________ > freebsd-fs@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-fs > To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org"