misc/161752: GEOM: glabel doesn't get gpt label change

Leander mr-spott at gmx.de
Mon Oct 17 18:30:16 UTC 2011


>Number:         161752
>Category:       misc
>Synopsis:       GEOM: glabel doesn't get gpt label change
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Oct 17 18:30:15 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Leander
>Release:        9.0-BETA3
>Organization:
Privat
>Environment:
FreeBSD HOST.DOMAIN 9.0-BETA3 FreeBSD 9.0-BETA3 #0: Sat Sep 24 20:46:57 UTC 2011     root at obrian.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386

>Description:
Full description of the szenario could be found here in the FreeBSD Forum:

Topic Name: "FreeBSD 9 BETA3 - glabel Bug?"
http://forums.freebsd.org/newreply.php?do=newreply&noquote=1&p=150897
>How-To-Repeat:
Phase 1 - create partition:


FreeBSD [~]# gpart destroy ada2
ada2 destroyed

FreeBSD [~]# gpart create -s GPT ada2
ada2 created

FreeBSD [~]# gpart add -l "Storage" -t freebsd-ufs ada2
ada2p1 added

FreeBSD [~]# gpart list
Geom name: ada2
modified: false
state: OK
fwheads: 16
fwsectors: 63
last: 390719821
first: 34
entries: 128
scheme: GPT
Providers:
1. Name: ada2p1
   Mediasize: 200048531456 (186G)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 17408
   Mode: r0w0e0
   rawuuid: 9e34e5b5-f747-11e0-b222-000fa30711f1
   rawtype: 516e7cb6-6ecf-11d6-8ff8-00022d09712b
   label: Storage
   length: 200048531456
   offset: 17408
   type: freebsd-ufs
   index: 1
   end: 390719821
   start: 34
Consumers:
1. Name: ada2
   Mediasize: 200048565760 (186G)
   Sectorsize: 512
   Mode: r0w0e0



Phase 2 - modify partition:

FreeBSD [~]# gpart modify -i 1 -l "New-Name"  ada2
ada2p1 modified

FreeBSD [~]# gpart list
Geom name: ada2
modified: false
state: OK
fwheads: 16
fwsectors: 63
last: 390719821
first: 34
entries: 128
scheme: GPT
Providers:
1. Name: ada2p1
   Mediasize: 200048531456 (186G)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 17408
   Mode: r0w0e0
   rawuuid: 9e34e5b5-f747-11e0-b222-000fa30711f1
   rawtype: 516e7cb6-6ecf-11d6-8ff8-00022d09712b
   label: New-Name
   length: 200048531456
   offset: 17408
   type: freebsd-ufs
   index: 1
   end: 390719821
   start: 34
Consumers:
1. Name: ada2
   Mediasize: 200048565760 (186G)
   Sectorsize: 512
   Mode: r0w0e0


As you can see it updated the changes. BUT glabel didn't get informed about the changes:

FreeBSD [~]# glabel status
                                      Name  Status  Components
gptid/2fed8e3d-f4f9-11e0-beaf-000fa30711f1     N/A  ada0p1
                                gpt/RootFS     N/A  ada0p2
[...]
                               gpt/Storage     N/A  ada2p1
gptid/9e34e5b5-f747-11e0-b222-000fa30711f1     N/A  ada2p1
[...]


As you can see it still has outdated label-information "Storage" instead of "New-Name"

FreeBSD [~]# ls -lach /dev/gpt/
total 1
dr-xr-xr-x   2 root  wheel         512B 15 Okt 13:26 .
dr-xr-xr-x  11 root  wheel         512B 15 Okt 15:26 ..
[...]
crw-r-----   1 root  operator    0, 114 15 Okt 15:26 RootFS
crw-r-----   1 root  operator    0, 173 15 Okt 18:06 Storage
[...]


BUT the funny thing is that glabel gets the changes ONLY AFTER I rebooted the machine.
glabel after reboot:

FreeBSD [~]# glabel status
                                      Name  Status  Components
[...]
                                gpt/RootFS     N/A  ada0p2
                              gpt/New-Name     N/A  ada2p1
[...]


>Fix:
a simple restart would fix the problem

OR restart the device by i.e.:

FreeBSD [~]# true > /dev/ada2

Which in my opinion should be done auomatically after label change - as it was in previous RELEASE. Otherwhise what's the use of a framework if user still has to interact while expecting framework apps to communicate among each other.

>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list