From nobody@FreeBSD.org  Sun Nov 20 13:28:43 2011
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id EDF71106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 20 Nov 2011 13:28:43 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id DE07A8FC08
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 20 Nov 2011 13:28:43 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id pAKDShEI050724
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 20 Nov 2011 13:28:43 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id pAKDShM4050698;
	Sun, 20 Nov 2011 13:28:43 GMT
	(envelope-from nobody)
Message-Id: <201111201328.pAKDShM4050698@red.freebsd.org>
Date: Sun, 20 Nov 2011 13:28:43 GMT
From: Jason Edwards <sub.mesa@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: gpart label changes only take effect after a reboot
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         162690
>Category:       kern
>Synopsis:       [geom] gpart label changes only take effect after a reboot
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-geom
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Nov 20 13:30:16 UTC 2011
>Closed-Date:    
>Last-Modified:  Thu Aug 22 09:40:00 UTC 2013
>Originator:     Jason Edwards
>Release:        FreeBSD 9.0-RC2
>Organization:
ZFSguru
>Environment:
FreeBSD zfsguru.bsd 9.0-RC2 FreeBSD 9.0-RC2 #0: Fri Nov 18 16:17:10 UTC 2011     root@zfsguru:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
gpart has functionality to change the label of a (GPT) partition. This functionality works like it should, however, after a label change the /dev/gpt/ entries remain unchanged. glabel status output remains unchanged. The change only takes effect after a reboot.

The device was not in use or otherwise 'locked', gpart list shows the new label, but otherwise it appears that the gpart modify -l command does not actually change the device entries, as is expected and desired.
>How-To-Repeat:
[root@zfsguru ~]# gpart show ada0
=>      34  12582845  ada0  GPT  (6.0G)
        34       512     1  freebsd-boot  (256k)
       546      1502        - free -  (751k)
      2048  12576768     2  freebsd-zfs  (6G)
  12578816      4063        - free -  (2M)

[root@zfsguru ~]# glabel status
                  Name  Status  Components
iso9660/ZFSGURU-LIVECD     N/A  cd0
         gpt/testdisk1     N/A  ada0p2

[root@zfsguru ~]# gpart list ada0 | grep label
   label: (null)
   label: testdisk1

[root@zfsguru ~]# gpart modify -i 1 -l "bootlabel" ada0
ada0p1 modified

[root@zfsguru ~]# gpart list ada0 | grep label
   label: bootlabel
   label: testdisk1

[root@zfsguru ~]# glabel status
                  Name  Status  Components
iso9660/ZFSGURU-LIVECD     N/A  cd0
         gpt/testdisk1     N/A  ada0p2

[root@zfsguru ~]# ls -l /dev/gpt/
total 0
crw-r-----  1 root  operator    0,  76 Nov 20 13:19 testdisk1
>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-geom 
Responsible-Changed-By: ae 
Responsible-Changed-When: Mon Aug 6 04:59:45 UTC 2012 
Responsible-Changed-Why:  
Reassign. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=162690 

From: deeptech71 <deeptech71@gmail.com>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/162690: [geom] gpart label changes only take effect after
 a reboot
Date: Fri, 29 Mar 2013 08:52:32 +0100

 There is a (critical-severity (!)) duplicate of this bug report:
 
 bin/177080: gpart(8): /dev/gpt labels are not updated on ``gpart modify''
 
 
 
 I'll note an additional discovery: mounting and unmounting the relabeled partition also causes /dev/gpt/* to be updated.

From: Geoff Garside <freebsd@geoffgarside.co.uk>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/162690: [geom] gpart label changes only take effect after a reboot
Date: Thu, 22 Aug 2013 10:31:49 +0100

 This still appears to be alive and kicking in 9.1p6, I've admittedly not =
 tested 9.2 or 10-CURRENT
 
>Unformatted:
