From owner-freebsd-stable@freebsd.org Mon Nov 9 15:46:23 2015 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4C89EA293CA for ; Mon, 9 Nov 2015 15:46:23 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-ob0-x235.google.com (mail-ob0-x235.google.com [IPv6:2607:f8b0:4003:c01::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 13D9D1C92 for ; Mon, 9 Nov 2015 15:46:23 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by obbww6 with SMTP id ww6so116250618obb.0 for ; Mon, 09 Nov 2015 07:46:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=XtWZQWNS28xtFgcO85Q534g1j3RdiG1+R1OU3ZtW8og=; b=QB59ku98XdHNhpj2qvvKW2DWWbgHKCREQZ4aXctffMn61XEIItplezPatjol6w02ZR HbFoviVj+HoAuwXNbnpxdt/DLGEXcRo1RaRpRiP5bKt+YJL0vB6/qP/nTF2KxMrWs+F0 5C20CrB4UedHaO//AO/s8Nhh2aaO7WUp8DyBN8EYSEJVEGD0+jeUTnt0ltEiC2HaVImk sWZXhm0xodmjhDRVSVj0yTTHFglB+uNEhhZ3tnQVfIrXHVBkFhxHR45eIDmJDcu9l/3g I7STotOLv4pxt4tg6gbxWdzAfF1HJkoViKzivl8HuKrJHurs0IR/rAO1vfm69Nkz4LLf TKXg== MIME-Version: 1.0 X-Received: by 10.182.102.5 with SMTP id fk5mr17613617obb.38.1447083982343; Mon, 09 Nov 2015 07:46:22 -0800 (PST) Sender: asomers@gmail.com Received: by 10.202.0.7 with HTTP; Mon, 9 Nov 2015 07:46:22 -0800 (PST) In-Reply-To: <56404C03.10600@norma.perm.ru> References: <563BAE37.2090205@norma.perm.ru> <563BD121.4020404@FreeBSD.org> <563C406F.3090003@norma.perm.ru> <56404C03.10600@norma.perm.ru> Date: Mon, 9 Nov 2015 08:46:22 -0700 X-Google-Sender-Auth: XFqqmi7WQm1ldeqjW3ZozCkD1e0 Message-ID: Subject: Re: unable to boot a healthy zfs pool: all block copies unavailable From: Alan Somers To: "Eugene M. Zheganin" Cc: FreeBSD Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Nov 2015 15:46:23 -0000 On Mon, Nov 9, 2015 at 12:32 AM, Eugene M. Zheganin wrote: > Hi. > > On 06.11.2015 21:00, Alan Somers wrote: >> I notice that my 10.2-RELEASE VM prints the same message about "all >> block copies unavailable" and then continues to boot just fine. So I >> wonder if that part is just red herring. There is another possibility >> here: I have seen a bug where ZFS attempts to open the root pool's >> vdevs by path (eg ada0p3) but can't find them because disks have been >> replaced and no longer have their old devnames. So vdev_geom searches >> through the list of geom providers looking for any provider with the >> correct ZFS GUID. Normally it would find the right devname (eg >> ada1p3). But sometimes, because the disks are partitioned, it will >> find the wrong partition first (eg ada1). Since ZFS has labels at >> both the beginning and the end of each vdev, vdev_geom will see the >> label at the end of ada1 (really, it's the label at the end of ada1p3, >> but it shares the same LBA that a label at the end of ada1 would) and >> think that it opened ada1 successfully. vdev_geom_open will then >> return, and at some later date another part of ZFS will fail to read >> the MOS, and your boot will fail. >> > You are talking here about gptzfsboot being not smart enough, right ? > Since kernel itself is able to find that pool after being booted up from > alternative source. So it's a gptzfsboot issue, right ? > > Eugene. Actually, no. gptzfsboot successfully loaded the kernel, but the kernel couldn't load the root zpool. However, if the system had been fully booted, then libzfs + kernel would've been able to load the zpool. The normal zpool import process consists of libzfs trying to read all the vdev labels, then it tells the kernel which ones worked. But when the kernel loads the root zpool it doesn't have any help from libzfs. That's why this bug only affects booting. -Alan