From owner-freebsd-geom@FreeBSD.ORG Tue Jun 30 22:08:47 2009 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 8DB3A1065678 for ; Tue, 30 Jun 2009 22:08:47 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from mail-ew0-f213.google.com (mail-ew0-f213.google.com [209.85.219.213]) by mx1.freebsd.org (Postfix) with ESMTP id 1739D8FC27 for ; Tue, 30 Jun 2009 22:08:46 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: by ewy9 with SMTP id 9so571271ewy.43 for ; Tue, 30 Jun 2009 15:08:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:from:date:x-google-sender-auth:message-id:subject:to:cc :content-type:content-transfer-encoding; bh=2TvTXJKDDzVFZp82L+b9y/58mvwOFrVpzJJvnvtM9+c=; b=TkpVB32l26nAv4f7o6oZtfl9vXwosUohLSsBrGyOwQxvgeI1P14B3s8C3wyyKvP8FE /G4JXEy/AahzXGGYj9zOQnGZxH91APDcFi6sAPthYXnuw1PDr9Njb9iCZwgHRKzv8NOT ZZenu1pf9LP9EXV4EMWpvfToImALpmtqyFQi0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; b=R3gtiR7Qkdop66F/MJcQVznISFq9H4qLlgJrRjAAGCg75FYQuBmjzRKyGFdq6PRxoD cHbdoTQH7qe7/UXL02YKqgMFxvABTDGSb/8yCMnzAJieFfXZslztM4ubSvRKfS3g7U3M kS0Chw4nUBP8OobcXBKQCjDW2cIEocIThrr9o= MIME-Version: 1.0 Sender: ivoras@gmail.com Received: by 10.210.78.16 with SMTP id a16mr374358ebb.73.1246399726062; Tue, 30 Jun 2009 15:08:46 -0700 (PDT) In-Reply-To: <20090630215345.GC33849@keira.kiwi-computer.com> References: <20090625110253.GA31443@mech-cluster238.men.bris.ac.uk> <10FCC74D-6D46-4112-AD89-BBB4C5933957@mac.com> <2FFFB36F-EFA3-4D92-98A3-692BA2D6F63E@mac.com> <20090629210003.GA24038@keira.kiwi-computer.com> <704EE47D-F0C4-4C63-AA3C-3ADF92CC8379@mac.com> <20090630215345.GC33849@keira.kiwi-computer.com> From: Ivan Voras Date: Wed, 1 Jul 2009 00:08:25 +0200 X-Google-Sender-Auth: fc83062afb204565 Message-ID: <9bbcef730906301508l6f2ae344tff8f7495e870049e@mail.gmail.com> To: rick-freebsd2008@kiwi-computer.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: Marcel Moolenaar , freebsd-geom@freebsd.org Subject: Re: gmirror gm0 destroyed on shutdown; GPT corrupt 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: Tue, 30 Jun 2009 22:08:49 -0000 2009/6/30 Rick C. Petty : > On Tue, Jun 30, 2009 at 02:37:55PM -0700, Marcel Moolenaar wrote: > Both bar and baz should validate their metadata and it should be pretty > apparent that one of them has a smaller size. =C2=A0If the one that is sm= aller > fits perfectly into the one that is bigger, the taste should pass to the > latter first. This is how it's currently done with "native" GEOM classes like gmirror - if gmirror is put where it and something else can taste the metadata, gmirror will decide by checking the size - usually +/- 1 sector. But we can't embed this logic into "foreign" classes like GPT. GTP check the first sector (and the last sector for backup), while gmirror checks the first sector, and GPT metadata (AFAIK) doesn't contain media size.