From owner-freebsd-current@FreeBSD.ORG Sat Mar 18 00:49:02 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1C4B116A422 for ; Sat, 18 Mar 2006 00:49:02 +0000 (UTC) (envelope-from dmitry@atlantis.dp.ua) Received: from postman.atlantis.dp.ua (postman.atlantis.dp.ua [193.108.47.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2969643D45 for ; Sat, 18 Mar 2006 00:49:00 +0000 (GMT) (envelope-from dmitry@atlantis.dp.ua) Received: from smtp.atlantis.dp.ua (smtp.atlantis.dp.ua [193.108.46.231]) by postman.atlantis.dp.ua (8.13.1/8.13.1) with ESMTP id k2I0mnCb048468; Sat, 18 Mar 2006 02:48:49 +0200 (EET) (envelope-from dmitry@atlantis.dp.ua) Date: Sat, 18 Mar 2006 02:48:49 +0200 (EET) From: Dmitry Pryanishnikov To: Paul Mather In-Reply-To: <1142636322.1188.15.camel@zappa.Chelsea-Ct.Org> Message-ID: <20060318022800.S40573@atlantis.atlantis.dp.ua> References: <20060317204723.7F91416A51F@hub.freebsd.org> <1142636322.1188.15.camel@zappa.Chelsea-Ct.Org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-current@freebsd.org Subject: Re: [patch] NetBSD disklabel support for geom_bsd 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: Sat, 18 Mar 2006 00:49:02 -0000 Hello! On Fri, 17 Mar 2006, Paul Mather wrote: >> 1. NetBSD's 'c' partition describes NetBSD slice (always?). >> 2. NetBSD's 'd' partition describes the whole HDD (always?). > > AFAIK, statement (2) above holds only for a few architectures. > According to the NetBSD disklabel man page, the "d" partition refers to > the whole disk only on i386, hpcmips and arc platforms. On the rest, > the whole disk is referred to by the "c" partition. > > I run NetBSD/alpha, and I've always used the "c" partition to refer to > the whole "raw" disk. (I usually use the "d" partition for /var > or /usr.) Furthermore, on NetBSD/alpha there's no concept of "slices," > so far as I'm aware. As you can see, NetBSD/i386 also doesn't provide slice units and describes slices as a partitions instead. But FreeBSD already supports slice units, thus making naming convention hierarchical. It's clear that ad0s3a is a part of ad0s3, while ad0s1 is not, w/o analyzing their media offsets. However, my NetBSD just calls them wd0a, wd0c and wd0e correspondently. Yes, you can tell that wd0a lies within wd0c by convention, by can't tell anything about placement of wd0e. What I'm trying to show is that FreeBSD already provides slice unit for it, so if we understand NetBSD's label 'as is', we'll get 2 aliases of the same piece of media (call it as you wish, partition or slice): for my HDD, it'll be ad0s1 _and_ ad0s3e. IMHO for FreeBSD user/admin it'll create dangerous situation. [S]he'll think in hierarchical way: we have ad0s3e, so it's within ad0s3, so it's safe to overwrite it. Hovewer, overwriting it will destroy data on ad0s1. I think we (at FreeBSD side) should avoid such "aliases" and just don't configure devices for them (like my patch does). > Here is the partition table for drive sd0 on my NetBSD/alpha system: > > 8 partitions: > # size offset fstype [fsize bsize cpg/sgs] > a: 262144 0 RAID # (Cyl. 0 - 115*) > b: 524288 262144 RAID # (Cyl. 115*- 347*) > c: 8380080 0 unused 0 0 # (Cyl. 0 - 3707) > d: 3483168 786432 RAID # (Cyl. 347*- 1889*) > e: 4110480 4269600 RAID # (Cyl. 1889*- 3707) > > (Most of my system is mirrored via RAIDframe.) > > I don't know if FreeBSD/alpha has the notion of slices, as it's not > supported on my Turbochannel alpha and so I've never run it... You layout is very simple, it corresponds to so-called "dangerously dedicated" == sliceless mode on FreeBSD/i386. As you can see, all partitions are within 'c', which describes all media. My patch will preserve this label as is, because no entry points outside it's provider (underlying unit, your sd0). Sincerely, Dmitry -- Atlantis ISP, System Administrator e-mail: dmitry@atlantis.dp.ua nic-hdl: LYNX-RIPE