From owner-freebsd-fs@FreeBSD.ORG Thu Apr 7 17:42:50 2011 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 4ACD6106564A for ; Thu, 7 Apr 2011 17:42:50 +0000 (UTC) (envelope-from sunpoet@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id D79A08FC15 for ; Thu, 7 Apr 2011 17:42:49 +0000 (UTC) Received: by fxm11 with SMTP id 11so2333483fxm.13 for ; Thu, 07 Apr 2011 10:42:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=EZwcahmE1X0PtQQuQiVUM7Y/zWdyYVuGe0MyqlohykY=; b=YFT8LsyzqDPjkZE5jSt+/u7XlcgmJaKyIxs5wdpxYKd/75Fx1Sq25axTWVOmenxqx/ YIyTy4oVOvS6+NRmveTiK/3geLowuFtUn+EubY2RH//l0J82TyFFvV7m2CfiDJlqkNS3 LE8Qw+KqBpwpjsBUysCWQ0F9RxT+BvBk4JfsU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type :content-transfer-encoding; b=QoxWU3tFVmhsy814xEHN6WyYlIzZWMR1uzCWoCMLtfKnt3Vfp0w1CmChz4spiK4dhY cp18hb4Ne52Vq8B+QMNFsMUW2faoL5o6cjkm6rDomsBkbRUqz7pzIDTgUSrOJ5RQrbXR z8DSPES38+8pqAiqtZdktpHRTzp0Iq9vCGNhY= Received: by 10.223.66.70 with SMTP id m6mr1169332fai.34.1302196584213; Thu, 07 Apr 2011 10:16:24 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.79.11 with HTTP; Thu, 7 Apr 2011 10:16:04 -0700 (PDT) From: Sunpoet Hsieh Date: Fri, 8 Apr 2011 01:16:04 +0800 Message-ID: To: freebsd-fs@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [ZFS] fail to mount root from ZFS in ZFS-only booting 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, 07 Apr 2011 17:42:50 -0000 Howdy, I've done moving my machine from UFS to ZFS using mfsBSD (v28 special edition) [1]. It provides "zfsinstall" [2] script to simplify the steps. =C3=8D've compared it with other "Root on ZFS using GPT" documents [3][4] and they are compatible. I created zpool using 4 disks (ada0-ada3). However, it cannot boot from ZFS now. The zfs pool setting: - v28, raidz1 (ada0-ada3) - pool name: IRIS - ada*p1: gpart add -t freebsd-boot -s 128 ada*p2: gpart add -t freebsd-swap -s 2G ada*p3: gpart add -t freebsd-zfs - root: IRIS/root My steps are as follows: 1. Boot from mfsBSD mount -t cd9660 /dev/acd0 /cdrom zfsinstall -d ada0 -d ada1 -d ada2 -d ada3 -t /cdrom/8.2-RELEASE-amd64.tar.xz -s 2G -p IRIS remove the disc and boot from harddisk 2. update src tree (tag: RELENG_8) apply mm@'s v28 patch [5] make kernel, world and mergemaster gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada0..ada3 shutdown, attach datadisk (UFS) and power on 3. build ports and restore configuration files shutdown, detach datadisk (UFS) and power on 4. move data back (from UFS) shutdown, detach datadisk (UFS) and power on 5. I cannot boot from ZFS now! The error message is: "Trying to mount root from zfs:IRIS/root start_init: trying /sbin/init" or "MOUNT FROM ERROR:" It seems the gptzfsboot fails to mount IRIS/root during boot process I've tried the following tests. 1. In the boot prompt, "lsdev" shows zfs0 2. boot from mfsBSD and "zpool import IRIS". It's OK. 3. zpool get bootfs IRIS0 the result is "IRIS/root". It's correct. 4. When "MOUNT FROM ERROR:" occurs, "?" lists ada[0-3], ada[0-3]p[0-2] and gptid/* but no zpool (IRIS). I have no idea what happened. Did I miss any steps to upgrade system? Does anyone know how to solve this problem? Thanks in advance!! Regards, sunpoet /boot/loader.conf: zfs_load=3D"YES" vfs.root.mountfrom=3D"zfs:IRIS/root" References: [1] http://mfsbsd.vx.sk/ http://mfsbsd.vx.sk/iso/mfsbsd-se-8.2-zfsv28-amd64.iso [2] http://box.vx.sk/wsvn/mfsbsd/trunk/tools/zfsinstall [3] http://wiki.freebsd.org/RootOnZFS/GPTZFSBoot/RAIDZ1 [4] http://www.keltia.net/howtos/zfsboot [5] http://people.freebsd.org/~mm/patches/zfs/v28/stable-8-zfsv28-20110317.= patch.xz