From owner-freebsd-ia64@FreeBSD.ORG Fri Jul 31 08:56:03 2009 Return-Path: Delivered-To: freebsd-ia64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF22A106566B; Fri, 31 Jul 2009 08:56:03 +0000 (UTC) (envelope-from spambox@haruhiism.net) Received: from fujibayashi.jp (karas.fujibayashi.jp [77.221.159.4]) by mx1.freebsd.org (Postfix) with ESMTP id 5B90B8FC12; Fri, 31 Jul 2009 08:56:03 +0000 (UTC) (envelope-from spambox@haruhiism.net) Received: from [192.168.0.2] (unknown [91.122.47.189]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by fujibayashi.jp (Postfix) with ESMTPSA id 419D478FB8; Fri, 31 Jul 2009 12:56:01 +0400 (MSD) Message-ID: <4A72B1A7.3090806@haruhiism.net> Date: Fri, 31 Jul 2009 12:56:07 +0400 From: Kamigishi Rei User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) MIME-Version: 1.0 To: Anton Shterenlikht References: <4A7271DE.7070702@p6m7g8.com> <6201873e0907302246r10033969p1651104b6e0598cf@mail.gmail.com> <20090731083857.GA58821@mech-cluster241.men.bris.ac.uk> In-Reply-To: <20090731083857.GA58821@mech-cluster241.men.bris.ac.uk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "Philip M. Gollucci" , Adam Vande More , questions@freebsd.org, freebsd-ia64@freebsd.org, freebsd-current@freebsd.org Subject: Re: gmirror / crash dumps X-BeenThere: freebsd-ia64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the IA-64 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Jul 2009 08:56:04 -0000 Anton Shterenlikht wrote: >>> 4) I have the following in my 7-stable kernel >>> The long and the short of it is I don't get any dumps. >>> I read somewhere that you can't dump onto a gmirror device. >>> >> That is incorrect, but I don't know the cause of your problem. I run >> nothing but gmirror and dumps happen here. >> > I was also told that > "you won't get a valid dump if your dumpdev > is on a GEOM_MIRROR device" > On 7.x, you have a 'legal' way to run gmirror -v prefer before savecore is run. In -current, the corresponding rc file (alas, I forgot its name) is removed. I tried adding "gmirror -v prefer /dev/mirror0" to savecore rc.d file, but to no such luck. The problem here is the order of startup for the drives inside the mirror; the first drive in the array that started during the boot when the panic occurred has to be the preferred device during savecore - and when this condition is met, you will get a valid dump. i.e. let's assume that the system boots like GEOM_MIRROR: Device gm0: provider ada0 detected. GEOM_MIRROR: Device gm0: provider ada0 activated. GEOM_MIRROR: Device gm0: provider ada1 detected. GEOM_MIRROR: Device gm0: provider ada1 activated. GEOM_MIRROR: Device gm0: provider mirror/mirror0 launched. This makes us think that ada0 is the first drive to launch. Therefore, it's the drive where the dump will be saved during a panic. So we add gmirror configure -v prefer /dev/mirror/mirror0 /dev/ada0 (correct my syntax if I'm wrong here; tried it a month ago) to /etc/rc.d/savecore right before the savecore call. We do stuff, configure, build kernels, rebuild 'em, etc, reboot, and the system comes up GEOM_MIRROR: Device gm0: provider ada1 detected. GEOM_MIRROR: Device gm0: provider ada1 activated. GEOM_MIRROR: Device gm0: provider ada0 detected. GEOM_MIRROR: Device gm0: provider ada0 activated. GEOM_MIRROR: Device gm0: provider mirror/mirror0 launched. without us noticing. And that's it; if it panics now, savecore won't save the crash dump because ada0 doesn't have it. -- Kamigishi Rei KREI-RIPE