From owner-freebsd-questions@FreeBSD.ORG Sun Oct 7 18:55:25 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 912451065670 for ; Sun, 7 Oct 2012 18:55:25 +0000 (UTC) (envelope-from stefa.rossi96@gmail.com) Received: from mail-we0-f182.google.com (mail-we0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 1E2BD8FC08 for ; Sun, 7 Oct 2012 18:55:24 +0000 (UTC) Received: by mail-we0-f182.google.com with SMTP id x43so2718281wey.13 for ; Sun, 07 Oct 2012 11:55:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:content-transfer-encoding:subject:date:message-id :to:mime-version:x-mailer; bh=9X9gVcbpwkm+sBIdWX/57Eg2JpAztlRoY7CPVlDc5nI=; b=JEPlRQJbsPrh0Nell0c3JToOV8qWEyC0R2Fp7r2mY8nnbHUdmU0carLNAi5xpxjeak AvgVz2x4pLvWPQBikEHFs2m3mnHR7omI99lbXaWAxv26Ev4zO/UKQ9rlIiZfZn+EPF9A fcXjLqgfaPS4L8Di9KbBWrAVOxf+4QgbfbqqHQ78t0zpHMULagSXPomYtyLBVs1XkZqt 7GY2WMP1ZvBXGa5aI/VKBouX0G8YDZgJt+uqlsbV55xpYFKo4iMo0u0UgiOI9rv1LVaU YpekkQJFQdPGD6c+7Fo1koxBMbZeHSgfqAfNEIryuMOd+PmZ1Z0xZisoNps8nsR5kQ0n 7+ZQ== Received: by 10.180.79.103 with SMTP id i7mr16251758wix.13.1349636123783; Sun, 07 Oct 2012 11:55:23 -0700 (PDT) Received: from [192.168.1.37] (dynamic-adsl-78-12-73-181.clienti.tiscali.it. [78.12.73.181]) by mx.google.com with ESMTPS id ct3sm15368768wib.5.2012.10.07.11.55.22 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 07 Oct 2012 11:55:22 -0700 (PDT) From: Stefano Rossi Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Date: Sun, 7 Oct 2012 20:55:20 +0200 Message-Id: <5DF28740-BBF5-47EE-827B-DD712ABD0F62@gmail.com> To: freebsd-questions@freebsd.org Mime-Version: 1.0 (Apple Message framework v1085) X-Mailer: Apple Mail (2.1085) Subject: dd zero on the wrong disk. ZFS over GELI on that disk, recover possible? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Oct 2012 18:55:25 -0000 Hello, I made a tremendous mistake with a "dd of=3D/dev/zero of=3D/dev/ada1" = command. ada1 was the wrong disk. The command was interrupted after a few seconds (I only wanted to erase = the partition table), and a "gpart create -s gpt ada1" was given before = I realized my mistake. On ada1 there was a single partition, type freebsd, which was labelled = HD4. /dev/label/HD4 was geli encrypted with a keyfile (I still have the = keyfile), and /dev/label/HD4.eli was a zpool (named HD4 too). Is there any way I could save at least some of the data on that zpool? I = know geli makes backup of the metadata, I must have them somewhere on my = root partition. Is there any way to recover the few lost megabytes at the start of the = disk? Or, would it be possible to recreate the same partition table with the = single partition, relabel it and restore the geli backup to the labelled = partition? Would then zfs recognize it? Please, if you have any idea share it with me, the data on that disk is = vital. Thank you very much. Stefano Rossi=