From owner-freebsd-fs Sat Sep 16 16:27:17 2000 Delivered-To: freebsd-fs@freebsd.org Received: from aaz.links.ru (aaz.links.ru [193.125.152.37]) by hub.freebsd.org (Postfix) with ESMTP id A2B4A37B422; Sat, 16 Sep 2000 16:27:10 -0700 (PDT) Received: (from babolo@localhost) by aaz.links.ru (8.9.3/8.9.3) id DAA17240; Sun, 17 Sep 2000 03:27:05 +0400 (MSD) Message-Id: <200009162327.DAA17240@aaz.links.ru> Subject: Re: device naming convention In-Reply-To: from "Marc Tardif" at "Sep 16, 0 05:20:11 pm" To: intmktg@CAM.ORG (Marc Tardif) Date: Sun, 17 Sep 2000 03:27:05 +0400 (MSD) Cc: freebsd-hackers@FreeBSD.ORG, freebsd-fs@FreeBSD.ORG From: "Aleksandr A.Babaylov" MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Marc Tardif writes: > What is the FreeBSD naming convention for devices of disk slices and > labels? Considering my system is installed on the first partition of > /dev/wd0 (non-dedicated), these are the block-device interfaces I > have to my disk: > > wd0 wd0c wd0f wd0s1 wd0s1c wd0s1f wd0s2 > wd0a wd0d wd0g wd0s1a wd0s1d wd0s1g wd0s3 > wd0b wd0e wd0h wd0s1b wd0s1e wd0s1h wd0s4 > > Questions: > 1. What are wd0[a-h] used for? For wd0sN[a-h] where N is number of first slice recognized as FreeBSD slice > 2. If wd0s1 is my first slice, why isn't it named wd0s0? wd0s0 == wd0 wd0s0a == wd0a > 3. If I format wd0s2 as any type (Xenix for example), > will /dev now contain wd0s2[a-h]? Content of /dev is totally undependent of any hardware and kernel conditions. Do yourself cd /dev ; ./MAKEDEV wd0s2h for wd0s2[a-h] entries > Assuming /dev/wd0s2 contains a few blocks, ie /dev/wd0s1 > doesn't span to the end of disk: > 4. If I want to use /dev/wd0s2 as a raw slice for reading > and writing, what are the steps to follow? You can't write several blocks near /dev/wd0s2 beginning. Use /dev/wd0 with proper address > 4a. Do I need to format the partition as any type? If so > is there a recommended type (perhaps one which won't > be recognised by the bootloader would be preferable)? It depends on usage. And remember - kernel looks up every slice to find FreeBSD label - even if you mark it 0 (unused) > 4b. Should I then be using /dev/rwd0s2 or /dev/rwd0s2a > for reading and writing (of course, this is assuming > block i/o of multiples of 512 bytes)? You can do what you want, but remember, [a-h] can be used only if partitino have a FreeBSD label For example, for label on wd0s2 # some space not included in FreeBSD partition 514080 0 a: 514080 514080 b: 514080 1028160 you can use wd0s2a AND wd0s2 as different file systems IF you properly initialise with newfs. > Lastly, where else could I have found this information other > than asking on the FreeBSD mailing list? Read sources and experiment. BE AWARE - FreeBSD 4.X in difference with FreeBSD 2.2.X is highly unstable while experiment with labels -- @BABOLO http://links.ru/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message