Date: Wed, 09 Apr 2008 00:33:37 +0200 From: Miroslav Lachman <000.fbsd@quip.cz> To: Ferruccio Zamuner <nonsolosoft@diff.org> Cc: freebsd-geom@freebsd.org Subject: Re: disklabel and gm0 (gmirror) Message-ID: <47FBF2C1.4040806@quip.cz> In-Reply-To: <47FBE9CC.6050903@diff.org> References: <47FBE9CC.6050903@diff.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?47FBF2C1.4040806>