Date: Wed, 20 Sep 2000 00:32:41 -0700 From: "Crist J . Clark" <cjclark@reflexnet.net> To: Marius Bendiksen <mbendiks@eunet.no> Cc: Marc Tardif <intmktg@CAM.ORG>, freebsd-questions@FreeBSD.ORG Subject: Re: device naming convention Message-ID: <20000920003241.U367@149.211.6.64.reflexcom.com> In-Reply-To: <Pine.BSF.4.05.10009200846130.30002-100000@login-1.eunet.no>; from mbendiks@eunet.no on Wed, Sep 20, 2000 at 08:49:59AM %2B0200 References: <Pine.LNX.4.10.10009161631130.8000-100000@Gloria.CAM.ORG> <Pine.BSF.4.05.10009200846130.30002-100000@login-1.eunet.no>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Sep 20, 2000 at 08:49:59AM +0200, Marius Bendiksen wrote:
> [redirected]
>
> > Questions:
> > 1. What are wd0[a-h] used for?
>
> These are interfaces to the partitions of the first FreeBSD slice.
These are the legacy devices that were used until 3.x. Now, IDE drives
are called,
/dev/ad*
For the generic ATA/ATAPI driver.
> > 2. If wd0s1 is my first slice, why isn't it named wd0s0?
>
> Slice 0 is used for some special purpose. I cannot recall exactly which
> right now, but ISTR it was either (1) a reference to the first FreeBSD
> slice, regardless of which slot it is in, or (2) a reference to a
> dedicated disk.
There is no slice 0. Slices are purely for compatibility with MS-DOS
partitions, and MS-DOS partitions are numbered 1 to 4. No reason to
obfuscate things to renumber 0-3. (Don't ask me why sometimes it does
seem like things are renumbered for no reason.)
> > 3. If I format wd0s2 as any type (Xenix for example),
> > will /dev now contain wd0s2[a-h]?
>
> No. You need to use the MAKEDEV script.
>
> > 4. If I want to use /dev/wd0s2 as a raw slice for reading
> > and writing, what are the steps to follow?
>
> Use it as you would any file.
s/file/block device/
> > 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)?
>
> A number of references to slice types can be found on the net.
But was the original question about a slice or partition?
> > 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)?
>
> /dev/rwd0s2
Actually, note that,
[219:~] ls -l /dev/wd0s2{,c}
brw-r----- 1 root operator 0, 0x00030002 Aug 31 1999 /dev/wd0s2
brw-r----- 1 root operator 0, 0x00030002 Aug 31 1999 /dev/wd0s2c
And also remeber these are legacy devices. The current release of
FreeBSD, the 4-branch, uses the ad(4) device and there are no block
devices,
[221:~] ls -l /dev/{,r}ad1s1{,c}
crw-r----- 2 root operator 116, 0x0002000a Aug 6 22:05 /dev/ad1s1
crw-r----- 2 root operator 116, 0x0002000a Aug 6 22:05 /dev/ad1s1c
crw-r----- 2 root operator 116, 0x0002000a Aug 6 22:05 /dev/rad1s1
crw-r----- 2 root operator 116, 0x0002000a Aug 6 22:05 /dev/rad1s1c
--
Crist J. Clark cjclark@alum.mit.edu
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000920003241.U367>
