From owner-freebsd-arch@FreeBSD.ORG Thu Sep 25 23:49:35 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 09FA21065692 for ; Thu, 25 Sep 2008 23:49:35 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout014.mac.com (asmtpout014.mac.com [17.148.16.89]) by mx1.freebsd.org (Postfix) with ESMTP id EB42B8FC0C for ; Thu, 25 Sep 2008 23:49:34 +0000 (UTC) (envelope-from xcllnt@mac.com) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Received: from alan-tablet.jnpr.net (natint3.juniper.net [66.129.224.36]) by asmtp014.mac.com (Sun Java(tm) System Messaging Server 6.3-7.03 (built Aug 7 2008; 32bit)) with ESMTPSA id <0K7R00GT2ZHK9F00@asmtp014.mac.com> for arch@freebsd.org; Thu, 25 Sep 2008 16:48:57 -0700 (PDT) Message-id: <37A80348-515C-48F4-8F88-A77679BEEA15@mac.com> From: Marcel Moolenaar To: Peter Wemm In-reply-to: Date: Thu, 25 Sep 2008 16:48:55 -0700 References: <1896.1222371977@critter.freebsd.dk> <901FB1DE-BA4C-405C-8F8E-AA8CCC6A89FA@mac.com> X-Mailer: Apple Mail (2.929.2) 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 23:49:35 -0000 On Sep 25, 2008, at 2:45 PM, Peter Wemm wrote: > 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. :) When there's no partitioning scheme on the disk, gpart will not be involved and the checks won't happen. -- Marcel Moolenaar xcllnt@mac.com