From wb@kloke-witten.dyndns.org  Thu Jun  7 14:47:01 2007
Return-Path: <wb@kloke-witten.dyndns.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 3173816A468
	for <FreeBSD-gnats-submit@freebsd.org>; Thu,  7 Jun 2007 14:47:01 +0000 (UTC)
	(envelope-from wb@kloke-witten.dyndns.org)
Received: from kloke-witten.dyndns.org (i5387FD7D.versanet.de [83.135.253.125])
	by mx1.freebsd.org (Postfix) with ESMTP id 969A813C448
	for <FreeBSD-gnats-submit@freebsd.org>; Thu,  7 Jun 2007 14:47:00 +0000 (UTC)
	(envelope-from wb@kloke-witten.dyndns.org)
Received: from wbk4.home (localhost [127.0.0.1])
	by kloke-witten.dyndns.org (8.13.8/8.13.8) with ESMTP id l57EXFwu018621
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 7 Jun 2007 16:33:15 +0200 (CEST)
	(envelope-from wb@wbk4.home)
Received: (from wb@localhost)
	by wbk4.home (8.13.8/8.13.8/Submit) id l57EXEXu018620;
	Thu, 7 Jun 2007 16:33:14 +0200 (CEST)
	(envelope-from wb)
Message-Id: <200706071433.l57EXEXu018620@wbk4.home>
Date: Thu, 7 Jun 2007 16:33:14 +0200 (CEST)
From: "W.B.Kloke" <wb@kloke-witten.dyndns.org>
Reply-To: "W.B.Kloke" <wb@kloke-witten.dyndns.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: gpt does not allow changing partition table
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         113456
>Category:       bin
>Synopsis:       [request] gpt(8) does not allow changing partition table
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jun 07 14:50:01 GMT 2007
>Closed-Date:    Sat Jan 02 00:46:00 UTC 2010
>Last-Modified:  Sat Jan 02 00:46:00 UTC 2010
>Originator:     W.B.Kloke
>Release:        FreeBSD 6.2-STABLE i386
>Organization:
>Environment:
System: FreeBSD wbk4 6.2-STABLE FreeBSD 6.2-STABLE #10: Sat Jan 20 22:40:43 CET 2007 wb@wbk1:/usr/src/sys/i386/compile/BRIDGE i386


	
>Description:
	GPT partion tables cannot be changed if one of the partions is mounted.

	Example:
	bash-2.05b$ gpt -r show ad1
	      start       size  index  contents
		  0          1         PMBR
		  1          1         Pri GPT header
		  2         32         Pri GPT table
		 34         45         
		 79     317504      1  GPT part - FreeBSD UFS/UFS2
	     317583    1000000      2  GPT part - FreeBSD swap
	    1317583     317520      3  GPT part - FreeBSD UFS/UFS2
	    1635103   37434977      4  GPT part - FreeBSD UFS/UFS2
	   39070080  136729215      5  GPT part - Linux/Windows
	  175799295  214922640         
	  390721935         32         Sec GPT table
	  390721967          1         Sec GPT header

	In my case partition 4 is mounted (the rest of the system resides
	on ad0), and swap space on p2 is active, too.
	The need for GPT partions arises in my case from two cases
	of use:
	1. multimedia data, i.e. big files, which I want to circumvent
		the file system
	2. arenas for (Plan9) venti file system.

>How-To-Repeat:
	Put a UFS file system on one GPT partition and mount it.
	Then the gpt utility even refuses to show the table unless -r
	flag is used.
>Fix:

	Adopt a policy similar to "fdisk -u" or "bsdlabel -e", please.


>Release-Note:
>Audit-Trail:

From: "Remko Lodder" <remko@elvandar.org>
To: "W.B.Kloke" <wb@kloke-witten.dyndns.org>
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: bin/113456: gpt does not allow changing partition table
Date: Fri, 8 Jun 2007 08:11:51 +0200 (CEST)

 Hello,
 
 I thought that fdisk and bsdlabel were only used when the disk is not
 mounted / used, you can destroy partitions and thus data if you use
 an editor on an active disk so personally I think this is not very
 wise to add...
 
 -- 
 Kind regards,
 
      Remko Lodder               ** remko@elvandar.org
      FreeBSD                    ** remko@FreeBSD.org
 
      /* Quis custodiet ipsos custodes */
 
State-Changed-From-To: open->suspended 
State-Changed-By: linimon 
State-Changed-When: Mon Jan 28 09:20:20 UTC 2008 
State-Changed-Why:  
Mark suspended awaiting patches. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=113456 
State-Changed-From-To: suspended->closed 
State-Changed-By: marcel 
State-Changed-When: Sat Jan 2 00:42:58 UTC 2010 
State-Changed-Why:  
gpt(8) has been obsoleted and replaced with gpart(8) as of FreeBSD 8. 
gpart(8) is also present on FreeBSD 7. No work is expected to happen 
on gpt(8) in FreeBSD 6. 

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