From owner-freebsd-questions@freebsd.org Thu Jun 25 23:57:21 2015 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B999F98CB2C for ; Thu, 25 Jun 2015 23:57:21 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "wonkity.com", Issuer "wonkity.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id C9E911D96 for ; Thu, 25 Jun 2015 23:57:20 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.9/8.14.9) with ESMTP id t5PNvIfw005639 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 25 Jun 2015 17:57:18 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.9/8.14.9/Submit) with ESMTP id t5PNvIC2005636; Thu, 25 Jun 2015 17:57:18 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Thu, 25 Jun 2015 17:57:18 -0600 (MDT) From: Warren Block To: William Dudley cc: freebsd-questions@freebsd.org Subject: Re: how to fix "CORRUPT" partition table in mirrored drive In-Reply-To: Message-ID: References: User-Agent: Alpine 2.20 (BSF 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (wonkity.com [127.0.0.1]); Thu, 25 Jun 2015 17:57:18 -0600 (MDT) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2015 23:57:21 -0000 On Thu, 25 Jun 2015, William Dudley wrote: > I have a mirrored drive: > > gpart show -l > => 63 78156225 ad0 MBR (37G) > 63 78156162 1 (null) [active] (37G) > 78156225 63 - free - (31k) > > => 0 78156162 ad0s1 BSD (37G) > 0 41943040 1 (null) (20G) > 41943040 2097152 2 (null) (1.0G) > 44040192 34115970 4 (null) (16G) > > => 63 3907029104 mirror/gm0 MBR (1.8T) [CORRUPT] > 63 3907029105 1 (null) [active] (1.8T) > > => 0 3907029105 mirror/gm0s1 BSD (1.8T) > 0 335544320 4 (null) (160G) > 335544320 209715200 5 (null) (100G) > 545259520 209715200 6 (null) (100G) > 754974720 3152054385 7 (null) (1.5T) > > I tried to fix the corrupt partition table like this: > > gpart recover mirror/gm0 > gpart: recovering 'mirror/gm0' failed: Function not implemented > > So how do I fix the corrupt partition table? Can I un-mirror the two drives > and then do the gpart recover and then re-mirror them? gpart recover only works with some partitioning schemes. GPT has a backup copy of the partition table that can be used to recover the primary one. MBR and BSD partitioning schemes do not have redundant metadata for recover to use.