From owner-freebsd-stable@FreeBSD.ORG  Fri Jul 25 02:28:47 2014
Return-Path: <owner-freebsd-stable@FreeBSD.ORG>
Delivered-To: freebsd-stable@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by hub.freebsd.org (Postfix) with ESMTPS id 5F4A4E2B
 for <freebsd-stable@FreeBSD.org>; Fri, 25 Jul 2014 02:28:47 +0000 (UTC)
Received: from nahkohe.jetcafe.org (nahkohe.jetcafe.org [205.147.26.32])
 (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 263692423
 for <freebsd-stable@FreeBSD.org>; Fri, 25 Jul 2014 02:28:46 +0000 (UTC)
X-Envelope-To: <freebsd-stable@FreeBSD.org>
Received: from [205.147.26.4] (hokkshideh.jetcafe.org [205.147.26.4])
 by nahkohe.jetcafe.org (8.14.2/8.14.2) with ESMTP id s6P2FEs7081463
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
 for <freebsd-stable@FreeBSD.org>; Thu, 24 Jul 2014 19:15:14 -0700 (PDT)
Message-ID: <53D1BDB2.7030906@jetcafe.org>
Date: Thu, 24 Jul 2014 19:15:14 -0700
From: Dave Hayes <dave@jetcafe.org>
User-Agent: Mozilla/5.0 (X11; FreeBSD amd64;
 rv:24.0) Gecko/20100101 Thunderbird/24.2.0
MIME-Version: 1.0
To: freebsd-stable@FreeBSD.org
Subject: Gmirror + gpart corruption on 9.3-PRE
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-BeenThere: freebsd-stable@freebsd.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: Production branch of FreeBSD source code <freebsd-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/options/freebsd-stable>,
 <mailto:freebsd-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-stable/>
List-Post: <mailto:freebsd-stable@freebsd.org>
List-Help: <mailto:freebsd-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-stable>,
 <mailto:freebsd-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 25 Jul 2014 02:28:47 -0000

At 9.3-PRERELEASE #0 r268066M I've been trying unsucessfuly to set up a 
brand shiny new gmirror + gpt style Raid 0 mirror using the following 
procedure on a disk

  gpart create -s gpt ada0
  ( shows 931G of space)
  gpart add -s 96G -t freebsd-swap -l swap0 ada0
  gpart add -t freebsd-ufs -l rw0 ada0
  gpart create -s gpt ada1
  gpart add -s 96G -t freebsd-swap -l swap1 ada1
  gpart add -t freebsd-ufs -l rw1 ada1
  gmirror label swap /dev/ada0p1 /dev/ada1p1
  gmirror label rw   /dev/ada0p2 /dev/ada1p2
  gpart create -s gpt mirror/swap
  gpart add -s95G -t freebsd-swap -l FBCDSWAP mirror/swap
  gpart create -s gpt mirror/rw
  gpart add -s833G -t freebsd-ufs -l FBCDRW mirror/rw

This consistently gives me the dreaded

  GEOM: mirror/rw: the secondary GPT table is corrupt or invalid

just as soon as I provision the mirror/rw device.

I have tried many ideas of padding these partitions so I don't get this 
message, but to noavail. I'm willing to try more, the machine isn't live 
(yet) so it can sit here while it gets figured out. :)

Back at 9.2-PRERELEASE #0 r255456 I used the same procedure for setting 
up a gmirror, and this worked fine with no corruption. Here's the 
partition table:

 > gpart show
=>       34  976773101  ada0  GPT  (465G)
          34   46245840     1  freebsd-swap  (22G)
    46245874  930523232     2  freebsd-ufs  (443G)
   976769106       4029        - free -  (2M)

=>       34  976773101  ada1  GPT  (465G)
          34   46245840     1  freebsd-swap  (22G)
    46245874  930523232     2  freebsd-ufs  (443G)
   976769106       4029        - free -  (2M)

=>      34  46245772  mirror/swap0  GPT  (22G)
         34  46245772             1  freebsd-swap  (22G)

=>       34  930523164  mirror/rw0  GPT  (443G)
          34  926941184           1  freebsd-ufs  (442G)
   926941218    3581980              - free -  (1.7G)


I've since upgraded this machine to the exact same 9.3 revision and it 
still works fine, no corruption. Am I missing something or did something 
change in between these two revisions that makes it difficult or 
different to set up?

Thanks in advance for any insight you all can provide.
-- 
Dave Hayes - Consultant - Altadena CA, USA - dave@jetcafe.org
 >>>> *The opinions expressed above are entirely my own* <<<<

Enjoyment is not a goal,
it is a feeling that accompanies important ongoing activity