From owner-freebsd-current@FreeBSD.ORG Thu Oct 15 13:14:38 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 780B6106566B for ; Thu, 15 Oct 2009 13:14:38 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from gizmo.2hip.net (gizmo.2hip.net [64.74.207.195]) by mx1.freebsd.org (Postfix) with ESMTP id 151058FC15 for ; Thu, 15 Oct 2009 13:14:37 +0000 (UTC) Received: from [192.168.1.4] (adsl-154-199-198.ard.bellsouth.net [72.154.199.198]) (authenticated bits=0) by gizmo.2hip.net (8.14.3/8.14.3) with ESMTP id n9FDEU3o031872 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Thu, 15 Oct 2009 09:14:32 -0400 (EDT) (envelope-from rnoland@FreeBSD.org) From: Robert Noland To: Radek =?iso-8859-2?Q?Val=E1=B9ek?= In-Reply-To: <4AD710D6.70404@buchlovice.org> References: <4AD710D6.70404@buchlovice.org> Content-Type: multipart/mixed; boundary="=-fMS+j1G984RTPd8ikE1K" Organization: FreeBSD Date: Thu, 15 Oct 2009 08:14:25 -0500 Message-Id: <1255612465.2356.808.camel@balrog.2hip.net> Mime-Version: 1.0 X-Mailer: Evolution 2.26.3 FreeBSD GNOME Team Port X-Spam-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00, RCVD_IN_SORBS_DUL, RDNS_DYNAMIC, SPF_SOFTFAIL autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on gizmo.2hip.net Cc: freebsd-fs@freebsd.org, freebsd-current@freebsd.org Subject: Re: GPT boot with ZFS RAIDZ "ZFS: i/o error - all block copies unavailable" X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2009 13:14:38 -0000 --=-fMS+j1G984RTPd8ikE1K Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: 8bit On Thu, 2009-10-15 at 14:08 +0200, Radek Valášek wrote: > Hi, > > I want to ask if there is something new in adding support to > gptzfsboot/zfsboot for reading gang-blocks? I've been thinking of trying to fix this, but haven't really come up with a repeatable way to test it. I might be able to come up with at least a hack to allow booting in the short term, but if you can try this patch so that we can verify that the issue is indeed gang blocks. This doesn't fix anything yet, but it should report when it finds a gang block. I know that it is tricky to test when you can't boot, but if you can apply this patch and reinstall gptzfsboot, it should tell us for sure that gang blocks are the issue. I assume that you have a partition layout something like mine: balrog% gpart show => 34 1953525101 ada0 GPT (932G) 34 128 1 freebsd-boot (64K) 162 8388608 2 freebsd-swap (4.0G) 8388770 1945136365 3 freebsd-zfs (928G) If so, all you should need to do is get this built and then: #gpart bootcode -p /boot/gptzfsboot -i 1 ada0 substituting appropriate partition index and device info obviously. robert. > From Sun's docs: > > Gang blocks > > When there is not enough contiguous space to write a complete block, the ZIO > pipeline will break the I/O up into smaller 'gang blocks' which can later be > assembled transparently to appear as complete blocks. > > Everything works fine for me, until I rewrite kernel/world after system > upgrade to latest one (releng_8). After this am I no longer able to boot > from zfs raidz1 pool with following messages: > > >/ ZFS: i/o error - all block copies unavailable > />/ ZFS: can't read MOS > />/ ZFS: unexpected object set type lld > />/ ZFS: unexpected object set type lld > />/ > />/ FreeBSD/i386 boot > />/ Default: z:/boot/kernel/kernel > />/ boot: > />/ ZFS: unexpected object set type lld > />/ > />/ FreeBSD/i386 boot > />/ Default: tank:/boot/kernel/kernel > />/ boot: > // > /I presume it's the same issue as talked in june-2009 current mailing > list > http://lists.freebsd.org/pipermail/freebsd-current/2009-June/008589.html > > Any success in that matter? > > Thnx for answer. > > vaLin > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" -- Robert Noland FreeBSD --=-fMS+j1G984RTPd8ikE1K Content-Disposition: attachment; filename="zfs-report-gb.patch" Content-Type: text/x-patch; name="zfs-report-gb.patch"; charset="us-ascii" Content-Transfer-Encoding: 7bit diff --git a/sys/boot/zfs/zfsimpl.c b/sys/boot/zfs/zfsimpl.c index ff567a4..a2893bf 100644 --- a/sys/boot/zfs/zfsimpl.c +++ b/sys/boot/zfs/zfsimpl.c @@ -920,6 +920,11 @@ zio_read(spa_t *spa, const blkptr_t *bp, void *buf) if (!dva->dva_word[0] && !dva->dva_word[1]) continue; + if (DVA_GET_GANG(dva)) { + printf("ZFS: i/o error - gang block unimplemented!\n"); + continue; + } + vdevid = DVA_GET_VDEV(dva); offset = DVA_GET_OFFSET(dva); STAILQ_FOREACH(vdev, &spa->spa_vdevs, v_childlink) --=-fMS+j1G984RTPd8ikE1K--