From owner-freebsd-current@FreeBSD.ORG Fri Mar 17 18:12:22 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 364AE16A400 for ; Fri, 17 Mar 2006 18:12:22 +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 5E10643D55 for ; Fri, 17 Mar 2006 18:12:17 +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 k2HICBZ3002216; Fri, 17 Mar 2006 20:12:11 +0200 (EET) (envelope-from dmitry@atlantis.dp.ua) Date: Fri, 17 Mar 2006 20:12:11 +0200 (EET) From: Dmitry Pryanishnikov To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= In-Reply-To: <863bhh3y05.fsf@xps.des.no> Message-ID: <20060317194142.C90888@atlantis.atlantis.dp.ua> References: <20060317012428.N52721@atlantis.atlantis.dp.ua> <863bhh3y05.fsf@xps.des.no> 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: Fri, 17 Mar 2006 18:12:22 -0000 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