From owner-freebsd-geom@FreeBSD.ORG Mon Nov 11 15:32:58 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 7411CFC6 for ; Mon, 11 Nov 2013 15:32:58 +0000 (UTC) (envelope-from erich@alogt.com) Received: from alogt.com (alogt.com [69.36.191.58]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4BE032FED for ; Mon, 11 Nov 2013 15:32:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=alogt.com; s=default; h=Content-Transfer-Encoding:Content-Type:Mime-Version:References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date; bh=ZwmK/BWPabvxdkhekZJaI6F38zQ991WbatnoKM3tMtk=; b=PxuJ4ORRnTTTxD+gG0X/IpQlXD89JUa7LBzdc3SVVurqfoRmfgtK82qPJSCjmL5drvzioicPcYdOw5tYGNY39R9k1FzPTNNQSn9WQxwoSvxYtOlKNvOTXPWFWNzPWWNV7giNHKW832GWCtkNr53bUXJuW1dvlrOPN20WDbnNa/o=; Received: from [182.5.85.198] (port=61836 helo=X220.ovitrap.com) by sl-508-2.slc.westdc.net with esmtpsa (SSLv3:DHE-RSA-AES128-SHA:128) (Exim 4.80.1) (envelope-from ) id 1VftTv-00320j-FQ; Mon, 11 Nov 2013 08:32:52 -0700 Date: Mon, 11 Nov 2013 23:32:43 +0800 From: Erich Dollansky To: Warren Block Subject: Re: documentation of GEOM data structures needed Message-ID: <20131111233243.0ee485be@X220.ovitrap.com> In-Reply-To: References: <20131111162400.0bc7dfef@X220.ovitrap.com> Organization: ALO Green Technologies X-Mailer: Claws Mail 3.9.2 (GTK+ 2.24.19; amd64-portbld-freebsd10.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - sl-508-2.slc.westdc.net X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - alogt.com X-Get-Message-Sender-Via: sl-508-2.slc.westdc.net: authenticated_id: erich@alogt.com X-Source: X-Source-Args: X-Source-Dir: 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:32:58 -0000 Hi, On Mon, 11 Nov 2013 08:19:57 -0700 (MST) Warren Block wrote: > 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 this I knew. It points then to the container for the FreeBSD slices. > > 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. > I did not tell you the other effect I have with this disk. It boots until FreeBSD wants to mount /. So, the loaders somehow find the kernel etc. All seems to be there except the proper entries in the data structures defining the container and the individual partitions. > 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. This is the alternative if my assumptions are wrong. Erich