From nobody@FreeBSD.org  Sun Feb 16 10:37:54 2014
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 ESMTPS id C14CF1EA
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 16 Feb 2014 10:37:54 +0000 (UTC)
Received: from newred.freebsd.org (cgiserv.freebsd.org [IPv6:2001:1900:2254:206a::50:4])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 94282120C
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 16 Feb 2014 10:37:54 +0000 (UTC)
Received: from cgiserv.freebsd.org ([127.0.1.6])
	by newred.freebsd.org (8.14.7/8.14.7) with ESMTP id s1GAbq9c079589
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 16 Feb 2014 10:37:52 GMT
	(envelope-from nobody@cgiserv.freebsd.org)
Received: (from nobody@localhost)
	by cgiserv.freebsd.org (8.14.7/8.14.7/Submit) id s1GAbqIY079576;
	Sun, 16 Feb 2014 10:37:52 GMT
	(envelope-from nobody)
Message-Id: <201402161037.s1GAbqIY079576@cgiserv.freebsd.org>
Date: Sun, 16 Feb 2014 10:37:52 GMT
From: "Vladislav V. Prodan" <admin@support.od.ua>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Gpart when cloning does not transfer label name
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         186814
>Category:       bin
>Synopsis:       gpart(8) when cloning does not transfer label name
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-geom
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Feb 16 10:40:01 UTC 2014
>Closed-Date:    Mon Feb 24 09:58:53 UTC 2014
>Last-Modified:  Mon Feb 24 09:58:53 UTC 2014
>Originator:     Vladislav V. Prodan
>Release:        FreeBSD 10.0
>Organization:
support.od.ua
>Environment:
FreeBSD vm-10-1.domain.com 10.0-STABLE FreeBSD 10.0-STABLE #0: Sun Feb 16 06:09:42 EET 2014     root@vm-10-1.domain.com:/usr/obj/usr/src/sys/GENERIC  amd64

>Description:
Gpart when cloning does not transfer label name


I increased the size of the pool by adding a larger disk ada1:
#gpart backup ada0 > ada0.backup
#ee ada0.backup  # fix name
# cat ada0.backup
GPT 128
1   freebsd-boot       34     1024 boot-1
2   freebsd-swap     2048  2097152 swap-ada1
3    freebsd-zfs  2099200 14677983 system-ada1

#gpart restore ada1 < ada0.backup
#gpart resize -i 3 ada1

# gpart list | egrep 'name|^   type|label'
Geom name: ada0
   label: boot-0
   type: freebsd-boot
   label: swap-ada0
   type: freebsd-swap
   label: system-ada0
   type: freebsd-zfs
Geom name: ada1
   label: (null)
   type: freebsd-boot
   label: (null)
   type: freebsd-swap
   label: (null)
   type: freebsd-zfs
Geom name: diskid/DISK-VB7f1c16c2-98b6ad8e
   label: (null)
   type: freebsd-boot
   label: (null)
   type: freebsd-swap
   label: (null)
   type: freebsd-zfs
# gpart show
=>      34  16777149  ada0  GPT  (8.0G)
        34      1024     1  freebsd-boot  (512K)
      1058       990        - free -  (495K)
      2048   2097152     2  freebsd-swap  (1.0G)
   2099200  14677983     3  freebsd-zfs  (7.0G)

=>      34  20971453  ada1  GPT  (10G)
        34      1024     1  freebsd-boot  (512K)
      1058       990        - free -  (495K)
      2048   2097152     2  freebsd-swap  (1.0G)
   2099200  18872287     3  freebsd-zfs  (9.0G)

=>      34  20971453  diskid/DISK-VB7f1c16c2-98b6ad8e  GPT  (10G)
        34      1024                                1  freebsd-boot  (512K)
      1058       990                                   - free -  (495K)
      2048   2097152                                2  freebsd-swap  (1.0G)
   2099200  18872287                                3  freebsd-zfs  (9.0G)

# zpool status
  pool: zroot
 state: ONLINE
  scan: none requested
config:

        NAME               STATE     READ WRITE CKSUM
        zroot              ONLINE       0     0     0
          gpt/system-ada0  ONLINE       0     0     0

errors: No known data errors


>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:

From: Ulf Lilleengen <lulf@freebsd.org>
To: freebsd-bugs@freebsd.org
Cc: "Vladislav V. Prodan" <admin@support.od.ua>, freebsd-gnats-submit@freebsd.org
Subject: Re: misc/186814: Gpart when cloning does not transfer label name
Date: Thu, 20 Feb 2014 21:56:26 +0100

 Have you tried the -l flag to restore?
 
 # gpart restore -l ada1 < ada0.backup 
 
 Ulf
Responsible-Changed-From-To: freebsd-bugs->freebsd-geom 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sat Feb 22 03:04:45 UTC 2014 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=186814 
State-Changed-From-To: open->closed 
State-Changed-By: ae 
State-Changed-When: Mon Feb 24 09:57:54 UTC 2014 
State-Changed-Why:  
Not a bug. Use gpart restore -l to restore labels. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=186814 
>Unformatted:
