From owner-freebsd-stable@FreeBSD.ORG Sat Jan 16 09:30:13 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8C1B9106566B for ; Sat, 16 Jan 2010 09:30:13 +0000 (UTC) (envelope-from delphij@gmail.com) Received: from mail-pw0-f44.google.com (mail-pw0-f44.google.com [209.85.160.44]) by mx1.freebsd.org (Postfix) with ESMTP id 629BE8FC1E for ; Sat, 16 Jan 2010 09:30:13 +0000 (UTC) Received: by pwi15 with SMTP id 15so850172pwi.3 for ; Sat, 16 Jan 2010 01:30:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=QPDlzZF4FnBnDoLSoxwvUnvoGjp6U45Dmig/3mYHOoE=; b=YJX58X440TJuJ7W6OdcTQYXP6W6jUUAIh+8yDDLpdrRHwgGo0AiEvy1bvnz8oqSMoJ K71Z3P0c/DncdyFz9L1w7ZB+6ZhVsv7M+Fe7qJR/G/NisBvf9xW+eJ+ycGwFD5PsJGme EjrIxxerPyZD2iif3NBJy94lXHqicKTqzuyOw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=uJ7fBJUIw+ZJAkXZB85o0XFF9ySPRjb9nXXG37huiPrDdUYno+VsY3C6rkBUMGGvyB XKuUKU5QyPH2HgnVRX4QR6dh8FghyGNfHxVuhKBUJ5DUUJ7u/z7RybTDklC0i5LCaK+J XzhiMdPKrVLWWFCX4+xzUwZekd86hrcRmYB5o= MIME-Version: 1.0 Received: by 10.115.26.7 with SMTP id d7mr2456492waj.12.1263634212593; Sat, 16 Jan 2010 01:30:12 -0800 (PST) In-Reply-To: <20100116015529.2fb2ca91@limbo.lan> References: <7ab0356e1001151213y5536d4cdi1d1759ce28ad546a@mail.gmail.com> <20100116015529.2fb2ca91@limbo.lan> Date: Sat, 16 Jan 2010 01:30:12 -0800 Message-ID: From: Xin LI To: Volodymyr Kostyrko Content-Type: text/plain; charset=UTF-8 Cc: freebsd-stable@freebsd.org Subject: Re: AHCI and ZFS: root mount error X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2010 09:30:13 -0000 On Fri, Jan 15, 2010 at 3:55 PM, Volodymyr Kostyrko wrote: > On Fri, 15 Jan 2010 21:13:39 +0100 > Romain Garbage wrote: > >> After setting ahci_load="YES" in /boot/loader.conf, I get a root mount error. >> ahci seems to attach to disk correctly (I get ada0 messages with no error) >> >> Without ahci_load="YES", system boots fine, with ata module attaching to disk. >> >> I have a full zfs system, set up following wiki instructions: >> http://wiki.freebsd.org/RootOnZFS/ZFSBootPartition >> (MBR scheme, ZFS in a FreeBSD slice, together with a swap partition) >> >> I'm using a GENERIC kernel, RELENG_8 branch. > > I have faced some problems that looks exactly like you say. I haven't investigated thoroughly after some quick-hack-repairs machine runs flawlessly. > > 1. I have moved to RELENG_8 from RELENG_8_0. I don't think this is it but zfsloader support was what I was looking for. > > 2. I reinitialised zfs partitions again with a boot code. But this time I used bs=512 dd option. > > 3. I recreated zpool.cache and replaced it on my pool. I believe the step 3 has fixed your issue. I believe that the zfs loader on -HEAD is less prone to this type of problems, but I am not entirely sure if it would be helpful for all-disk-name-changed case, though. So, in conclusion, in order to fix the problem, one need: Boot into an environment where you can mount ZFS partition. With a LiveFS boot, one can do this: 0) during boot, load zfs, tmpfs 1) mount a tmpfs on /boot/zfs 2) zpool import -f -R /mnt yourpool 3) set hostid to the one in your zpool, perhaps chroot into the zpool and do hostid start 4) export and re-import zpool 5) overwrite /pool/boot/zfs with /boot/zfs 6) make sure the zfs has been written down to disk 7) reboot (Steps 3-4 may be skipped in theory but I personally recommend one to do that). Cheers, -- Xin LI http://www.delphij.net