From owner-freebsd-questions@FreeBSD.ORG Fri Jan 18 20:08:49 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id E22FBB7C for ; Fri, 18 Jan 2013 20:08:49 +0000 (UTC) (envelope-from bob@immure.com) Received: from maul.immure.com (adsl-66-136-206-1.dsl.austtx.swbell.net [66.136.206.1]) by mx1.freebsd.org (Postfix) with ESMTP id A2F58347 for ; Fri, 18 Jan 2013 20:08:49 +0000 (UTC) Received: from rancor.immure.com (rancor.immure.com [10.1.132.9]) by maul.immure.com (8.14.5/8.14.5) with ESMTP id r0IK8Pkw037028 for ; Fri, 18 Jan 2013 14:08:25 -0600 (CST) (envelope-from bob@immure.com) Received: from rancor.immure.com (localhost [127.0.0.1]) by rancor.immure.com (8.14.6/8.14.6) with ESMTP id r0IK8PYV004227 for ; Fri, 18 Jan 2013 14:08:25 -0600 (CST) (envelope-from bob@rancor.immure.com) Received: (from bob@localhost) by rancor.immure.com (8.14.6/8.14.6/Submit) id r0IK8PIF004226 for freebsd-questions@freebsd.org; Fri, 18 Jan 2013 14:08:25 -0600 (CST) (envelope-from bob) Date: Fri, 18 Jan 2013 14:08:25 -0600 From: Bob Willcox To: questions list Subject: Safe way to repair corrupted GPT partition table? Message-ID: <20130118200824.GA4084@rancor.immure.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-immure-MailScanner-Information: Please contact the ISP for more information X-immure-MailScanner-ID: r0IK8Pkw037028 X-immure-MailScanner: Found to be clean X-immure-MailScanner-SpamCheck: not spam (whitelisted), SpamAssassin (not cached, score=-2.9, required 1, autolearn=not spam, ALL_TRUSTED -1.00, BAYES_00 -1.90) X-immure-MailScanner-From: bob@immure.com X-Spam-Status: No X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Bob Willcox List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2013 20:08:49 -0000 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 |