Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Jan 2013 14:08:25 -0600
From:      Bob Willcox <bob@immure.com>
To:        questions list <freebsd-questions@freebsd.org>
Subject:   Safe way to repair corrupted GPT partition table?
Message-ID:  <20130118200824.GA4084@rancor.immure.com>

next in thread | raw e-mail | index | archive | help
Is there a way to repair a GPT partition table that has gotten corrupted
(following a system hang during heavy I/O to a ZFS filesystem)?

I now get these errors whenever I boot the system:

GEOM: da0: corrupt or invalid GPT detected.
GEOM: da0: GPT rejected -- may not be recoverable.

Fortunately, my ZFS filesystem on the disk (actually a RAID 5 array on a
ARC-1223 adapter) still mounts and seems to be ok. There is only one partition
on the disk (the ZFS one) and it covered the entire disk so restoring it
should be easy. Question is, is there a way to do this and will it be safe (I
wouldn't want to trash the filesystem in the partion).

A 'gpart show da0' gives this result:

gpart: No such geom: da0.

This is on a 9.1-STABLE system:

FreeBSD rancor.immure.com 9.1-STABLE FreeBSD 9.1-STABLE #2 r245176: Tue Jan  8 15:45:29 CST 2013     bob@amidala.immure.com:/usr/obj/usr/src/sys/AMIDALA  amd64


Any help would be much appreciated.

-- 
Bob Willcox    | LIVING YOUR LIFE:
bob@immure.com |    A task so difficult, it has never been attempted before.
Austin, TX     |



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130118200824.GA4084>