bin/148687: [geom] gpart prints invalid partition number when destroying

Bruce Cran bruce at cran.org.uk
Fri Jul 16 17:40:08 UTC 2010


>Number:         148687
>Category:       bin
>Synopsis:       [geom] gpart prints invalid partition number when destroying
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jul 16 17:40:07 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Bruce Cran
>Release:        FreeBSD 9.0-HEAD-20100715-JPSNAP amd64
>Organization:
>Environment:
System: FreeBSD bsdbook.nessbank 9.0-HEAD-20100715-JPSNAP FreeBSD 9.0-HEAD-20100715-JPSNAP #0: Thu Jul 15 06:37:19 UTC 2010 root at build-amd64-fbsd.allbsd.org:/usr/obj/usr/src/sys/GENERIC amd64


	
>Description:
	After using the feature which allows the creation of slices and 
partitions to be undone within gpart, deleting a freebsd partition results in 
geom printing a large negative number instead of "1". 
>How-To-Repeat:
gpart create -s mbr -f x da0
gpart add -t freebsd -f x da0
gpart create -s bsd -f x da0s1
gpart destroy da0s1
gpart delete -i 1 da0

A log of the output is attached.
>Fix:

	

--- gpart.log begins here ---
bsdbook# dmesg | grep da0
da0 at umass-sim0 bus 0 scbus1 target 0 lun 0
da0: <PEAK III Flash Drive 0.00> Removable Direct Access SCSI-2 device 
da0: 40.000MB/s transfers
da0: 1967MB (4030463 512 byte sectors: 255H 63S/T 250C)
bsdbook# gpart show da0
gpart: No such geom: da0.
bsdbook# gpart create -f x -s mbr da0
da0 created
bsdbook# gpart add -f x -t freebsd da0
da0s1 added
bsdbook# gpart create -f x -s bsd da0s1
da0s1 created
bsdbook# gpart destroy da0s1
da0s1 destroyed
bsdbook# gpart delete -i 1 da0
da0s-559038242 deleted
--- gpart.log ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:
 >uncommitted slice/partition.


More information about the freebsd-bugs mailing list