From owner-freebsd-geom@FreeBSD.ORG Tue Apr 8 22:33:21 2008 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 A4C431065678 for ; Tue, 8 Apr 2008 22:33:21 +0000 (UTC) (envelope-from 000.fbsd@quip.cz) Received: from elsa.codelab.cz (elsa.codelab.cz [91.103.162.4]) by mx1.freebsd.org (Postfix) with ESMTP id 662D48FC24 for ; Tue, 8 Apr 2008 22:33:21 +0000 (UTC) (envelope-from 000.fbsd@quip.cz) Received: from localhost (localhost.codelab.cz [127.0.0.1]) by elsa.codelab.cz (Postfix) with ESMTP id AE9D319E023; Wed, 9 Apr 2008 00:33:19 +0200 (CEST) Received: from [192.168.1.2] (r5bb235.net.upc.cz [86.49.61.235]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by elsa.codelab.cz (Postfix) with ESMTPSA id 78F4B19E019; Wed, 9 Apr 2008 00:33:17 +0200 (CEST) Message-ID: <47FBF2C1.4040806@quip.cz> Date: Wed, 09 Apr 2008 00:33:37 +0200 From: Miroslav Lachman <000.fbsd@quip.cz> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 X-Accept-Language: cz, cs, en, en-us MIME-Version: 1.0 To: Ferruccio Zamuner References: <47FBE9CC.6050903@diff.org> In-Reply-To: <47FBE9CC.6050903@diff.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-geom@freebsd.org Subject: Re: disklabel and gm0 (gmirror) 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, 08 Apr 2008 22:33:21 -0000 Ferruccio Zamuner wrote: > # disklabel /dev/mirror/gm0 > # /dev/mirror/gm0: > 8 partitions: > # size offset fstype [fsize bsize bps/cpg] > a: 2089984 79 4.2BSD 0 0 0 > b: 2910000 2090063 unused 0 0 c: 463459122 > 63 unused 0 0 # "raw" part, don't edit > d: 10000000 5000063 4.2BSD 0 0 0 > e: 10000000 15000063 4.2BSD 0 0 0 > f: 15000000 25000063 4.2BSD 0 0 0 > g: 423459058 40000063 4.2BSD 0 0 0 > partition c: partition extends past end of unit > disklabel: partition c doesn't start at 0! > disklabel: partition c doesn't cover the whole unit! > disklabel: An incorrect partition c may cause problems for standard > system utilities > > # gmirror list > Geom name: gm0 > State: COMPLETE > Components: 3 > Balance: split > Slice: 8192 > Flags: NONE > GenID: 0 > SyncID: 2 > ID: 3991481480 > Providers: > 1. Name: mirror/gm0 > Mediasize: 237291069952 (221G) > Sectorsize: 512 > Mode: r5w5e6 > Consumers: > 1. Name: ad6s1 > Mediasize: 237291070464 (221G) > Sectorsize: 512 > Mode: r1w1e1 > State: ACTIVE > Priority: 0 > Flags: NONE > GenID: 0 > SyncID: 2 > ID: 3276824044 > 2. Name: ad10s1 > Mediasize: 237291070464 (221G) > Sectorsize: 512 > Mode: r1w1e1 > State: ACTIVE > Priority: 0 > Flags: NONE > GenID: 0 > SyncID: 2 > ID: 1289844737 > 3. Name: ad12s1 > Mediasize: 237291070464 (221G) > Sectorsize: 512 > Mode: r1w1e1 > State: ACTIVE > Priority: 0 > Flags: NONE > GenID: 0 > SyncID: 2 > ID: 1706660870 > > 237291069952 / 512 (mirror/gm0 Mediasize / sector size) > 463459121 (the size that gm0c should be) > 423459058 + 40000063 (gm0g size + gm0g offset) > 463459121 (gm0 size) > > How can I fix it? > > disklabel -e /dev/mirror/gm0 > > setting gm0c offset = 0 > setting gm0c size = 463459121 > > gives following warning and not change these values: > partition c: partition extends past end of unit > disklabel: partition c doesn't start at 0! > disklabel: partition c doesn't cover the whole unit! > disklabel: An incorrect partition c may cause problems for standard Backup all your data (if gm0 is not empty) and start with new standard label: bsdlabel -w /dev/mirror/gm0 Then open the label for editing: bsdlabel -e /dev/mirror/gm0 and add you new partitions, but don't touch the line with c: partition You can use wildcards, so bsdlabel automaticaly calculate correct values: a: 2089984 * 4.2BSD b: 2910000 * unused c: #### there will be your defaults for c: #### d: 10000000 * 4.2BSD e: 10000000 * 4.2BSD f: 15000000 * 4.2BSD g: * * 4.2BSD Then newfs new partitions and restore your data. Miroslav Lachman