dd zero on the wrong disk. ZFS over GELI on that disk, recover possible?
stefa.rossi96 at gmail.com
Mon Oct 8 19:58:23 UTC 2012
Il giorno 08/ott/2012, alle ore 14.13, Fabian Keil ha scritto:
> The geli and glabel meta data is located at the end of the partition
> so it shouldn't be affected by the dd if you only deleted a couple of
> MBs at the beginning of the disk.
> If you previously weren't using a gpt layout on ada1, however,
> the gpart call might have corrupted the meta data for both in
> which case you'll have to recreate it.
> If the glabel meta data wasn't corrupted, the label should show up
> again once you recreated the partition at the previous position.
> If the label shows up, it's likely that the geli meta data isn't
> affected either and you can try to geli attach the provider and
> import the zpool. After a zpool scrub you'll know which files were
> If the label doesn't show up after the partition table has been
> corrected, you'll first have to recreate a label and "geli restore"
> the meta data as documented in geli(8).
Short after sending the mail I tried with "gpart add -t freebsd ada1". You have no idea how suprised (and relieved) I was to see my partition appear in /dev/label. GELI attached it and ZFS recognized it. I still have to run a scrub, but I believe ZFS will be able to rescue all the data because the pool was created with the copies=2 option.
Apparently ZFS, GELI and glabel were clever enough to save my data from my stupidity.
Thanks a lot for your answer!
More information about the freebsd-questions