From owner-freebsd-arch@FreeBSD.ORG Fri Sep 3 18:38:42 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A03CB16A4CE for ; Fri, 3 Sep 2004 18:38:42 +0000 (GMT) Received: from schlepper.zs64.net (schlepper.zs64.net [212.12.50.230]) by mx1.FreeBSD.org (Postfix) with ESMTP id 779B043D2F for ; Fri, 3 Sep 2004 18:38:41 +0000 (GMT) (envelope-from stb@lassitu.de) Received: from [IPv6:::1] (schlepper [212.12.50.230]) by schlepper.zs64.net (8.12.11/8.11.1) with ESMTP id i83IcdJ1067985; Fri, 3 Sep 2004 20:38:39 +0200 (CEST) (envelope-from stb@lassitu.de) In-Reply-To: References: Mime-Version: 1.0 (Apple Message framework v619) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <794C3F76-FDD8-11D8-A251-000A95C893E4@lassitu.de> Content-Transfer-Encoding: 7bit From: Stefan Bethke Date: Fri, 3 Sep 2004 20:38:39 +0200 To: Sam X-Mailer: Apple Mail (2.619) cc: freebsd-arch@freebsd.org Subject: Re: mknod minors X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2004 18:38:42 -0000 Am 03.09.2004 um 20:03 schrieb Sam: > OK, I understand the layout of the minor number > according to sys/disklabel.h, but what's with > the numbering scheme here? > > freebsd# ls -l /dev/ad0* > crw-r----- 2 root operator 116, 0x00010002 Nov 17 2002 /dev/ad0 > crw-r----- 2 root operator 116, 0 Nov 17 2002 /dev/ad0a > crw-r----- 2 root operator 116, 1 Nov 17 2002 /dev/ad0b > crw-r----- 2 root operator 116, 2 Nov 17 2002 /dev/ad0c > crw-r----- 2 root operator 116, 3 Nov 17 2002 /dev/ad0d > crw-r----- 2 root operator 116, 4 Nov 17 2002 /dev/ad0e > crw-r----- 2 root operator 116, 5 Nov 17 2002 /dev/ad0f > crw-r----- 2 root operator 116, 6 Nov 17 2002 /dev/ad0g > crw-r----- 2 root operator 116, 7 Nov 17 2002 /dev/ad0h > crw-r----- 2 root operator 116, 0x00020002 Nov 17 2002 /dev/ad0s1 > crw-r----- 2 root operator 116, 0x00020000 Nov 17 2002 /dev/ad0s1a > crw-r----- 2 root operator 116, 0x00020001 Nov 17 2002 /dev/ad0s1b > crw-r----- 2 root operator 116, 0x00020002 Nov 17 2002 /dev/ad0s1c > crw-r----- 2 root operator 116, 0x00020003 Nov 17 2002 /dev/ad0s1d > crw-r----- 2 root operator 116, 0x00020004 Nov 17 2002 /dev/ad0s1e > crw-r----- 2 root operator 116, 0x00020005 Nov 17 2002 /dev/ad0s1f > crw-r----- 2 root operator 116, 0x00020006 Nov 17 2002 /dev/ad0s1g > crw-r----- 2 root operator 116, 0x00020007 Nov 17 2002 /dev/ad0s1h > crw-r----- 2 root operator 116, 0x00030002 Nov 17 2002 /dev/ad0s2 > crw-r----- 2 root operator 116, 0x00040002 Nov 17 2002 /dev/ad0s3 > crw-r----- 2 root operator 116, 0x00050002 Nov 17 2002 /dev/ad0s4 > > Why is the whole disk slice 1, but partitions within it are > slice 0? Why isn't the whole disk slice 0 and slice 1 > is ... slice 1 (ad0s1)? What makes ad0s2 be partition 3? I'm by no means an expert in this field, just a long-time user, but I'll try to give some answers: ad0[a-z] are the "compatibility" partitions. I'd guess that that's the reason they come first, number-wise. The compatibility partitions will access the first FreeBSD slice on the disk, if any. They have been depracated long ago (I believe somewhere around 3-current), and I'd think you do not need to provide them, since programs having distict ideas about what disk devices should be called should long be gone. Since the MS-DOS partitioning scheme does not provide an entry for the entire disk (like the BSD c partition would), it has to go somewhere; using another "slice" number-wise seems logical. And that makes ad0s2 the "third slice" (and so on). Stefan -- Stefan Bethke Fon +49 170 346 0140