From owner-freebsd-questions@freebsd.org Sun Jun 28 21:12:11 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 036BD98FE57 for ; Sun, 28 Jun 2015 21:12:11 +0000 (UTC) (envelope-from chrisstankevitz@gmail.com) Received: from mail-la0-x234.google.com (mail-la0-x234.google.com [IPv6:2a00:1450:4010:c03::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 81A231B71 for ; Sun, 28 Jun 2015 21:12:10 +0000 (UTC) (envelope-from chrisstankevitz@gmail.com) Received: by lacny3 with SMTP id ny3so104553682lac.3 for ; Sun, 28 Jun 2015 14:12:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=qTUy25YLP3gR18Rojo7MirIRDFcudaJt6DFKXOtG23w=; b=EGRhfQ5Fyj50u5XHahedEbGt30oJrorfVDtG4Y0BwzEQj1rajZCxHti5UPkrdseaFk RKlQ47tlXeRxGbXjTi89Hg2/bnMB+3+S/YYdUASoMVs9/JXxZb1/j5SrwTBWTKZMh2X7 8WYO2wMcdmbnOXd0AKAGL/tJvC8v2SFV52nVYjmHCUFCshk0QIpuFodiVqT4In/NJQKD bcwk8eZ+2Czu89BtyWSikSyY8OeNcRdZ3RW98012Ai9NxlKHQO91uaQQ+sJcCcwdtr0H LUVgAB6Axyg7Z63jwssW2Gu0Tk0UYPzJlHDiuvIjhqo7PBxTfEetFIMu7oW9VCGq1kq7 I1dw== MIME-Version: 1.0 X-Received: by 10.112.219.70 with SMTP id pm6mr10862465lbc.41.1435525928518; Sun, 28 Jun 2015 14:12:08 -0700 (PDT) Received: by 10.25.42.146 with HTTP; Sun, 28 Jun 2015 14:12:08 -0700 (PDT) In-Reply-To: <558F99B6.2080205@sneakertech.com> References: <558F99B6.2080205@sneakertech.com> Date: Sun, 28 Jun 2015 14:12:08 -0700 Message-ID: Subject: Re: Corrupt GPT on ZFS full-disks that shouldn't be using GPT From: Chris Stankevitz To: Quartz Cc: freebsd-questions Content-Type: text/plain; charset=UTF-8 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 21:12:11 -0000 On Sat, Jun 27, 2015 at 11:52 PM, Quartz wrote: > First off, you should double check what's going on with your layout. Thank you for your help. I have four 11-drive raidz3 pools that, in a prior life, lived in FreeNAS. Of course, being in FreeNAS, they were gpart-ed to have two parititons (one for zfs, one for swap). I took these 4 groups of 11-drives over to my FreeBSD box. For each group of 11 drives I: gpart destroy -F /dev/da0 gpart destroy -F /dev/da1 ... gpart destroy -F /dev/da10 zpool create poolname raidz3 /dev/da0 /dev/da1 ... /dev/da10 Unfortunately on one of the 11 groups I forgot to perform the "gpart destroy" step. I did perform the "zpool create" step. This is the group of drives that triggers the dmesg "the primary GPT table is corrupt or invalid" and "using the secondary instead -- recovery strongly advised." >> I suppose I could offline and >> resilver each of them. > > > Simply resilvering is not guaranteed to fix the problem I agree. What I means to say was "offline the drive, dd if=/dev/zero the drive, then resilver it. >> I'm afraid to dd the secondary GPT header at >> the last 512 bytes of the drive. Perhaps there is a way I can ask ZFS >> to do that for me? > > > Zfs doesn't mess with gpt directly like that, so no. If you don't want to What I meant here was to say "Perhaps I can politely ask ZFS 'hey if you are not using the last 512 bytes of these devices, would you mind just filling that with zeros?'". I would feel more comfortable if there was a command like that offered by ZFS rather than me just using dd and hoping it doesn't interfere with ZFS. Chris