Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Mar 2006 02:48:49 +0200 (EET)
From:      Dmitry Pryanishnikov <dmitry@atlantis.dp.ua>
To:        Paul Mather <paul@gromit.dlib.vt.edu>
Cc:        freebsd-current@freebsd.org
Subject:   Re: [patch] NetBSD disklabel support for geom_bsd
Message-ID:  <20060318022800.S40573@atlantis.atlantis.dp.ua>
In-Reply-To: <1142636322.1188.15.camel@zappa.Chelsea-Ct.Org>
References:  <20060317204723.7F91416A51F@hub.freebsd.org> <1142636322.1188.15.camel@zappa.Chelsea-Ct.Org>

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

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060318022800.S40573>