From owner-freebsd-questions@FreeBSD.ORG Tue Nov 23 21:57:29 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AD7511065696 for ; Tue, 23 Nov 2010 21:57:29 +0000 (UTC) (envelope-from kraduk@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 35FA98FC29 for ; Tue, 23 Nov 2010 21:57:28 +0000 (UTC) Received: by wye20 with SMTP id 20so710639wye.13 for ; Tue, 23 Nov 2010 13:57:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=WVl+29jr62BcVSttz7eXRdi3UO5Hu5qD40b5rYe/EJU=; b=CcxZ6MO13Inzd6mcGkj179eiSefv77JuFSfeQfk8xsn53yPWxGRtZRceyQ5AACP2a3 iAvOvTFWQ9pNTvI30HThrUxml//Z8QSP9w0EtZ3epxt4kEwu8j5eXieJxktowuRlR0dj F03b5EuYCKGm70Y3edhNl5LIvH8QeQvH0sxEw= 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=kZ706EqbvjbEyjcPxeIu98CmlgHrbO+/0tJWZX0xL1LVnAfs0uStFV/swnxt3i1wvF Iw+JgUVWbbyIEYUjqHzzHMMRgUAhXDqQv9sQ7uV/HT3oAz6peT7KqxcZZspkaFqE+gw0 K4HXbu3k3J79n/vj08aV3J06Xacnd9nZnwufs= MIME-Version: 1.0 Received: by 10.216.176.20 with SMTP id a20mr7160980wem.14.1290549447277; Tue, 23 Nov 2010 13:57:27 -0800 (PST) Received: by 10.216.37.132 with HTTP; Tue, 23 Nov 2010 13:57:27 -0800 (PST) In-Reply-To: <4CEC23D9.6090600@cyberleo.net> References: <4ce8b7ce.qnD6CCAK8thDasFl%perryh@pluto.rain.com> <4ceb40c8.IB5c12O9ZJa3abeh%perryh@pluto.rain.com> <4CEC23D9.6090600@cyberleo.net> Date: Tue, 23 Nov 2010 21:57:27 +0000 Message-ID: From: krad To: CyberLeo Kitsana Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: perryh@pluto.rain.com, freebsd-questions@freebsd.org Subject: Re: a gmirror disappears after adding gjournals to its partitions X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Nov 2010 21:57:29 -0000 2010/11/23 CyberLeo Kitsana > On 11/22/2010 10:19 PM, perryh@pluto.rain.com wrote: > > krad wrote: > >> On 21 November 2010 06:10, wrote: > > ... > >>> ==== manually-created config files, while still in chroot after install > >>> Fixit# cat /boot/loader.conf > >>> geom_mirror_load="YES" > >>> geom_journal_load="YES" > >>> > >>> vfs.root.mountfrom="ufs:/dev/mirror/gm0a.journal" > >>> vfs.root.mountfrom.options="rw" > > ... > >>> ==== output from kldstat, after booting the newly-installed system -- > >>> ==== and manually mounting the root FS -- showing that geom_mirror.ko > >>> ==== did get loaded. > >>> Id Refs Address Size Name > >>> 1 6 0xc0400000 bb5504 kernel > >>> 2 1 0xc0fb6000 14540 geom_journal.ko > >>> 3 1 0xc0fcb000 16ed4 geom_mirror.ko > > ... > >> sounds silly but are you loading the gmirror kernel module via > >> loader.conf > > > > Yes, I'm even setting geom_mirror_load to "YES" before setting > > geom_journal_load to "YES" (although I doubt the order of these > > settings in loader.conf makes any difference). > > > > If the kldstat Id numbers are assigned sequentially, it looks as > > if geom_journal got loaded first and this may somehow be related > > (although I don't entirely see how -- absent geom_mirror to make gm0 > > and its partitions visible, I'd think that geom_journal "should not" > > be able to find its metadata at all). > > From what I've found, this is because there is no taste difference > between a bsdlabel on a gmirror and a bsdlabel on a non-mirror. > > Since both gmirror and gjournal are greedy (they take exclusive access > of their parent providers upon successful taste, and not upon exclusive > access to their own providers like glabel), the first one to > successfully taste and start is the winner; the other will never get to > taste those devices. > > The trick here is to either make the two look different somehow (use a > different geom that stores its metadata at the beginning of the > provider, instead of the end, thus eliminating ambiguity in the bsdlabel > taste), or to make the inner geom avoid the outer devices (hardcode > provider names in metadata). Since you have an outer geom that provides > a static name, hardcoding the name of the gmirror into the gjournal > metadata shouldn't cause anything to break if your disks change places, > either. > > http://pb.cyberleo.net/?show=m7fcbcef7 > > -- > Fuzzy love, > -CyberLeo > Technical Administrator > CyberLeo.Net Webhosting > http://www.CyberLeo.Net > > > Furry Peace! - http://wwww.fur.com/peace/ > I think what he is saying is slice it up 1st, then mirror the slices, and slap the journal on top of that