Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 31 Jul 2009 12:56:07 +0400
From:      Kamigishi Rei <spambox@haruhiism.net>
To:        Anton Shterenlikht <mexas@bristol.ac.uk>
Cc:        "Philip M. Gollucci" <pgollucci@p6m7g8.com>, Adam Vande More <amvandemore@gmail.com>, questions@freebsd.org, freebsd-ia64@freebsd.org, freebsd-current@freebsd.org
Subject:   Re: gmirror / crash dumps
Message-ID:  <4A72B1A7.3090806@haruhiism.net>
In-Reply-To: <20090731083857.GA58821@mech-cluster241.men.bris.ac.uk>
References:  <4A7271DE.7070702@p6m7g8.com>	<6201873e0907302246r10033969p1651104b6e0598cf@mail.gmail.com> <20090731083857.GA58821@mech-cluster241.men.bris.ac.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4A72B1A7.3090806>