Safe way to repair corrupted GPT partition table?

Bob Willcox bob at immure.com
Sat Jan 19 15:01:32 UTC 2013


On Fri, Jan 18, 2013 at 07:40:59PM -0500, illoai at gmail.com wrote:
> On 18 January 2013 15:08, Bob Willcox <bob at immure.com> wrote:
> > 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 at amidala.immure.com:/usr/obj/usr/src/sys/AMIDALA  amd64
> >
> >
> > Any help would be much appreciated.
> >
> 
> Is the whole disk in the zfs pool, or is this a
> single partition covering the whole disk that
> has been placed in the zfs pool?

It is a single partition covering the entire disk.

> 
> Have you tried to repair it with the zfs tools?

No, not sure what to try. I'm fairly new to zfs.

Thanks,
Bob

> 
> -- 
> --

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


More information about the freebsd-questions mailing list