From owner-freebsd-current@FreeBSD.ORG Mon Aug 22 15:45:47 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8EAC0106564A; Mon, 22 Aug 2011 15:45:47 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from forward12.mail.yandex.net (forward12.mail.yandex.net [IPv6:2a02:6b8:0:801::2]) by mx1.freebsd.org (Postfix) with ESMTP id 0729A8FC0A; Mon, 22 Aug 2011 15:45:47 +0000 (UTC) Received: from smtp13.mail.yandex.net (smtp13.mail.yandex.net [95.108.130.68]) by forward12.mail.yandex.net (Yandex) with ESMTP id 63097C252D1; Mon, 22 Aug 2011 19:45:45 +0400 (MSD) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1314027945; bh=h4K0UlTy/y7i7Of4lLEstmL2+HXkvhdVEnczFBFUnvY=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=p+P3soTLO0ZoaUpPdAFJUGh0zjHkJQfyPaW66kG1Lq65PRrhLmn757fhUcu3D8MLx 2d+SLiemJWNmR5yHrXUdMTKXw+7rFKTDgxVw10YBQuNizgJ1q0qauNzKSRgfzMeKUQ yyvuUsmI6AzWYccwWMRMg1Cban6UaVucrXEeOCf8= Received: from smtp13.mail.yandex.net (localhost [127.0.0.1]) by smtp13.mail.yandex.net (Yandex) with ESMTP id 4207FE40015; Mon, 22 Aug 2011 19:45:45 +0400 (MSD) Received: from dynamic-178-141-127-99.kirov.comstar-r.ru (dynamic-178-141-127-99.kirov.comstar-r.ru [178.141.127.99]) by smtp13.mail.yandex.net (nwsmtp/Yandex) with ESMTP id jimeq1Kp; Mon, 22 Aug 2011 19:45:45 +0400 X-Yandex-Spam: 1 Message-ID: <4E52797F.6060100@yandex.ru> Date: Mon, 22 Aug 2011 19:45:03 +0400 From: "Andrey V. Elsukov" User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.17) Gecko/20110429 Thunderbird/3.1.10 MIME-Version: 1.0 To: Nathan Whitehorn References: <4E4DB9A7.4040404@freebsd.org> <4E517978.2020705@freebsd.org> <64622705-80AB-4FEF-91E9-8F3041818B4E@xcllnt.net> <4E519C13.4060700@freebsd.org> <4E51E019.4060206@yandex.ru> In-Reply-To: X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Mon, 22 Aug 2011 15:53:04 +0000 Cc: freebsd-current@freebsd.org, Marcel Moolenaar Subject: Re: Well, there goes Windows! X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Aug 2011 15:45:47 -0000 On 22.08.2011 17:13, Nathan Whitehorn wrote: >> Actually you can destroy underlying MBR geom without committing, just >> use "force" flag. >> But there is another problem, the metadata of nested scheme will not >> deleted and it might >> appear again when you create new MBR and new partition in the same place. > > This isn't true for nested partitioning, at least in my experience. You can try: # mdconfig -s 100m # gpart create -s mbr md0 # gpart add -t freebsd md0 # gpart create -s bsd md0s1 # gpart add -t freebsd-ufs md0s1 # gpart destroy -F -f x md0 But when you create MBR again: # gpart create -f x -s mbr md0 # gpart add -f x -t fat32 md0 Now the old BSD scheme will be detected: => 9 204791 md0 MBR (100M) 9 204786 1 fat32 (100M) 204795 5 - free - (2.5k) => 0 204786 md0s1 BSD (100M) 0 204786 1 freebsd-ufs (100M) ---------------------------------------------- The forced destroying does not work for the case when you destroyed nested scheme before MBR, e.g. # gpart destroy -f x -F md0s1 # gpart destroy -f x -F md0 gpart: Device busy It's because the first destroying is not committed and provider md0s1 is still opened: # gpart list md0s1 | grep Mode Mode: r1w1e1 <----- -- WBR, Andrey V. Elsukov