From owner-freebsd-questions@FreeBSD.ORG Sat Jan 19 00:41:03 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id CE8AAFD8 for ; Sat, 19 Jan 2013 00:41:03 +0000 (UTC) (envelope-from illoai@gmail.com) Received: from mail-ia0-x232.google.com (mail-ia0-x232.google.com [IPv6:2607:f8b0:4001:c02::232]) by mx1.freebsd.org (Postfix) with ESMTP id 94A61BE for ; Sat, 19 Jan 2013 00:41:03 +0000 (UTC) Received: by mail-ia0-f178.google.com with SMTP id y26so1879566iab.37 for ; Fri, 18 Jan 2013 16:41:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=XbXBsw1HQtSEldhVoPjHA5rcGMBd+u4bYDieiiBas5U=; b=vFapQVnW79C6GfjCvM8OZv+9S11PT0HLWyKeCQzifRKPnsICCJBKUbcU25vxNWqqOa nZ4lCALt8KB52y6aILMJgh9bPzTnycyLLjcO62HSHfCc4JjM7P1mySx4Bo5c5dPWkF+K Px5s9QO3I0mMFTVzWjMWFyi3gpxz+J7RLbqiOBAruLPGcp+ZQ/IpEHgOhyWIgsJzruSF AW6pxMxFmJBK785VCK/jS/dYYhGBzSdPMAaeHXk31SXhI6dGtY/i1o+bWQnWWxlXkJPI h47QhYhojnej9Tyyx7UvvZcPdZ98rnWvxm47s7eQrptPABj4sBKmxNFEfbuvWaK32d6b n+2g== MIME-Version: 1.0 X-Received: by 10.42.91.7 with SMTP id n7mr7248472icm.40.1358556060212; Fri, 18 Jan 2013 16:41:00 -0800 (PST) Received: by 10.64.5.70 with HTTP; Fri, 18 Jan 2013 16:40:59 -0800 (PST) In-Reply-To: <20130118200824.GA4084@rancor.immure.com> References: <20130118200824.GA4084@rancor.immure.com> Date: Fri, 18 Jan 2013 19:40:59 -0500 Message-ID: Subject: Re: Safe way to repair corrupted GPT partition table? From: "illoai@gmail.com" To: Bob Willcox Content-Type: text/plain; charset=ISO-8859-1 Cc: questions list X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Jan 2013 00:41:03 -0000 On 18 January 2013 15:08, Bob Willcox 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@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? Have you tried to repair it with the zfs tools? -- --