From owner-freebsd-stable@FreeBSD.ORG Tue Oct 2 15:40:24 2012 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9A29A106564A; Tue, 2 Oct 2012 15:40:24 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id D3C5B8FC19; Tue, 2 Oct 2012 15:40:22 +0000 (UTC) Received: by lbdb5 with SMTP id b5so6500200lbd.13 for ; Tue, 02 Oct 2012 08:40:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=J7V+kI75+H7r2vWdbIw/cVdBOXMB+05I1ZT79sdJYWw=; b=AS9jpe6ZLWE6L6d1FtFYs/0zK5JN36d4lquiQC5QA7KJ82VoJdRocnURQzRMjtslG4 ZcBCMlG06S+x/KO1GB3JwXueGBo214baNPjXgcCz5XiqV6Urnf9YGLbPKciEM8bGwvs7 WLJ64kY86Mzu3NAZNMjVIbQ+kayx+5DOhg4VS7qCykH4/KTJ1/usalRoBDgyL/BRIMRf FRgKXg8rJCR0OYwGH0E7aRnXILxrXmRybfcwrlU52CYc9KzxIVDxJnSk+5wLR8vsdmDt HRchjodbPgaFeVND5DLR1YNz7UB3PmXJPRByJXV7A8OoRdUFvCv0xjdlMCQ0yMdRalnN 3n5Q== Received: by 10.112.104.36 with SMTP id gb4mr693442lbb.97.1349192421518; Tue, 02 Oct 2012 08:40:21 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (mavhome.mavhome.dp.ua. [213.227.240.37]) by mx.google.com with ESMTPS id nr2sm566710lab.5.2012.10.02.08.40.19 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 02 Oct 2012 08:40:20 -0700 (PDT) Sender: Alexander Motin Message-ID: <506B0AE1.5050303@FreeBSD.org> Date: Tue, 02 Oct 2012 18:40:17 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:13.0) Gecko/20120628 Thunderbird/13.0.1 MIME-Version: 1.0 To: geoffroy desvernay References: <506AE944.3020806@centrale-marseille.fr> <506AF15D.1010707@FreeBSD.org> In-Reply-To: <506AF15D.1010707@FreeBSD.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit Cc: freebsd-stable@FreeBSD.org, Andriy Gapon Subject: Re: ahcich reset -> cannot mount zfs root in 9.1-PRE 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: Tue, 02 Oct 2012 15:40:24 -0000 On 02.10.2012 16:51, Andriy Gapon wrote: > on 02/10/2012 16:16 geoffroy desvernay said the following: >> Hi all, >> >> Trying to upgrade a system from 9.0-RELEASE to 9.1-PRE from yesterday on >> my machine (GEOM+ZFS mirror setup on ada[01]p3), the new kernel becomes >> unable to mount root... The only way to recover is to boot from 9.0 kernel. >> The disks were already named ada[01] in 9.0, so I suspect nothing there... >> >> I tried >> - disabling AHCI in bios (no change seen) >> - change cables, check PSU, test disks with smartctl >> >> Here are some bits (via serial console): >> ahci0: port >> 0xc000-0xc007,0xb000-0xb003,0xa000-0xa007,0x9000-0x9003,0x8000-0x800f >> mem 0xfe9ff800-0xfe9ffbff irq 22 at device 18.0 on pci0 >> ahci0: AHCI v1.10 with 4 3Gbps ports, Port Multiplier supported >> ahci0: Caps: 64bit NCQ SNTF MPS AL CLO 3Gbps PM PMD SSC PSC 32cmd CCC 4ports >> ahcich0: at channel 0 on ahci0 >> ahcich0: Caps: HPCP >> ahcich1: at channel 1 on ahci0 >> ahcich1: Caps: HPCP >> ahcich2: at channel 2 on ahci0 >> ahcich2: Caps: HPCP >> ahcich3: at channel 3 on ahci0 >> ahcich3: Caps: HPCP >> ahcich0: AHCI reset... >> ahcich0: SATA connect time=100us status=00000123 >> ahcich0: AHCI reset: device found >> ahcich0: AHCI reset: device ready after 0ms >> >> The difference with 9.0 is after that: here is 9.0's next lines: (same >> for ahcich1) >> (aprobe0:ahcich0:0:15:0): Command timed out >> (aprobe0:ahcich0:0:15:0): Error 5, Retries exhausted >> (aprobe0:ahcich0:0:0:0): SIGNATURE: 0000 >> >> And 9.1-PRE's: >> (aprobe0:ahcich0:0:15:0): NOP. ACB: 00 00 00 00 00 00 00 00 00 00 00 00 >> (aprobe0:ahcich0:0:15:0): CAM status: Command timeout >> (aprobe0:ahcich0:0:15:0): Error 5, Retries exhausted >> >> In both cases ada[01] are detected and available, but with 9.1-PRE I see: >> GEOM_RAID: Promise: Disk ada0 state changed from NONE to SPARE. >> GEOM_RAID: Promise: Disk ada1 state changed from NONE to SPARE. >> >> (I see the same when I # kldload geom_raid # from running 9.0, doesn't >> breaks anything...) >> >> I attach the full boot log with 9.1-PRE (bios with NO-raid nor AHCI >> enabled, but this changes nothing in the output) >> >> I could test patches or try any command required to debug this… But for >> the moment I don't know where to search (and kernel code is far away >> from my current skills in debugging…) > > You probably need to clear RAID metadata on the disks as I think that disabling > geom_raid is not possible in 9.1-PRE. > I think that Alexander can help you more here. The right way is to clear RAID metadata on disks. If it is possible to boot from any other source, you can just do `graid delete Promise` and then reboot. Alternatively it is possible to disable geom_raid module using recently added loader tunable kern.geom.raid.enable=0. After that your system should boot and run fine. I would still recommend you to erase metadata, but after setting that tunable it will be impossible to do it via graid tool, only with manual dd surgery. In case of Promise format metadata use up to 63 last sectors of the disk. You can identify respective sectors to erase by signature "Promise Technology, Inc." in the beginning of the sector. -- Alexander Motin