From owner-freebsd-geom@FreeBSD.ORG Mon Nov 11 15:11:45 2013 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3EDDB71D for ; Mon, 11 Nov 2013 15:11:45 +0000 (UTC) (envelope-from symbolics@gmx.com) Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B37512E4E for ; Mon, 11 Nov 2013 15:11:44 +0000 (UTC) Received: from lemon ([80.7.17.14]) by mail.gmx.com (mrgmx102) with ESMTPSA (Nemesis) id 0MJmcS-1Vgzc23IBg-0016C8 for ; Mon, 11 Nov 2013 16:11:43 +0100 Received: by lemon (Postfix, from userid 1001) id 3B454EB2F2; Mon, 11 Nov 2013 15:11:41 +0000 (GMT) Date: Mon, 11 Nov 2013 15:11:41 +0000 From: symbolics@gmx.com To: freebsd-geom@freebsd.org Subject: Re: documentation of GEOM data structures needed Message-ID: <20131111151141.GA1381@lemon> References: <20131111162400.0bc7dfef@X220.ovitrap.com> <20131111091836.GA83261@lemon> <20131111183216.5ec80e9e@X220.ovitrap.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20131111183216.5ec80e9e@X220.ovitrap.com> X-Provags-ID: V03:K0:wN56HbFOi1vBuq+iyScwQ1IlzK32XohOHc6crFyeuhq4+kiURuT tP3V1Q9WnWxAHfjO3hgN6GJtH7OgSwDeD3D1aCrETkNg/anJEFgEHprFD9EsUussLCGloXX vxsyv9lUzmNtTPzWuixpbvW849fZpqc6nMsk+ZP82c7bd1iZGK6qHiIe8EHxi7vAjnOTchl Qkfuy+gyUnOHzqOQt36Cw== X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Nov 2013 15:11:45 -0000 On Mon, Nov 11, 2013 at 06:32:16PM +0800, Erich Dollansky wrote: > Hi Sym, > > On Mon, 11 Nov 2013 09:18:36 +0000 > symbolics@gmx.com wrote: > > > On Mon, Nov 11, 2013 at 04:24:00PM +0800, Erich Dollansky wrote: > > > Hi, > > > > > > I would need a documentation of the GEOM data structure. A disk got > > > damages in a strange way during the process of backing up data. It > > > was partitioned with gpart as all my disks using the MBR schema. > > > When creating the backup, the system crashed. The disk was not > > > usable anymore. I found out that the MBR was overwritten before the > > > backup was started while the beginning of the first partition seems > > > to be ok. > > > > > > I hope to be able to recover the data saving me one week of work. > > > > Hi Erich, > > > > As I understand things, you believe that your filesystems are okay and > > you just want to recreate the MBR so you can try to fsck and mount > > this is the basic idea. > > > them? How did you set the disc MBR up in the first place? If you used > > the automatic scheme in the installer and you know the size of the > > I used the manual way creating 6 partitions. Do you know the sizes and order of how they were set up? They're all UFS2 or a mixture of other things too? > > disc, you could reconstruct things that way. What does `gpart show' > > look like at the moment? > > It does not come that far > > gpart list da0 > gpart: No such geom: da0. > > is all I get. > > My luck is that I have three disks which are the type but manufactured > with some months between. But their sizes differ a bit. I think that I > should be able to recover much by just comparing the entries. > You can try looking at diskinfo -v da0 to see the numbers. I had a little play around making a test disc and mdconfig. If I get some more time this evening I'll see if I can write a tool to scan the disc and recover the partition data, it'd be a good exercise. There are a few programmes in ports/sysutils you should try in the meantime. I didn't find them useful in my tests but that might not be indicative of anything. --sym