From owner-freebsd-current@FreeBSD.ORG Mon Nov 16 16:59:54 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 1E6A2106566B; Mon, 16 Nov 2009 16:59:54 +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 D748D8FC1E; Mon, 16 Nov 2009 16:59:53 +0000 (UTC) Received: from [192.168.1.4] (adsl-241-172-215.bna.bellsouth.net [74.241.172.215]) (authenticated bits=0) by gizmo.2hip.net (8.14.3/8.14.3) with ESMTP id nAGGxnp1081455 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Mon, 16 Nov 2009 11:59:50 -0500 (EST) (envelope-from rnoland@FreeBSD.org) From: Robert Noland To: Emil Smolenski In-Reply-To: References: Content-Type: text/plain Organization: FreeBSD Date: Mon, 16 Nov 2009 10:59:44 -0600 Message-Id: <1258390784.2303.42.camel@balrog.2hip.net> Mime-Version: 1.0 X-Mailer: Evolution 2.26.3 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_PBL, 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: Mon, 16 Nov 2009 16:59:54 -0000 On Mon, 2009-11-16 at 17:26 +0100, Emil Smolenski wrote: > After installkernel/installworld my machine stops booting with the > following error message: > > ZFS: i/o error - all block copies unavailable > ZFS: can't read MOS > ZFS: unexpected object set type lld > > FreeBSD/i386 boot > Default: pgpool:/boot/kernel/kernel > boot: > ZFS: unexpected object set type lld > > This is 7.2-STABLE, amd64, zpool on single logical device (ciss(4), > hardware RAID5), root on ZFS (using zfsboot). After the failure I booted > the server from an external device with UFS and then I did rollback of > /usr and / datasets. The machine was still not bootable. Scrub went > without errors. > Then I read this thread and applied Robert Noland's and Matt Reimer's > patches -- and they didn't help. Then I grabbed following files from > -CURRENT (svn rev. 198420): Matt's patch only effects raidz volumes. > /sys/boot/i386/zfsboot/zfsboot.c > /sys/boot/zfs/zfs.c > /sys/boot/zfs/zfsimpl.c > /sys/cddl/boot/zfs/zfsimpl.h > > and I did: > > # cd /usr/src/sys/boot/ > # make obj ; make depend ; make > # cd i386/loader > # make install > # cd /usr/src/sys/boot/i386/zfsboot > # make install > # sysctl kern.geom.debugflags=16 > # dd if=/boot/zfsboot of=/dev/da0 count=1 > # dd if=/boot/zfsboot of=/dev/da0 skip=1 seek=1024 > # reboot > > (is this procedure of updating zfsboot correct?) This should be correct for updating the first stage bootstrap code. The loader (boot/loader) is actually updated during installworld. > After that, an error was slightly different (printf was fixed): > > ZFS: i/o error - all block copies unavailable > ZFS: can't read MOS > ZFS: unexpected object set type 0 This has my patch applied, which fixes the printf's so that they work correctly among other things. > FreeBSD/i386 boot > Default: pgpool:/boot/kernel/kernel > boot: > ZFS: unexpected object set type 0 > > Additional information: > > # zpool list > NAME SIZE USED AVAIL CAP HEALTH ALTROOT > pgpool 4.06T 2.17T 1.89T 53% ONLINE - > > # zpool status > pool: pgpool > state: ONLINE > scrub: none requested > config: > > NAME STATE READ WRITE CKSUM > pgpool ONLINE 0 0 0 > da0 ONLINE 0 0 0 > > errors: No known data errors > > # zfs list pgpool/ROOTFS > NAME USED AVAIL REFER MOUNTPOINT > pgpool/ROOTFS 568M 1.80T 55.3M legacy > > # zpool get all pgpool > NAME PROPERTY VALUE SOURCE > pgpool size 4.06T - > pgpool used 2.17T - > pgpool available 1.89T - > pgpool capacity 53% - > pgpool altroot - default > pgpool health ONLINE - > pgpool guid 3920915583055727184 - > pgpool version 13 default > pgpool bootfs pgpool/ROOTFS local > pgpool delegation on default > pgpool autoreplace off default > pgpool cachefile - default > pgpool failmode wait default > pgpool listsnapshots off default > > loader.conf: > usb_load="YES" > uplcom_load="YES" > umass_load="YES" > ugen_load="YES" > ukbd_load="YES" > random_load="YES" > loader_color="YES" > vfs.root.mountfrom="zfs:pgpool/ROOTFS" > zfs_load="YES" > autoboot_delay="2" > > FreeBSD 7.2-STABLE #0: Fri Jun 19 13:27:29 CEST 2009 > (as I mentioned above, there was the rollback) > > ciss0: port 0xe800-0xe8ff mem > 0xdef00000-0xdeffffff,0xdeeff000-0xdeefffff irq 35 at device 0.0 on pci4 > ciss0: [ITHREAD] > da0 at ciss0 bus 0 target 0 lun 0 > > I would rather not to upgrade the whole system to -CURRENT. What should I > do in this situation? Is there any other patch that I could apply or any > workaround for this issue? Is there possibility to switch from zfsboot to > gptzfsboot without loosing data? Or maybe I did something wrong? I don't think that you can switch to gptzfsboot as that would require repartitioning the device. A little more context though, was this working before? Or is this a new install? robert. -- Robert Noland FreeBSD