From owner-freebsd-questions@freebsd.org Sun Jun 28 06:26:06 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 A197598F59E for ; Sun, 28 Jun 2015 06:26:06 +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 5143C114C for ; Sun, 28 Jun 2015 06:26:06 +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 t5S6Q4Qx015913 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 28 Jun 2015 00:26:04 -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 t5S6Q3mi015910; Sun, 28 Jun 2015 00:26:04 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Sun, 28 Jun 2015 00:26:03 -0600 (MDT) From: Warren Block To: Chris Stankevitz cc: freebsd-questions Subject: Re: Corrupt GPT on ZFS full-disks that shouldn't be using GPT 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]); Sun, 28 Jun 2015 00:26:04 -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: Sun, 28 Jun 2015 06:26:06 -0000 On Sat, 27 Jun 2015, Chris Stankevitz wrote: > I have 11 drives in a zpools. The zpool is using the drives. i.e. I > used "zpool create da1 da2 da3 ... daN". The zpools are running well. > > In a former life, each of these these drives held two gpart > partitions. Apparently I did not "gpart destroy" these drives before > creating a zpool out of them. > > Now when my computer boots, > > 1. the zpool comes up and is healthy > > 2. ls /dev/daX* does not show any of the "old" partitions. > > 3. dmesg reports "the primary GPT table is corrupt or invalid" and > "using the secondary instead -- recovery strongly advised." > > Q: Am I in danger of GPT wrestling control of the drive away from ZFS No, but I would want to fix it so it doesn't surprise me at some inopportune later date. > Q: How can I remove the secondary GPT table from each of the drives > that are participating in the zpool? I suppose I could offline and > resilver each of them. I'm afraid to dd the secondary GPT header at > the last 512 bytes of the drive. Erasing just the last block would probably be enough. Still, the only reason to be afraid of it is if you do not have a full backup. And if you don't have a full backup, that is the first thing to do. > Perhaps there is a way I can ask ZFS > to do that for me? Not that I know of. If the backup GPT were in an area that ZFS writes, it would have been overwritten when the ZFS label was installed. Here is the forum thread where I show the math about erasing the backup GPT: https://forums.freebsd.org/threads/gpt-table-corrupt.52102/#post-292341