Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 7 Oct 2012 20:55:20 +0200
From:      Stefano Rossi <stefa.rossi96@gmail.com>
To:        freebsd-questions@freebsd.org
Subject:   dd zero on the wrong disk. ZFS over GELI on that disk, recover possible?
Message-ID:  <5DF28740-BBF5-47EE-827B-DD712ABD0F62@gmail.com>

next in thread | raw e-mail | index | archive | help
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=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5DF28740-BBF5-47EE-827B-DD712ABD0F62>