Date: Fri, 17 Mar 2006 20:12:11 +0200 (EET) From: Dmitry Pryanishnikov <dmitry@atlantis.dp.ua> To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= <des@des.no> Cc: freebsd-current@freebsd.org Subject: Re: [patch] NetBSD disklabel support for geom_bsd Message-ID: <20060317194142.C90888@atlantis.atlantis.dp.ua> In-Reply-To: <863bhh3y05.fsf@xps.des.no> References: <20060317012428.N52721@atlantis.atlantis.dp.ua> <863bhh3y05.fsf@xps.des.no>
next in thread | previous in thread | raw e-mail | index | archive | help
Hello!
On Fri, 17 Mar 2006, Dag-Erling Sm?rgrav wrote:
>> 2) (most important) NetBSD disklabel describes partitions not slice-relative
>> (like ours), but the whole device-relative. They have no slice devices, so
>> their disklabel actually duplicates functionality of device slice
>> table, and describes both NetBSD partitions and other slices as partitions.
>
> I believe we already support that - we did it the same way ourselves
> prior to GEOM, and geom_bsd should still have compat shims for old
> labels.
I've never seen such a support in FreeBSD. There was pre-slice era, and
you can still create "dangerously dedicated" disk and use ad0a-ad0h instead
of ad0s1a-h. But NetBSD does something very different: it creates disklabel
at the start of the _slice_, but media offsets in the entries of this label
are not slice-relative like ours, but absolute media offsets instead, and thus
can point _outside_ NetBSD slice! Their partitions can thus be aliases for
our slice devices.
Look at my HDD layout from the POV of FreeBSD and NetBSD (I'll show some
parts sufficient to understand the idea), start and size are in disk sector
units:
HDD area FreeBSD NetBSD Description in the
Start Size device device FreeBSD terms
0 312579695 ad0 wd0d Whole HDD
63 2088387 ad0s1 wd0e First slice (DOS)
147942585 81931500 ad0s3 wd0c Third slice (NetBSD)
147942585 2097648 ad0s3a wd0a Partition 'a' of the 3rd slice
150040233 2097648 ad0s3b wd0b Partition 'b' of the 3rd slice
Of course, you'll get ad0s3a,b only after applying my patch, otherwise they
aren't accessible from the FreeBSD.
I hope you'll see what they do:
1. NetBSD's 'c' partition describes NetBSD slice (always?).
2. NetBSD's 'd' partition describes the whole HDD (always?).
3. NetBSD's 'e' partition describes the 1st _slice_ of my partucular HDD.
4. NetBSD's 'a','b','f'... describe NetBSD partitions inside 3rd slice.
I've never seen such a layout on FreeBSD, and I would call it 'the
true hackery' ;)
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?20060317194142.C90888>
