From owner-freebsd-geom@FreeBSD.ORG Mon Nov 11 15:20:02 2013 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id AAFC9987 for ; Mon, 11 Nov 2013 15:20:02 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5FD5E2EE1 for ; Mon, 11 Nov 2013 15:20:02 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.7/8.14.7) with ESMTP id rABFJvr9099616; Mon, 11 Nov 2013 08:19:57 -0700 (MST) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.7/8.14.7/Submit) with ESMTP id rABFJv1C099613; Mon, 11 Nov 2013 08:19:57 -0700 (MST) (envelope-from wblock@wonkity.com) Date: Mon, 11 Nov 2013 08:19:57 -0700 (MST) From: Warren Block To: Erich Dollansky Subject: Re: documentation of GEOM data structures needed In-Reply-To: <20131111162400.0bc7dfef@X220.ovitrap.com> Message-ID: References: <20131111162400.0bc7dfef@X220.ovitrap.com> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (wonkity.com [127.0.0.1]); Mon, 11 Nov 2013 08:19:57 -0700 (MST) Cc: freebsd-geom@freebsd.org 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:20:02 -0000 On Mon, 11 Nov 2013, Erich Dollansky wrote: > 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. MBR does not have any specific GEOM structure. It's just a standard MBR: http://en.wikipedia.org/wiki/Master_boot_record See the end of the mdconfig(8) man page for an example of using it and gnop(8) to skip over an arbitrary length of data at the start of a disk. With that and file -s, you can attempt to find mountable filesystems on the whole disk. A script would be the fastest way. The first one should be relatively easy. After that, guessing approximate locations would speed it up a lot.