Date: Tue, 19 Sep 2017 15:08:31 +0000 (UTC) From: Alexey Dokuchaev <danfe@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323764 - head/sbin/geom/class/part Message-ID: <201709191508.v8JF8V3P001740@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: danfe (ports committer) Date: Tue Sep 19 15:08:31 2017 New Revision: 323764 URL: https://svnweb.freebsd.org/changeset/base/323764 Log: Provide an articulate example of how to properly delete partitions and partitioning scheme. Users often get confused and frustrated when trying to delete partition table and getting ``Device busy'' error because they forgot (or did not ever know that they have) to delete all its partitions first, and while the manual page mentions this briefly, it does not stress it out enough. Approved by: ae, manpages (bjk) PR (as inspiration): 196102 Differential Revision: https://reviews.freebsd.org/D12336 Modified: head/sbin/geom/class/part/gpart.8 Modified: head/sbin/geom/class/part/gpart.8 ============================================================================== --- head/sbin/geom/class/part/gpart.8 Tue Sep 19 15:00:19 2017 (r323763) +++ head/sbin/geom/class/part/gpart.8 Tue Sep 19 15:08:31 2017 (r323764) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 25, 2016 +.Dd September 19, 2017 .Dt GPART 8 .Os .Sh NAME @@ -1324,6 +1324,29 @@ partition to contain a UFS filesystem and aligned on 4 After creating all required partitions, embed bootstrap code into them: .Bd -literal -offset indent /sbin/gpart bootcode -p /boot/boot1 da0 +.Ed +.Ss Deleting partitions and partitioning scheme +If you get a +.Em "Device busy" +error when trying to destroy a partition table, remember that you must +delete all its partitions first with the +.Cm delete +action. +In this example, assume we have +.Pa da0 +with three partitions: +.Bd -literal -offset indent +/sbin/gpart delete -i 3 da0 +/sbin/gpart delete -i 2 da0 +/sbin/gpart delete -i 1 da0 +/sbin/gpart destroy da0 +.Ed +.Pp +Alternatively, you can invoke the +.Cm destroy +action with the +.Fl F +flag. .Ed .Ss Backup and Restore .Pp
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201709191508.v8JF8V3P001740>