Deleted Drive Partitions On Multiple Drives Recover the partitions and Data

rmancuso

Cadet
Joined
Feb 25, 2020
Messages
5
Freenas box- i7 FreeNAS installed on 128gb m.2
6 4tb Red drives in ZFS .

I was having issues updating freenas and decided I would change this system out like I have with another system and set it up with windows 10 pro and hyper v for the FreeNAS.

During the windows 10 install I mistakenly thought the m.2 was in multiple partitions for some reason. I just did not take the time too look closely and delete 3 partitions on 3 of the 6 drives. Each drive has 2 partitions. 1 2gb and 1 3.64tb with the balance of the storage.

I think if I could recover the partition on at least one drive i could rebuild the data as the with three drives are intact. I am trying to recover the partition with Easeus partition manager but it is taking forever and I'm just not confident it is able to read the data due to zfs formatting.

I did try starting up FreeNas in a hyper v attached the drives and imported the pool. The pool did import and i thought i was ok. I turned on the share and shared out the folder of the pool and it crashed freenas.

I rebooted freenas and now the pool no longer shows to import it.

Any help or ideas would be greatly appreciated.
 

Heracles

Wizard
Joined
Feb 2, 2018
Messages
1,401
Hey mancuso,

As long as you deleted the 2G partitions, you should be good, These ones are for swap. The data is on the biggest one. So you said you deleted 3 partitions. If by any chance at least one of them is a 2G, you should have the required 4 data partitions to recover.

So did you indeed deleted only 3 partitions (and not 3 drives) and by any chance, did you delete at least one 2G partition?
 

rmancuso

Cadet
Joined
Feb 25, 2020
Messages
5
Hey mancuso,

As long as you deleted the 2G partitions, you should be good, These ones are for swap. The data is on the biggest one. So you said you deleted 3 partitions. If by any chance at least one of them is a 2G, you should have the required 4 data partitions to recover.

So did you indeed deleted only 3 partitions (and not 3 drives) and by any chance, did you delete at least one 2G partition?
 

Attachments

  • 1582682143446.png
    1582682143446.png
    113.5 KB · Views: 260

Heracles

Wizard
Joined
Feb 2, 2018
Messages
1,401
Ok, so with 4 data partitions, you would have been good if you did not aggravated the case. On which drives did you used your Easus recovery tool ? I hope it is only on the ones without any data partitions... If so, good and do not try to recover anything with anything else then FreeNAS itself.

Second No-Go you did was to try a recovery from a virtualized FreeNAS. FreeNAS must have direct access to the drives. By putting an hypervisor between it and the drives, again you may well have damaged the drives.

So first thing is to make yourself a new FreeNAS bootable USB stick. Do it without touching your data drives anymore. Unplug them until you are ready to do the complete recovery. Also, you did not mentioned your pool was Raid-Z2 but I guessed it was because the way you wrote your post. Next thing will be to confirmed the layout you used for that pool.

Once you have your USB boot stick, boot up your old system but again, without any drives connected to it.

From there and according to the extra details you will provide us, we will see what can be done.

Good luck,
 

rmancuso

Cadet
Joined
Feb 25, 2020
Messages
5
Ok, so with 4 data partitions, you would have been good if you did not aggravated the case. On which drives did you used your Easus recovery tool ? I hope it is only on the ones without any data partitions... If so, good and do not try to recover anything with anything else then FreeNAS itself.

Second No-Go you did was to try a recovery from a virtualized FreeNAS. FreeNAS must have direct access to the drives. By putting an hypervisor between it and the drives, again you may well have damaged the drives.

So first thing is to make yourself a new FreeNAS bootable USB stick. Do it without touching your data drives anymore. Unplug them until you are ready to do the complete recovery. Also, you did not mentioned your pool was Raid-Z2 but I guessed it was because the way you wrote your post. Next thing will be to confirmed the layout you used for that pool.

Once you have your USB boot stick, boot up your old system but again, without any drives connected to it.

From there and according to the extra details you will provide us, we will see what can be done.

Good luck,
Good Morning Sorry for the delay my wife had surgery yesterday and this is the first chance I have had to reply.
  • I have only used the recovery on disk 0 in the screen shot is has no partitions now.
  • Drive configuration I don’t recall the exact configuration, but I am pretty sure it is Raid z2. Is there a way I can confirm this?
  • I have the drives all disconnected new usb with free nas up and booted.
  • Data drives are all still disconnected.
Awaiting your kind instructions and help. Thank you
 

rmancuso

Cadet
Joined
Feb 25, 2020
Messages
5
I was able to get my Data back.
I was very lucky that i did not delete that other data drive. Lesson learned pay attention to what you are doing multi-tasking isn't good sometimes.

I was in the process of working on another FreeNAS today and the update asked me to upgrade the ZFS Storage Pool! That's when it hit me I am using too new a version of freenas to get the pool to import and work correctly.
I loaded the version of FreeNAS that was on the machine before this all started and then imported the pool and was able to share out the data. So far so good I am transferring all the data off the NAS and I will start fresh from the ground up.
Thank you so much Heracles for your assistance. I really appreciate you reaching out to help me. Have a great day.
 

Heracles

Wizard
Joined
Feb 2, 2018
Messages
1,401
Hey Rmancuso,

Very happy that you recovered your data. That is also an evidence of how important backups are, even when data are hosted in a server that can be as strong and solid as FreeNAS.
 
Top