Destroyed my partition table - please help?

Status
Not open for further replies.
M

mcoms

Guest
Hey all,

I had a UFS volume from FreeNAS 7 which I wanted to import to FreeNAS 8. Unfortunately I managed to add it as a new UFS disk rather than importing it, 'wiping' the disk. This was 8.0.1-RC1.

I pulled the disk immediately and it's been sitting on my desk for the past few weeks while I mourn the loss of my data and anticipate the pain of restoring it.

Do you have any suggestions for recovering this data?

Thanks,
- Nick
 

djiceman

Dabbler
Joined
Jan 1, 2012
Messages
11
Disk with existing data included in new raidz

I'd just like to revive this thread, because I'm having a similar issue right now. When experimenting with zfs I didn't pay attention and accidently included a disk with existing data on it into a new raidz.
I pulled the disk pretty quick, but the system had already written onto it.
From what I can tell, the first thing FreeNAS does, when a new volume is created, is something like
Code:
dd if=/dev/zero of=/dev/da0 bs=1m oseek=`diskinfo da0 | awk '{print int($3 / (1024*1024)) - 4;}'`

which means that the system just blanks the last 4MB of the drive. (Please correct me, if I got this wrong!)
So I thought I'd give it a try. Unfortunately I couldn't get any useable data back so far.
First I created an image of the disk in question for "savekeeping".
Then I restored the original partition table, but the system couldn't find any filesystem.
So I tried testdisk/photorec to restore some files. Photorec actually managed to find and restore some files, but none of them are really intact. For instance, it restored some movie files, but I can see only a few seconds of the movie. The rest is crapped.
So now I'm just wondering if someone here with a better understanding of ZFS, partitioning and data recovery has some good advice how I could actually get some of my data back.
Any suggestions are welcome and appreciated.

Cheers,

Ice
 
Status
Not open for further replies.
Top