Corrupted GPT for 4 disk FN8.2-p1 - Please help!

Status
Not open for further replies.

soko

Dabbler
Joined
Jul 24, 2012
Messages
18
Hey, well I am a noob to FN8.2, and I am pretty frustrated with my stupidity attempting to fix a GPT error using random forums, I think I have made my problem much much worse and I am without a backup. I should have written to this forum first for help.

The GPT corruptions appear to be due to a power failure.

I have struggled finding clear directions on the forums on how to fix bad GPT on FN8.2 ZFS.
My existing FN8.2 comprised disks ada0/1/2/3 all 3TB, configured as a ZFS RAIDZ2.

The NAS server restarts using USB to boot, then fails to root prompt, FreeNAS web GUI is not available, ie. the server is not able to successfully start. I am at a complete loss:

Error reported:
GEOM: ada3: the primary GPT table is corrupt or invalid.
GEOM: ada3: using the secondary instead - recovery strongly advised.
Trying to mount root from ufs:/dev/ufs/FreeNASs2a
ROOT MOUNT ERROR:
....

I attempted to resolve the issue by using Gparted Live USB boot.

Before performing GPT corrections, I backed up GPT's using sgdisk -b /backup.gpt /dev/sdd.

Then using "gpart /dev/sdd", then used "r" recovery and transformation option, then "c" to load backup partition table from disk (rebuilding main). Then "w" to write the partition table corrected the primary GPT issue by copying the backup to primary.

Upon reboot, this resolved the ada3 error above, the next drive then reported with the same issue ie. ada2, this process repeated for all drives thereafter ada1 and 0.

I tried fixing the GPT on all drives then rebooting with FN8.2-p1 USB back in and I get the following error:

mount: /dev/ufs/FreeNASs3: No such file or directory
mount -o ro /dev/ufs/FreeNASs3 /conf/default/etc/ failed: dropping into /bin/sh

then I get a lot of:
/: bad dir ino 94665 at offset 8192: mangled entry
" 8704
"

Have I screwed this up totally, or is this recoverable?

Thanks
 

William Grzybowski

Wizard
iXsystems
Joined
May 27, 2011
Messages
1,754
Did you try installing FreeNAS 8.2 in a new usb stick?

What does "zpool import" or "zpool status" says?
 

soko

Dabbler
Joined
Jul 24, 2012
Messages
18
Did you try installing FreeNAS 8.2 in a new usb stick?

What does "zpool import" or "zpool status" says?

Yes. I tried another two new USB sticks of varying sizes, 2G, 8G. It made no difference with error I am seeing.

I could not get ssh to box, therefore had to use direct keyboard and shell

"zpool import" reports:

...
many
/: bad dir ino 94665 at offset ***X: mangled entry
...
...

pool: vol1
id: 9450840952158927300
state: ONLINE
action: The pool can be imported using its name or numeric identifier.
config:

vol1 ONLINE
raidz1 ONLINE
ada0p2 ONLINE
ada1p2 ONLINE
ada2p2 ONLINE
ada3p2 ONLINE

pool: nas
id 1345150752441095234
state: UNAVAIL
status: The pool was last accessed by another system.
action: The pool cannot be imported due to damaged devices or data.
see: http://www.sun.com/msg/ZFS-8000-EY
config:

nas UNAVAIL newer version
raidz2 ONLINE
ada0 ONLINE
ada1 ONLINE
ada2 ONLINE
ada3 ONLINE

-----

"zpool status" reports

no pools available

cheers
 

William Grzybowski

Wizard
iXsystems
Joined
May 27, 2011
Messages
1,754
Honestly, I don't see any issue with your pool.

The problem is your freenas install, it really looks like you need to install it fresh...
 

soko

Dabbler
Joined
Jul 24, 2012
Messages
18
OK thanks. I'll download FN8.2p1 again and dd to USB again and get back to you on progress. Thanks for feedback.

Do you think I stuffed something up doing the GPT recovery from backup to primary? Given I am now seeing "bad dir ino 94665 at offset ***X: mangled entry" repeatedly?

thx
 

Stephens

Patron
Joined
Jun 19, 2012
Messages
496
And please, please, get a UPS that works with your system. Nobody who really cares about the data on their NAS should be running without one. And make sure you get a "PFC" UPS if you have an active PFC power supply.
 

soko

Dabbler
Joined
Jul 24, 2012
Messages
18
Honestly, I don't see any issue with your pool.

The problem is your freenas install, it really looks like you need to install it fresh...

Thanks William, you were right. I redownloaded FN8.2p1, dd'd to a new USB, rebooted and FN came up all the way and allowed webGUI. Seems like the USB was corrupted also.

Success. I then autoimported the zpool and everything is working again. There's some value in UPS, backups and backing up base FN config offsite against power failures.

Appreciate your advice.
 
Status
Not open for further replies.
Top