From nobody@FreeBSD.org  Fri Jul 26 02:21:20 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTP id 0291965B
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 26 Jul 2013 02:21:20 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id CACF02CA6
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 26 Jul 2013 02:21:19 +0000 (UTC)
Received: from oldred.freebsd.org ([127.0.1.6])
	by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r6Q2LJFS049898
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 26 Jul 2013 02:21:19 GMT
	(envelope-from nobody@oldred.freebsd.org)
Received: (from nobody@localhost)
	by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r6Q2LJja049890;
	Fri, 26 Jul 2013 02:21:19 GMT
	(envelope-from nobody)
Message-Id: <201307260221.r6Q2LJja049890@oldred.freebsd.org>
Date: Fri, 26 Jul 2013 02:21:19 GMT
From: Garrett Cooper <yaneurabeya@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: gpart backup/restore doesn't restore labels
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         180861
>Category:       bin
>Synopsis:       gpart(8): gpart backup/restore doesn't restore labels
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jul 26 02:30:00 UTC 2013
>Closed-Date:    
>Last-Modified:  Fri Jul 26 23:10:00 UTC 2013
>Originator:     Garrett Cooper
>Release:        10-CURRENT
>Organization:
EMC Isilon
>Environment:
10-CURRENT at 02/16/2013
>Description:
I'm rebuilding a GPT table from scratch which was previously mirrored, attempting using...

gpart backup ada0 > /tmp/bk
gpart restore ada1 < /tmp/bk

And noticed that it didn't restore the labels for the device when I ran `gpart list ada1`.

All of the other data was in synch.

These devices were previously being synched via a single gmirror.
>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:

From: "Andrey V. Elsukov" <bu7cher@yandex.ru>
To: Garrett Cooper <yaneurabeya@gmail.com>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: bin/180861: gpart backup/restore doesn't restore labels
Date: Fri, 26 Jul 2013 14:03:09 +0400

 On 26.07.2013 06:21, Garrett Cooper wrote:
 >> Description:
 > I'm rebuilding a GPT table from scratch which was previously mirrored, attempting using...
 > 
 > gpart backup ada0 > /tmp/bk
 > gpart restore ada1 < /tmp/bk
 > 
 > And noticed that it didn't restore the labels for the device when I ran `gpart list ada1`.
 
 You forgot to specify -l flag when restoring. But anyway it can't
 restore scheme specific labels, like gptids.
 
 -- 
 WBR, Andrey V. Elsukov

From: Garrett Cooper <yaneurabeya@gmail.com>
To: "Andrey V. Elsukov" <bu7cher@yandex.ru>
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: bin/180861: gpart backup/restore doesn't restore labels
Date: Fri, 26 Jul 2013 12:18:53 -0700

 On Fri, Jul 26, 2013 at 3:03 AM, Andrey V. Elsukov <bu7cher@yandex.ru> wrote:
 > On 26.07.2013 06:21, Garrett Cooper wrote:
 >>> Description:
 >> I'm rebuilding a GPT table from scratch which was previously mirrored, attempting using...
 >>
 >> gpart backup ada0 > /tmp/bk
 >> gpart restore ada1 < /tmp/bk
 >>
 >> And noticed that it didn't restore the labels for the device when I ran `gpart list ada1`.
 >
 > You forgot to specify -l flag when restoring. But anyway it can't
 > restore scheme specific labels, like gptids.
 
 Ack, ok. From a usability perspective though I would hope that -l
 would default to on, not off. It caught me by surprise more than
 anything else when the labels weren't present.

From: "Andrey V. Elsukov" <bu7cher@yandex.ru>
To: Garrett Cooper <yaneurabeya@gmail.com>
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: bin/180861: gpart backup/restore doesn't restore labels
Date: Sat, 27 Jul 2013 02:57:30 +0400

 On 26.07.2013 23:18, Garrett Cooper wrote:
 > On Fri, Jul 26, 2013 at 3:03 AM, Andrey V. Elsukov <bu7cher@yandex.ru> wrote:
 >> On 26.07.2013 06:21, Garrett Cooper wrote:
 >>>> Description:
 >>> I'm rebuilding a GPT table from scratch which was previously mirrored, attempting using...
 >>>
 >>> gpart backup ada0 > /tmp/bk
 >>> gpart restore ada1 < /tmp/bk
 >>>
 >>> And noticed that it didn't restore the labels for the device when I ran `gpart list ada1`.
 >>
 >> You forgot to specify -l flag when restoring. But anyway it can't
 >> restore scheme specific labels, like gptids.
 > 
 > Ack, ok. From a usability perspective though I would hope that -l
 > would default to on, not off. It caught me by surprise more than
 > anything else when the labels weren't present.
 
 It isn't on by default, because GEOM_LABELS doesn't like when different
 providers have the same labels.
 
 -- 
 WBR, Andrey V. Elsukov
>Unformatted:
