Date: Mon, 9 Nov 2015 08:46:22 -0700 From: Alan Somers <asomers@freebsd.org> To: "Eugene M. Zheganin" <emz@norma.perm.ru> Cc: FreeBSD <freebsd-stable@freebsd.org> Subject: Re: unable to boot a healthy zfs pool: all block copies unavailable Message-ID: <CAOtMX2h5bggaTyLFLVDz1ReJgL%2B_MNxP76OerrANqfwS%2BeXo_w@mail.gmail.com> In-Reply-To: <56404C03.10600@norma.perm.ru> References: <563BAE37.2090205@norma.perm.ru> <563BD121.4020404@FreeBSD.org> <563C406F.3090003@norma.perm.ru> <CAOtMX2gB_-pygSRGtaHK%2BtEHHJsAxSx4uce4Di5uAwaPbwH8KQ@mail.gmail.com> <56404C03.10600@norma.perm.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Nov 9, 2015 at 12:32 AM, Eugene M. Zheganin <emz@norma.perm.ru> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOtMX2h5bggaTyLFLVDz1ReJgL%2B_MNxP76OerrANqfwS%2BeXo_w>