From owner-freebsd-fs@FreeBSD.ORG Sun Sep 15 10:28:57 2013 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 6797C416 for ; Sun, 15 Sep 2013 10:28:57 +0000 (UTC) (envelope-from ronald-freebsd8@klop.yi.org) Received: from cpsmtpb-ews05.kpnxchange.com (cpsmtpb-ews05.kpnxchange.com [213.75.39.8]) by mx1.freebsd.org (Postfix) with ESMTP id CD20429AF for ; Sun, 15 Sep 2013 10:28:56 +0000 (UTC) Received: from cpsps-ews01.kpnxchange.com ([10.94.84.168]) by cpsmtpb-ews05.kpnxchange.com with Microsoft SMTPSVC(7.5.7601.17514); Sun, 15 Sep 2013 12:27:45 +0200 Received: from CPSMTPM-TLF101.kpnxchange.com ([195.121.3.4]) by cpsps-ews01.kpnxchange.com with Microsoft SMTPSVC(7.5.7601.17514); Sun, 15 Sep 2013 12:27:45 +0200 Received: from sjakie.klop.ws ([212.182.167.131]) by CPSMTPM-TLF101.kpnxchange.com with Microsoft SMTPSVC(7.5.7601.17514); Sun, 15 Sep 2013 12:27:45 +0200 Received: from 212-182-167-131.ip.telfort.nl (localhost [127.0.0.1]) by sjakie.klop.ws (Postfix) with ESMTP id 8889116AB8 for ; Sun, 15 Sep 2013 12:27:44 +0200 (CEST) Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes To: freebsd-fs@freebsd.org Subject: Re: Mounting from zfs failed with error 22 with gmirror References: <5234BE9E.1030308@FreeBSD.org> Date: Sun, 15 Sep 2013 12:27:44 +0200 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: "Ronald Klop" Message-ID: In-Reply-To: <5234BE9E.1030308@FreeBSD.org> User-Agent: Opera Mail/12.16 (FreeBSD) X-OriginalArrivalTime: 15 Sep 2013 10:27:45.0175 (UTC) FILETIME=[37875A70:01CEB1FE] X-RcptDomain: freebsd.org X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Sep 2013 10:28:57 -0000 On Sat, 14 Sep 2013 21:53:02 +0200, Daniel Gerzo wrote: > Hello list, > > I have come across this thing and I don't have an idea what to do next. > > I have this partition setup: > > [root@rescue ~]# gpart show > => 34 3907029101 ada0 GPT (1.8T) > 34 6 - free - (3.0k) > 40 1024 1 freebsd-boot (512k) > 1064 83886080 2 freebsd-swap (40G) > 83887144 3823141984 3 freebsd-zfs (1.8T) > 3907029128 7 - free - (3.5k) > > => 34 3907029101 ada1 GPT (1.8T) > 34 6 - free - (3.0k) > 40 1024 1 freebsd-boot (512k) > 1064 83886080 2 freebsd-swap (40G) > 83887144 3823141984 3 freebsd-zfs (1.8T) > 3907029128 7 - free - (3.5k) > > [root@rescue ~]# gpart show -l > => 34 3907029101 ada0 GPT (1.8T) > 34 6 - free - (3.0k) > 40 1024 1 boot0 (512k) > 1064 83886080 2 swap0 (40G) > 83887144 3823141984 3 sys0 (1.8T) > 3907029128 7 - free - (3.5k) > > => 34 3907029101 ada1 GPT (1.8T) > 34 6 - free - (3.0k) > 40 1024 1 boot1 (512k) > 1064 83886080 2 swap1 (40G) > 83887144 3823141984 3 sys1 (1.8T) > 3907029128 7 - free - (3.5k) > [root@rescue ~]# zpool import -f -o altroot=/mnt -o > cachefile=/boot/zfs/zpool.cache sys > [root@rescue ~]# zpool status > pool: sys > state: ONLINE > scan: none requested > config: > > NAME STATE READ WRITE CKSUM > sys ONLINE 0 0 0 > mirror-0 ONLINE 0 0 0 > gpt/sys0 ONLINE 0 0 0 > gpt/sys1 ONLINE 0 0 0 > > errors: No known data errors > [root@rescue ~]# zdb > sys: > version: 28 > name: 'sys' > state: 0 > txg: 13622 > pool_guid: 13749191682008517984 > hostid: 966392425 > hostname: 'rescue' > vdev_children: 1 > vdev_tree: > type: 'root' > id: 0 > guid: 13749191682008517984 > children[0]: > type: 'mirror' > id: 0 > guid: 10821644781744913225 > metaslab_array: 30 > metaslab_shift: 34 > ashift: 12 > asize: 1957443928064 > is_log: 0 > create_txg: 4 > children[0]: > type: 'disk' > id: 0 > guid: 12516881521540558071 > path: '/dev/gpt/sys0' > phys_path: '/dev/gpt/sys0' > whole_disk: 1 > create_txg: 4 > children[1]: > type: 'disk' > id: 1 > guid: 187152467666907385 > path: '/dev/gpt/sys1' > phys_path: '/dev/gpt/sys1' > whole_disk: 1 > create_txg: 4 > [root@rescue ~]# zpool get bootfs sys > NAME PROPERTY VALUE SOURCE > sys bootfs sys/default/root local > [root@rescue ~]# gmirror status > Name Status Components > mirror/swap COMPLETE ada1p2 (ACTIVE) > ada0p2 (ACTIVE) > > The problem is that while I do not load geom_mirror from loader.conf, > the machine boots fine, however as soon as I enable gmirror in > loader.conf the machine doesn't boot and errors with > > /Trying to mount root from zfs:sys/default/root [].../ > > /Mounting from zfs:sys/default/root failed with error 22. > / > > > and it hangs in the prompt asking me to enter device to mount root from. > > I found only this > http://lists.freebsd.org/pipermail/freebsd-current/2012-November/037910.html > email where avg@ mentions that it might be a bug in his code, but no > further followups. However that is almost a year ago and I got trapped > by this on 9.2-RC4. > > Could anyone possibly give me some hints? (Please keep in in cc: as I am > not subscribed to fs@) > > Thank you in advance! > > Kind regards, > Daniel Is it possible you used these disks with gmirror in the past and you did not correctly clean the meta-data from the disks when you started using zfs? So gmirror now detects meta-data, starts handling the disks in some way and zfs does not get all the sectors of the disk it is expecting? Ronald.