From owner-freebsd-current@FreeBSD.ORG Sun Jun 28 13:18:37 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 75ADA1065674; Sun, 28 Jun 2009 13:18:37 +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 A482B8FC19; Sun, 28 Jun 2009 13:18:36 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: by ewy9 with SMTP id 9so2920753ewy.43 for ; Sun, 28 Jun 2009 06:18:35 -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=XnO120P/HEuzlrl0SjLrmgGQAT1/OAERpkN0C9fVH4k=; b=ClsfAbS8JfgxAZ2JRYUSnVrmLYLmr9fKoXSLItX09wA/Fo+D7Rg/cBvmi2WwQLgy8k 1TdxxEnO6BjY7HgrHQOZVAj/Y7QNM3I1tjDiQ6qOWm3js1IwufyVF+1co74mpEF7RZTt wY2H4lzK7mUQe/JQkzeHKWcQKpZdCWPRCIbSY= 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=irAcrXBOHnWjJq2i0np42qbeZyIsFat0bje6pcbj9GZIYbHyejQxUptF3gnzH5UKhb 7hRyLyhQWta8f/27IcJmQe84eYieMh23bYzhYjvfsRQIecmaW7vDHhQfuW3IpX4NIKK7 rJDOrWAW/NVUC8d92drewyMX3iyRqsG+HThvY= MIME-Version: 1.0 Sender: ivoras@gmail.com Received: by 10.210.91.7 with SMTP id o7mr2068474ebb.69.1246193482137; Sun, 28 Jun 2009 05:51:22 -0700 (PDT) In-Reply-To: <2FFFB36F-EFA3-4D92-98A3-692BA2D6F63E@mac.com> References: <20090625110253.GA31443@mech-cluster238.men.bris.ac.uk> <10FCC74D-6D46-4112-AD89-BBB4C5933957@mac.com> <2FFFB36F-EFA3-4D92-98A3-692BA2D6F63E@mac.com> From: Ivan Voras Date: Sun, 28 Jun 2009 14:51:02 +0200 X-Google-Sender-Auth: 0a1d4c3dc2ba9046 Message-ID: <9bbcef730906280551r26e30b61oc84acdd02d94743e@mail.gmail.com> To: Marcel Moolenaar Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org, freebsd-questions@freebsd.org, freebsd-geom@freebsd.org Subject: Re: gmirror gm0 destroyed on shutdown; GPT corrupt X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jun 2009 13:18:38 -0000 2009/6/28 Marcel Moolenaar : > Using the last sector is not only flawed because it creates a race > condition, it's flawed in the assumption that you can always make > a geom part of a mirror by storing meta-data on the geom without > causing corruption. This whole idea of using the last sector was > so that a fully partitioned disk with data could be turned into a > mirrored disk. A neat idea, but hardly the basis for a generic > mirroring implementation when it silently corrupts a disk. > > I think it's better to change gmirror to use the first sector on the > provider. Yes, it would be cleaner to implement but it would also make the mirrored devices unbootable. But maybe the class of users needing the functionality is smaller now. > This never creates a race condition and as such, you don't > need to invent a priority scheme, that has it's own set of flaws on > top of it. The only downside is that it's not easy to make a fully > partitioned and populated disk part of a mirror: one would need to > move the data forward one sector to free the first sector. This we > can actually do by inserting a GEOM that does it while I/O is still > ongoing. The good thing is: we need a class that does exactly this > for implementing the "move" verb in gpart. Looks too complicated and fragile. Maybe there's a need for metadata-less automatic mirrors in some way, by storing the configuration somewhere else, possibly in /etc.