From owner-freebsd-arch@FreeBSD.ORG Thu Sep 25 21:45:15 2008 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 85DC91065746 for ; Thu, 25 Sep 2008 21:45:15 +0000 (UTC) (envelope-from peter@wemm.org) Received: from ag-out-0708.google.com (ag-out-0708.google.com [72.14.246.242]) by mx1.freebsd.org (Postfix) with ESMTP id 45E0B8FC12 for ; Thu, 25 Sep 2008 21:45:15 +0000 (UTC) (envelope-from peter@wemm.org) Received: by ag-out-0708.google.com with SMTP id 8so565971agc.3 for ; Thu, 25 Sep 2008 14:45:14 -0700 (PDT) Received: by 10.100.112.6 with SMTP id k6mr396303anc.71.1222379113839; Thu, 25 Sep 2008 14:45:13 -0700 (PDT) Received: by 10.100.154.11 with HTTP; Thu, 25 Sep 2008 14:45:13 -0700 (PDT) Message-ID: Date: Thu, 25 Sep 2008 14:45:13 -0700 From: "Peter Wemm" To: "Marcel Moolenaar" In-Reply-To: <901FB1DE-BA4C-405C-8F8E-AA8CCC6A89FA@mac.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1896.1222371977@critter.freebsd.dk> <901FB1DE-BA4C-405C-8F8E-AA8CCC6A89FA@mac.com> Cc: FreeBSD Arch , Poul-Henning Kamp Subject: Re: RFC: making gpart default X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Sep 2008 21:45:15 -0000 On Thu, Sep 25, 2008 at 2:24 PM, Marcel Moolenaar wrote: > On Sep 25, 2008, at 12:46 PM, Poul-Henning Kamp wrote: [..] >> pretty conclusively, but fsck will happily trash a database >> stored in partition that previously contained a filesystem, >> provided enough magic bits survive near the start. > > That's why I believe we need to attach real meaning > to the partition type. We should disallow a newfs_ufs > on a partition that is not of type freebsd-ufs. We > should disallow swapon for a partition that is not > of type freebsd-swap. etc.. > > With gpart it's trivial to change the partition type, > so it's no hassle. The protection and support this > gives users certainly outweighs the hassle IMO. Don't forget that we currently support creating file systems on raw disk devices. eg: /dev/ad1. You are currently allowed to swapon /dev/ad2. There are a lot of those out there, you can't break it because people know where you work and will come find you. :) This however, is a different issue to switching GEOM_BSD + GEOM_MBR to GEOM_PART_BSD + GEOM_PART_MBR. (I think the partition type thing could be solved by specifying the heuristic as "if the partition *has a type* and its not ufs, then disallow ufs" etc. Don't forget to include --shoot-foot=allowed override mode.) -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI6FJV "All of this is for nothing if we don't go to the stars" - JMS/B5 "If Java had true garbage collection, most programs would delete themselves upon execution." -- Robert Sewell