Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Dec 2015 11:37:12 -0800
From:      Ravi Pokala <rpokala@mac.com>
To:        Ian Lepore <ian@freebsd.org>, Alexey Dokuchaev <danfe@FreeBSD.org>, "Andrey V. Elsukov" <ae@FreeBSD.org>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r292058 - head/sbin/geom/class/part
Message-ID:  <7C4EDA10-2CB9-4311-A3DB-952ED68E34E9@panasas.com>
In-Reply-To: <1449940829.1358.154.camel@freebsd.org>
References:  <201512101037.tBAAbDMq065138@repo.freebsd.org> <1449767147.1358.62.camel@freebsd.org> <5669B969.5020605@FreeBSD.org> <20151212121209.GA60800@FreeBSD.org> <1449940829.1358.154.camel@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
-----Original Message-----


From: <owner-src-committers@freebsd.org> on behalf of Ian Lepore <ian@freebsd.org>
Date: 2015-12-12, Saturday at 09:20
To: Alexey Dokuchaev <danfe@FreeBSD.org>, "Andrey V. Elsukov" <ae@FreeBSD.org>
Cc: <src-committers@freebsd.org>, <svn-src-all@freebsd.org>, <svn-src-head@freebsd.org>
Subject: Re: svn commit: r292058 - head/sbin/geom/class/part

>I spent much of the last week fighting with "geom destroy" and trying
>to prevent the ressurection of old geoms during the creation of new
>ones.  It's a Big Mess and it doesn't really work well at all.  I came
>to the conclusion that it's not geom destroy that needs a force flag so
>much as geom create, where it would mean "it is okay to replace any
>existing geom with the new one."
>
>For example if you have a freebsd slice da0s1 that contains freebsd
>partitions within it, and you geom destroy -F da0 then that slice and
>the partitions within it disappear.  Then as soon as you create a new
>geom for the device and add a slice that happens to fall on the same
>sector that da0s1 used to live at, suddenly that whole geom tree comes
>back to life and your next command to create a new geom da0s1 fails
>because it already exists.

At work, we frequently boot from LAN and do automated installs. The partitioning ~never changes, so we run into exactly the scenario you described. I ended up doing a horrible hack which parses the existing partition table (both slice/label and GPT), and zeros out the first and last few sectors of each partition. AND parse the partitioning info we're passing to the installer, and zeroing out the first and last sectors of the partitions we're ABOUT TO create. It's a medium-sized PITA, but it works.

-Ravi (rpokala@)




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7C4EDA10-2CB9-4311-A3DB-952ED68E34E9>