From owner-freebsd-questions@freebsd.org Fri Jun 26 00:43:31 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 67D0F98D2B7 for ; Fri, 26 Jun 2015 00:43:31 +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 E40281558 for ; Fri, 26 Jun 2015 00:43:30 +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 t5Q0hSVp017019 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 25 Jun 2015 18:43:28 -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 t5Q0hSMn017016; Thu, 25 Jun 2015 18:43:28 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Thu, 25 Jun 2015 18:43:28 -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 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (wonkity.com [127.0.0.1]); Thu, 25 Jun 2015 18:43:28 -0600 (MDT) Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8BIT X-Content-Filtered-By: Mailman/MimeDel 2.1.20 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: Fri, 26 Jun 2015 00:43:31 -0000 On Thu, 25 Jun 2015, William Dudley wrote: > Warren, > Again, thanks for the reply.  Does the fact that gpart show -l reports this: > > =>        63  3907029104  mirror/gm0  MBR  (1.8T) [CORRUPT] > > Mean that I'm screwed and must copy all the data to a new drive and > create the mirror anew? Possibly. Years back, the Handbook showed the quick but wrong way to create a mirror out of an existing disk with a filesystem on it. The new integrity check does not like that, because the last block of a partition was reused. Here, if you add up the lengths of the partitions on gm0s1, you'll find that it is one block longer than the size of gm0. See the "4" versus "5" in the last digit of the sizes of gm0 and gm0s1? The contents of a partition cannot be larger than the partition itself. > =>        63  3907029104  mirror/gm0  MBR  (1.8T) [CORRUPT] ^^^^^^^^^^ > > =>         0  3907029105  mirror/gm0s1  BSD  (1.8T) ^^^^^^^^^^ That could be fixed by shrinking the last partition by one block, but shrinking it will not resize the UFS filesystem on it, and possibly leave it unusable. If it were me, I'd back everything up, then follow the new procedures in the Handbook to create the mirror correctly. Those procedures were extensively tested. (Ask me how I know.)