z2 raid volume corrupted on FreeNAS-8.3.1

Status
Not open for further replies.

littlezeus11

Dabbler
Joined
Sep 20, 2013
Messages
17
thanks for reply!
I was able to progress in solving this problem by using the utility gdisk via parted magic live cd:
gdisk /dev/sdX (X= letter of drive)-r option (recovery menu) and then-b option (recover header)-c (table recover)-w (write changes),
the 8 were again visible in gpart (freenas) but was detected with a gpt corrupt.
So i use the "gpart recover mfisyspdX" (X = number of the disc)
I could restore GPT and now the 8 hard drive got status ok with gpart status (see below).
However, the zpool is still invisible and volume 'root' always corrupt, can you bring me a solution in solving the second part of the problem?

report gpart status:


mfisyspd1p2 OK mfisyspd1
mfisyspd1p3 OK mfisyspd1
mfisyspd2p1 OK mfisyspd2
mfisyspd2p2 OK mfisyspd2
mfisyspd2p3 OK mfisyspd2
mfisyspd3p1 OK mfisyspd3
mfisyspd3p2 OK mfisyspd3
mfisyspd3p3 OK mfisyspd3
mfisyspd4p1 OK mfisyspd4
mfisyspd4p2 OK mfisyspd4
mfisyspd4p3 OK mfisyspd4
mfisyspd6p1 OK mfisyspd6
mfisyspd6p2 OK mfisyspd6
mfisyspd6p3 OK mfisyspd6
mfisyspd7p1 OK mfisyspd7
mfisyspd7p2 OK mfisyspd7
mfisyspd7p3 OK mfisyspd7
da0s1 OK da0
da0s2 OK da0
da0s3 OK da0
da0s4 OK da0
da0s1a OK da0s1
 

littlezeus11

Dabbler
Joined
Sep 20, 2013
Messages
17
Hello,
I had an idea last night, but I need your advice before putting it into practice:

I got 8 new hdd 3TB drive identical to those containing the data to retrieve, so perhaps can I create a new raid z2 reproducing the same patterns as the first raid-z2, could I be able to transfer the partition tables for each new disks to the corresponding old nas drive and retrieve a working zpool?
according to the following schemes:

new raid-z2 (empty) - old raid-z2 (data corrupted)
gpt hdd1 > gpt hdd1
gpt hdd2 > gpt hdd2
etc...
 

Dusan

Guru
Joined
Jan 29, 2013
Messages
1,165
Hard to predict. Especially after you did changes via non-freebsd tools (parted magic). I have no idea what the actions actually did to the disks. Doing changes blindly just to get gpart show OK was probably not the best idea. As cyberjock already mentioned, your gpart output still looks strange -- FreeNAS creates either one (freebsd-zfs) or two (freebsd-zfs & freebsd-swap) partitions. You have three...
If you mentioned right at the beginning that you have another set of drives, my suggestion would be to immediately copy (dd) the "bad" disks to the new disks. That way you can always revert your changes if something goes wrong.
So, back to your idea. It may work. You could even try to "blindly" recreate the default FreeNAS partition structure (2GB swap + zfs) on the old disks without first creating it on the new drives. However, after all the changes, I think the chances are slim...
 

Dusan

Guru
Joined
Jan 29, 2013
Messages
1,165
What type of partitions do you see when you run gpart show?
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Yep, that's completely messed up. I was interested in what it shows now, after parted magic did its magic. However, the chance is extremely slim that we'll see zfs partitions.

Oh. My bad.

I'm just not getting a warm fuzzy that this is going to work. But I'm sure we'll find out soon enough.
 

Dusan

Guru
Joined
Jan 29, 2013
Messages
1,165
ZFS is extremely resilient. There are 4 copies of the vdev label, 3 copies of pool metadata blocks and 2 copies of file system metadata blocks. The problem with putting ZFS into a partition is that if you lose the partition table (there are only 2 copies of the table) ZFS can't find any vdev label and zpool import fails. So, recreating the default FreeNAS partition scheme may enable ZFS to figure out one of the vdev labels. But yes, I agree that the chance is small as we have no idea what other damage happened (due to the kernel panic and/or the previous recovery attempts).
 

John M. Długosz

Contributor
Joined
Sep 22, 2013
Messages
160
hello thanks for reply,
my freenas (8.3.1) is installed on a flash drive and the 8 hard drives only contains the data in raid z2. perhaps it can explain the 3 partitions?

If it's GPT, you get a special GPT partition too. I think it's only needed if you boot from that drive.
 

Dusan

Guru
Joined
Jan 29, 2013
Messages
1,165
If it's GPT, you get a special GPT partition too. I think it's only needed if you boot from that drive.
Quoting from the wikipedia article you linked: "Whether a disk contains an EFI System partition is unrelated to the partition table scheme (GPT or MBR) that it uses."
FreeNAS data disks do not contain an EFI system partition (C12A7328-F81F-11D2-BA4B-00A0C93EC93B), only a freebsd-zfs (516e7cba-6ecf-11d6-8ff8-00022d09712b) and optionally freebsd-swap (516e7cb5-6ecf-11d6-8ff8-00022d09712b) partition.
 
Status
Not open for further replies.
Top