Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Nov 2009 15:48:03 -0800
From:      Matt Reimer <mattjreimer@gmail.com>
To:        Emil Smolenski <ambsd@raisa.eu.org>
Cc:        freebsd-fs@freebsd.org, freebsd-current@freebsd.org, Robert Noland <rnoland@freebsd.org>
Subject:   Re: Boot with ZFS on single disk: "ZFS: i/o error - all block copies  unavailable" [was: Re: GPT boot with ZFS RAIDZ "ZFS: i/o error - all block copies unavailable"]
Message-ID:  <f383264b0911181548r3b9cce46i449e4e589148a62d@mail.gmail.com>
In-Reply-To: <1258562628.2303.83.camel@balrog.2hip.net>
References:  <op.u3hw9wl0qvde5b@am-laptop.local.org> <1258390784.2303.42.camel@balrog.2hip.net> <op.u3h252qaqvde5b@bolt.zol> <op.u3j6m8w5qvde5b@bolt.zol> <1258497221.2303.66.camel@balrog.2hip.net> <op.u3kdq613qvde5b@bolt.zol> <1258552247.2303.75.camel@balrog.2hip.net> <op.u3llw0plqvde5b@am-laptop.local.org> <1258562628.2303.83.camel@balrog.2hip.net>

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

[-- Attachment #1 --]
On Wed, Nov 18, 2009 at 8:43 AM, Robert Noland <rnoland@freebsd.org> wrote:
> On Wed, 2009-11-18 at 17:11 +0100, Emil Smolenski wrote:
>> On Wed, 18 Nov 2009 14:50:47 +0100, Robert Noland <rnoland@freebsd.org>
>> wrote:
>>
>> >> >> Should I file a PR? I would
>> >> >> like to help in debugging it (however my skills in low-level C aren't
>> >> >> strong enough to do it on my own).
>> >> > Ok, the first thing I would like to see is "zdb -uuu".
>> >> # zdb -uuu pgpool
>> >> Segmentation fault: 11 (core dumped)
>>
>> > Ok, this is disturbing...  It works fine for me on -CURRENT / amd64 and
>> > reports the root block pointer, which is what we need to locate the MOS.
>>
>>   Booting from 8.0-*-amd64-memstick.img (Fixit# console) makes "zdb -uuu"
>> happy:
>>
>> Fixit# zdb -uuu pgpool
>> Uberblock
>>
>>          magic = 0000000000bab10c
>>          version = 13
>>          txg = 443448
>>          guid_sum = 9780688847620645377
>>          timestamp = 1258560175 UTC = Wed Nov 18 16:02:55 2009
>>          rootbp = [L0 DMU objset] 400L/200P DVA[0]=<0:220000de400:200>
>> DVA[1]=<0:2a80008ee00:200> DVA[2]=<0:330000b9000:200> fletcher4 lzjb LE
>> contiguous birth=443448 fill=298
>> cksum=8a9775385:3935d6d58c7:c028430c00a8:1b58ac4ebf42ac
>
> Ok, the offsets are definately up there... What is your normal
> installation?  8.0 i386?

Robert's on to something. It looks like your LBAs are probably
overflowing 32 bits. This would affect all vdev regardless of type.

Try the attached patch.

Matt

[-- Attachment #2 --]
--- i386/zfsboot/zfsboot.c.orig	2009-10-24 18:10:29.000000000 -0700
+++ i386/zfsboot/zfsboot.c	2009-11-18 15:36:34.000000000 -0800
@@ -163,7 +163,7 @@
 static void printf(const char *,...);
 static void putchar(int);
 static uint32_t memsize(void);
-static int drvread(struct dsk *, void *, unsigned, unsigned);
+static int drvread(struct dsk *, void *, uint64_t, unsigned);
 static int keyhit(unsigned);
 static int xputc(int);
 static int xgetc(int);
@@ -310,7 +311,8 @@
 vdev_read(vdev_t *vdev, void *priv, off_t off, void *buf, size_t bytes)
 {
 	char *p;
-	unsigned int lba, nb;
+	uint64_t lba;
+	unsigned int nb;
 	struct dsk *dsk = (struct dsk *) priv;
 
 	if ((off & (DEV_BSIZE - 1)) || (bytes & (DEV_BSIZE - 1)))
@@ -949,7 +951,7 @@
 #endif
 
 static int
-drvread(struct dsk *dsk, void *buf, unsigned lba, unsigned nblk)
+drvread(struct dsk *dsk, void *buf, uint64_t lba, unsigned nblk)
 {
 #ifdef GPT
     static unsigned c = 0x2d5c7c2f;

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