From owner-freebsd-geom@FreeBSD.ORG Mon Sep 24 19:44:57 2007 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ACB5316A469 for ; Mon, 24 Sep 2007 19:44:57 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from rv-out-0910.google.com (rv-out-0910.google.com [209.85.198.188]) by mx1.freebsd.org (Postfix) with ESMTP id 86A8613C459 for ; Mon, 24 Sep 2007 19:44:57 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: by rv-out-0910.google.com with SMTP id l15so1345827rvb for ; Mon, 24 Sep 2007 12:44:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=/uiOsO6nv9tnZi4Rc5VHtzVEnlFEHa1sCU+u8xBRiOo=; b=elBe1l+3C5y8uWm6nKpcuyu/zgUH/CR7FJlbFw+CXZ1oizF3Dskn6cpVizO/lurKrjIJVPWzFvO+0Y7bat/zw99R1GuT54N9lsNL7V35qUA8LdepCAKIeEW1Civcyy7/m88NIS/avi9d2/yThniai5aQs6ZzqtiSbk2CvY6kpSI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=igQnLNCZTfv85cD3Ke4pmr+fXSqlwMIL9rVptyjjbYD+C3tdw6ryFxBFCjx/RZNRPbL/kqBcFORwo73E+JXLDH0jn7zP4wB878QwC3fL09Sq4R5hdlgJz0R/jt469ghLEmO12igcQjaCtlA2q8HRhD5ANLl1oWrSje2+vUWZtUw= Received: by 10.114.112.1 with SMTP id k1mr712772wac.1190661389507; Mon, 24 Sep 2007 12:16:29 -0700 (PDT) Received: by 10.141.159.3 with HTTP; Mon, 24 Sep 2007 12:16:29 -0700 (PDT) Message-ID: <9bbcef730709241216p629f36b4o730e93ef34813678@mail.gmail.com> Date: Mon, 24 Sep 2007 21:16:29 +0200 From: "Ivan Voras" Sender: ivoras@gmail.com To: "n j" In-Reply-To: <92bcbda50709240922j614b2a8aka7d360d366c02221@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <92bcbda50709120843o6af4bd38v8725be3f5b765b0e@mail.gmail.com> <20070913081748.GA1155@garage.freebsd.pl> <92bcbda50709210437g590df3f9y94f32d3d4d5cd1f@mail.gmail.com> <92bcbda50709240922j614b2a8aka7d360d366c02221@mail.gmail.com> X-Google-Sender-Auth: 6a2e3d944d789e72 Cc: freebsd-geom@freebsd.org Subject: Re: Gmirror on a partition of a slice X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Sep 2007 19:44:57 -0000 On 24/09/2007, n j wrote: > On 9/21/07, Ivan Voras wrote: > > Actually, you *can* do it if you really want to, because every GEOM > > provider is a "whole disk" to the system, it's just that usually it's > > not what you want. > > That is what I thought at first, but I spent a couple of days trying > to boot off such a geom "disk" and had absolutely no success until I > skipped the two steps Pawel pointed out. Actually, I'm beginning to > think that OS has to read the boot code from an actual (physical) disk > partition like da0s1a/da1s1a. In case you skip fdisk&bsdlabel on the Yes. > gmirrored partition, gm0 remains the exact copy of the actual boot > partition, da0s1a, and OS boots. By fdisk'ing and bsdlabel'ing the > newly created disk, gm0, my understanding is that you actually change > the underlying (boot) partition, da0s1a, and mess it up enough to make > the system unbootable. Yes. > The above interpretation, OTOH, might be completely wrong. My > understanding of the boot process is very vague and you might be > right. I'm not saying it's not possible, I'm just saying that I tried > it and it didn't work, no matter how hard I try. If you care to > describe the necessary steps on how to do it, I'll try again. When the machine boots, it sees the drives as ordinary devices, as it has no knowledge of gmirror. You can boot from one of these "ordinary" drives, and when the kernel boots, it recognizes gmirror's signature, reconstitutes the RAID and continues to work with it. But in the time between between when you turn the machine on and when kernel brings the GEOM system up, all you have are individual, disconnected drives. This works because the drives are by default accessed strictly read-only in this time frame. This is also how all other software RAID solutions work.