Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Oct 2009 08:14:25 -0500
From:      Robert Noland <rnoland@FreeBSD.org>
To:        Radek =?iso-8859-2?Q?Val=E1=B9ek?= <valin@buchlovice.org>
Cc:        freebsd-fs@freebsd.org, freebsd-current@freebsd.org
Subject:   Re: GPT boot with ZFS RAIDZ "ZFS: i/o error - all block copies unavailable"
Message-ID:  <1255612465.2356.808.camel@balrog.2hip.net>
In-Reply-To: <4AD710D6.70404@buchlovice.org>
References:  <4AD710D6.70404@buchlovice.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--=-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 <rnoland@FreeBSD.org>
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--




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1255612465.2356.808.camel>