[Bug 262241] gpart(8) destroy: option -F seems to not effectively destroy all partitions in some situations

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 28 Feb 2022 06:15:56 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=262241

            Bug ID: 262241
           Summary: gpart(8) destroy: option -F seems to not effectively
                    destroy all partitions in some situations
           Product: Base System
           Version: CURRENT
          Hardware: Any
               URL: https://www.freebsd.org/cgi/man.cgi?query=gpart&sektio
                    n=8&manpath=FreeBSD#DESCRIPTION
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: grahamperrin@gmail.com

From
<https://www.freebsd.org/cgi/man.cgi?query=gpart&sektion=8&manpath=FreeBSD#EXAMPLES>: 

> … -F option can be given with destroy to delete all of the partitions 
> before destroying the partitioning scheme. …

From <https://forums.freebsd.org/posts/558256>: 


…
root@mowa219-gjp4-8570p-freebsd:~ # gpart create -s MBR da4
da4 created
root@mowa219-gjp4-8570p-freebsd:~ # gpart add -t freebsd da4
da4s1 added
root@mowa219-gjp4-8570p-freebsd:~ # gpart create -s BSD da4s1
da4s1 created
root@mowa219-gjp4-8570p-freebsd:~ # gpart add -t freebsd-swap da4s1
da4s1a added
…
root@mowa219-gjp4-8570p-freebsd:~ # gpart destroy -F da4
da4 destroyed
root@mowa219-gjp4-8570p-freebsd:~ # gpart create -s MBR da4
da4 created
root@mowa219-gjp4-8570p-freebsd:~ # gpart add -t freebsd da4
da4s1 added
root@mowa219-gjp4-8570p-freebsd:~ # gpart create -s BSD da4s1
gpart: geom 'da4s1': File exists
root@mowa219-gjp4-8570p-freebsd:~ #


The existence of da4s1 suggests that prior destruction by gpart was not
entirely effective.

-- 
You are receiving this mail because:
You are the assignee for the bug.