Disaster Recovery! :(

Reply to topic
4 posts
Ive totally fubar'd a ZFS drives partition. I haven't written anything to it yet though. I accidentally fat fingered a pvcreate instance to the wrong drive and its been downhill since. :( The good news, the drive is in GREAT physical shape and as far as i know almost 99.99999999999% of the data has not had anything written over it.

So I am curious. If i get another drive of the same size. What are my options on raw reading the data from it to get it back? I have heard stories of just recreating the guid in gdisk.... What are some ideas that people can throw at me?
Restore from backup. Other than that, I think you're boned.

IF all pvcreate did was change the type ID on the partition, you could try just changing it back, then hoping zpool import would see it. But I can't guarantee by any means that that is all pvcreate did - in fact, I think that's pretty unlikely.
I guess if you play around with ZFS this is a no brainer, but get another drive and make a 1:1 copy of the raw disk before anything else.

Then try if there is the easy way with changing e.g. the type ID back.
For ZFS I have no idea about the structure of the FS in detail, but poking around with a hex editor might be able to get you running again, if the metadata are mostly intact.

If you just want your stuff back, restoring from backup is probably the way to go, though.

I had to wait to pick up another drive, I ran a dd to that drive as a just in case.

i installed gdisk, and used that to create a new partition table.

upon creating that i loaded up my freenas VM and VOILA, disk read! running a scrub right now, but so far.... so good!
4 posts