Marc Tardif wrote:
>
> 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
That's for up to 3.x. From 4.x, the device name is ad.
> Questions:
> 1. What are wd0[a-h] used for?
1) Dangerously Dedicated Disks (no slices).
2) Compatibility mode (an ugly hack) alias for the first FreeBSD slice
on that disk.
> 2. If wd0s1 is my first slice, why isn't it named wd0s0?
Because a slice is what DOS calls a "partition table". They are numbered
from 1 on, so we decided to keep the numbering to make things less
confusing (which, if you think of it, is pretty silly with the
partition/slice confusion).
> 3. If I format wd0s2 as any type (Xenix for example),
> will /dev now contain wd0s2[a-h]?
No.
1. /dev is not a "magical" directory. It contains only what you put in
there.
2. If you happened to have devfs, which _is_ "magical", partitions still
require that a partition table exists in the slice.
> 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?
None. You just use it.
> 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)?
No, you don't need to format it, nor do you need to worry about it's
type. Just make sure the slice does exist.
> 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)?
Nope, using raw devices is almost always wrong, and we even got rid of
raw device in latter versions of FreeBSD. A "raw" device is an
_unbuffered_ device. It has nothing to do with formats or types.
Anyway, you should be using /dev/wd0s2. Unless you partition the slice,
and want to use the "a" partition.
> Lastly, where else could I have found this information other
> than asking on the FreeBSD mailing list?
Beats me, but it _should_ be in the handbook.
--
Daniel C. Sobral (8-DCS)
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
"I demand that my picture show a handsome face, even if it doesn't look
like me."
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message