From owner-freebsd-fs@FreeBSD.ORG Thu Jul 16 12:26:04 2009 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 79DFF1065670 for ; Thu, 16 Jul 2009 12:26:04 +0000 (UTC) (envelope-from stb@lassitu.de) Received: from koef.zs64.net (koef.zs64.net [212.12.50.230]) by mx1.freebsd.org (Postfix) with ESMTP id EE17A8FC23 for ; Thu, 16 Jul 2009 12:26:03 +0000 (UTC) (envelope-from stb@lassitu.de) Received: from localhost by koef.zs64.net (8.14.3/8.14.3) with ESMTP id n6GC6Kn7077092 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Thu, 16 Jul 2009 14:06:21 +0200 (CEST) (envelope-from stb@lassitu.de) (authenticated as stb) From: Stefan Bethke To: noackjr@alumni.rice.edu In-Reply-To: X-Priority: 3 (Normal) References: <9461581F-F354-486D-961D-3FD5B1EF007C@rabson.org> <20090201072432.GA25276@server.vk2pj.dyndns.org> <246ecf0c87f944d70c5562eeed4165c9@mail.rabson.org> <9cc826f0720e1624489dd6e6d384babc.squirrel@www.noacks.org> Message-Id: <67089745-3E3B-45CF-B4E8-91F3B52C8A4C@lassitu.de> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v935.3) Date: Thu, 16 Jul 2009 14:06:19 +0200 X-Mailer: Apple Mail (2.935.3) Cc: freebsd-fs@freebsd.org Subject: Re: Booting from ZFS raidz 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: Thu, 16 Jul 2009 12:26:04 -0000 Am 12.07.2009 um 09:06 schrieb Jonathan Noack: > Anyone know how I should proceed? I'm really frustrated that I > haven't > been able to get this working. Me too. I just decided to revisit this, and unfortunatly, I'm still stuck with the loader having trouble reading blocks off the raidz1 volume. I've updated the creation script (see below). This is on r195709, with LOADER_ZFS_SUPPORT?=YES in /etc/make.conf. Boot output, transcribed by hand: error 4 lba 4290782259 error 4 lba 4290782258 error 4 lba 4290782259 error 4 lba 4290782258 error 4 lba 4290782257 error 4 lba 4290782257 ... error 4 lba 4292652987 error 4 lba 4292652986 error 4 lba 4292652987 BTX loader 1.00 BTX version is 1.02 Consoles: internal video/keyboard BIOS drive A: is disk0 BIOS drive C: is disk1 BIOS drive D: is disk2 BIOS drive E: is disk3 BIOS 638kB/2095040kB available memory FreeBSD/i386 bootstrap loader, Revision 1.1 (root@freebsd-current-lassitu.de, Wed Jul 15 19:31.22 CEST 2009) Loading /boot/defaults/loader.conf ZFS: i/o error - all block copies unavailable ZFS: i/o error - all block copies unavailable ... (about 10 more of these) Unable to load a kernel! can't load 'kernel' Then the prompt. My setup script: # cat prepare-zfs-boot #!/bin/sh idx=0 label() { dd if=/dev/zero of=/dev/$1 bs=1m count=10 sz="$(diskinfo /dev/$1 | awk '{print $4}')" echo $sz gpart destroy $1 gpart create -s gpt $1 gpart add -b 34 -s 128 -t freebsd-boot -l "boot${idx}" $1 gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 $1 gpart add -b 512 -s $(($sz-1024)) -t freebsd-zfs -l "zfs${idx}" $1 gpart list $1 idx="$((idx+1))" } set -x zpool destroy zroot label da1 label da2 label da3 zpool create zroot raidz /dev/gpt/zfs[0-2] zpool set bootfs=zroot zroot zfs create -V 1gb zroot/swap zfs set org.freebsd:swap=on zroot/swap zfs set checksum=off zpool/swap cd /usr/src && make installworld installkernel distribution DESTDIR=/ zroot cp /boot/loader.conf /zroot/boot/loader.conf echo 'zfs_load="YES"' >>/zroot/boot/loader.conf echo 'vfs.root.mountfrom="zfs:zroot"' >>/zroot/boot/loader.conf zpool export zroot zpool import zroot cp /boot/zfs/zpool.cache /zroot/boot/zfs/ zfs set mountpoint=legacy zroot # eof -- Stefan Bethke Fon +49 151 14070811