Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Why are drives called "wd0", "wd1", etc?

23 views
Skip to first unread message

Daniel Carrera

unread,
Aug 4, 2011, 6:30:51 AM8/4/11
to
Hello,

In Linux, disks have device names like "hda" and "hdb" which I take to
mean "hard drive a" and "hard drive b". Why does NetBSD use "wd0", "wd1"
etc? What does the "w" stand for?

Daniel.
--
I'm not overweight, I'm undertall.

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-...@muc.de

Chavdar Ivanov

unread,
Aug 4, 2011, 6:44:13 AM8/4/11
to
On 4 August 2011 11:30, Daniel Carrera <dcar...@gmail.com> wrote:
> Hello,
>
> In Linux, disks have device names like "hda" and "hdb" which I take to mean
> "hard drive a" and "hard drive b". Why does NetBSD use "wd0", "wd1" etc?
> What does the "w" stand for?


[uksup2] sys/arch/i386/conf # egrep 'wd\*|sd\*|dk\*' GENERIC
sd* at scsibus? target ? lun ? # SCSI disk drives
wd* at atabus? drive ? flags 0x0000
sd* at atapibus? drive ? flags 0x0000 # ATAPI disk drives
wd* at umass?

Chavdar Ivanov


>
> Daniel.
> --
> I'm not overweight, I'm undertall.
>

--
----

Martin Husemann

unread,
Aug 4, 2011, 6:49:35 AM8/4/11
to
Also "man wd" explains the drivers inheritage:

DESCRIPTION
The wd driver supports hard disks that emulate the Western Digital
WD100x. This includes standard MFM, RLL, ESDI, IDE, and EIDE drives.

Martin

Joost van de Griek

unread,
Aug 4, 2011, 6:52:12 AM8/4/11
to
On 4 August 2011 12:30, Daniel Carrera <dcar...@gmail.com> wrote:

> In Linux, disks have device names like "hda" and "hdb" which I take to mean
> "hard drive a" and "hard drive b". Why does NetBSD use "wd0", "wd1" etc?
> What does the "w" stand for?

<http://en.wikipedia.org/wiki/Early_IBM_disk_storage#IBM_3340>

.tsooJ

David Lord

unread,
Aug 4, 2011, 7:07:54 AM8/4/11
to
On 4 Aug 2011 at 12:30, Daniel Carrera wrote:

> Hello,
>
> In Linux, disks have device names like "hda" and "hdb" which I take to
> mean "hard drive a" and "hard drive b". Why does NetBSD use "wd0", "wd1"
> etc? What does the "w" stand for?
>

# man wd

wd -- WD100x compatible hard disk driver


David

Daniel Carrera

unread,
Aug 4, 2011, 7:20:51 AM8/4/11
to
On 08/04/2011 12:49 PM, Martin Husemann wrote:
> Also "man wd" explains the drivers inheritage:
>
> DESCRIPTION
> The wd driver supports hard disks that emulate the Western Digital
> WD100x. This includes standard MFM, RLL, ESDI, IDE, and EIDE drives.


Thanks. That's very interesting. I didn't realize that something like
that would be in a man page.

Cheers,


Daniel.
--
I'm not overweight, I'm undertall.

--

Joost van de Griek

unread,
Aug 4, 2011, 7:23:56 AM8/4/11
to
On 4 August 2011 13:07, David Lord <net...@lordynet.org> wrote:

> # man wd
>
>      wd -- WD100x compatible hard disk driver

Huh, go figure. I always took it to mean "winchester drive".

.tsooJ

Julian H. Stacey

unread,
Aug 4, 2011, 7:24:48 AM8/4/11
to
> From: Daniel Carrera <dcar...@gmail.com>

Daniel Carrera wrote:
> Hello,
> In Linux, disks have device names like "hda" and "hdb" which I take to
> mean "hard drive a" and "hard drive b". Why does NetBSD use "wd0", "wd1"
> etc?

Probably Linux didn't look for compatibility with BSD names when
Linux started. People reinvent wheels. (eg: USA originated Cell
Phone re-named as Mobile in Britain & Handy in Germany)

One might also ask why does FreeBSD use /dev/da0 & /dev/ad0 & not
wd or hd: Answer: Some OS's & developers tend to adopt changed dev
name types when a major new alternate dev driver is introduced &
other OS developers for consistency keep the same name even if major
functional changes between versions.


> What does the "w" stand for?

Winchester Disc I've always presumed.

Why Linux calls whatever .. & BSD .. calls whatever else should
best be answered by manuals, else if asked & answered only on mail
list, it will get asked again. Best send a send-pr for any dev
name that interests you, asking them to add a small line to approriate
man 4 wd + whatever else, with a tiny line: "Historical derivation:

Cheers,
Julian
--
Julian Stacey, BSD Unix Linux C Sys Eng Consultants Munich http://berklix.com
Reply below, not above; Indent with "> "; Cumulative like a play script.
Format: Plain text. Not HTML, multipart/alternative, base64, quoted-printable.

Daniel Carrera

unread,
Aug 4, 2011, 7:31:40 AM8/4/11
to
On 08/04/2011 01:23 PM, Joost van de Griek wrote:
> On 4 August 2011 13:07, David Lord<net...@lordynet.org> wrote:
>
>> # man wd
>>
>> wd -- WD100x compatible hard disk driver
>
> Huh, go figure. I always took it to mean "winchester drive".

And WD100x is itself named after Western Digital (says the man page).
That was interesting.

Daniel Carrera

unread,
Aug 4, 2011, 7:35:50 AM8/4/11
to
On 08/04/2011 01:24 PM, Julian H. Stacey wrote:
>> What does the "w" stand for?
>
> Winchester Disc I've always presumed.
>
> Why Linux calls whatever ..& BSD .. calls whatever else should
> best be answered by manuals, else if asked& answered only on mail

> list, it will get asked again. Best send a send-pr for any dev
> name that interests you, asking them to add a small line to approriate
> man 4 wd + whatever else, with a tiny line: "Historical derivation:


As it turns out, "man 4 wd" already explains everything. I just didn't
know that you could look up things like that on man pages. I had it in
my mind that man pages explain commands and possibly config files. I
think this is just the normal learning curve for Unix. It's just the
first time in my life that it occurred to me to ask why a device was
named the way it is.

Daniel.


--
I'm not overweight, I'm undertall.

--

Daniel Carrera

unread,
Aug 4, 2011, 8:27:02 AM8/4/11
to
On 08/04/2011 02:16 PM, Stephen Borrill wrote:

> On Thu, 4 Aug 2011, Daniel Carrera wrote:
>> On 08/04/2011 12:49 PM, Martin Husemann wrote:
>>> Also "man wd" explains the drivers inheritage:
>>>
>>> DESCRIPTION
>>> The wd driver supports hard disks that emulate the Western Digital
>>> WD100x. This includes standard MFM, RLL, ESDI, IDE, and EIDE drives.
>>
>>
>> Thanks. That's very interesting. I didn't realize that something like
>> that would be in a man page.
>
> Having useful man pages is another difference between Linux and NetBSD...


That may be true, but I don't think that this thread is an example.
After the first reply in this thread I checked and confirmed that my
Linux also documents at least devices in the man pages. I can do "man
sd" and find out that this is for SCSI disks.

It just had never occurred to me to type "man sd" before.

Daniel.
--
I'm not overweight, I'm undertall.

--

Alex Goncharov

unread,
Aug 4, 2011, 8:44:24 AM8/4/11
to
,--- You/Stephen (Thu, 4 Aug 2011 13:16:07 +0100 (BST)) ----*

| Having useful man pages is another difference between Linux and NetBSD...

Please give one example of a manual page, for the same functionality,
where the NetBSD version is superior to one in (a recent distribution
of) Linux (or FreeBSD, for that matter.)

(I feel you won't.)

-- Alex -- alex-go...@comcast.net --

Ian Clark

unread,
Aug 4, 2011, 10:00:09 AM8/4/11
to
On 4 August 2011 12:35, Daniel Carrera <dcar...@gmail.com> wrote:
> On 08/04/2011 01:24 PM, Julian H. Stacey wrote:
>>>
[snip]

>
> As it turns out, "man 4 wd" already explains everything. I just didn't know
> that you could look up things like that on man pages. I had it in my mind
> that man pages explain commands and possibly config files. I think this is
> just the normal learning curve for Unix. It's just the first time in my life
> that it occurred to me to ask why a device was named the way it is.
>

As a general rule of thumb if you want to learn something in unix (or
linux or *BSD), then 'man is your friend'

Generally 'man <something>'

If that doesn't work 'man -k <something>' for keyword search and 'man
-f <something>' to find things.

Saved my live a few times. :)

Cheers,

Ian

Adam Hoka

unread,
Aug 4, 2011, 10:22:33 AM8/4/11
to
On Thu, 04 Aug 2011 08:44:24 -0400
Alex Goncharov <alex-go...@comcast.net> wrote:

> ,--- You/Stephen (Thu, 4 Aug 2011 13:16:07 +0100 (BST)) ----*
> | Having useful man pages is another difference between Linux and NetBSD...
>
> Please give one example of a manual page, for the same functionality,
> where the NetBSD version is superior to one in (a recent distribution
> of) Linux (or FreeBSD, for that matter.)
>
> (I feel you won't.)
>
> -- Alex -- alex-go...@comcast.net --

Any kernel driver.

--
NetBSD - Simplicity is prerequisite for reliability
Software Engineering Department, University of Szeged

Jeremy C. Reed

unread,
Aug 4, 2011, 11:03:47 AM8/4/11
to
On Thu, 4 Aug 2011, Adam Hoka wrote:

> On Thu, 04 Aug 2011 08:44:24 -0400
> Alex Goncharov <alex-go...@comcast.net> wrote:
>

> > ,--- You/Stephen (Thu, 4 Aug 2011 13:16:07 +0100 (BST)) ----*
> > | Having useful man pages is another difference between Linux and NetBSD...
> >
> > Please give one example of a manual page, for the same functionality,
> > where the NetBSD version is superior to one in (a recent distribution
> > of) Linux (or FreeBSD, for that matter.)
> >
> > (I feel you won't.)
> >
> > -- Alex -- alex-go...@comcast.net --
>

> Any kernel driver.

(Let's exclude FreeBSD from this argument.)

Historically Linux's, Glibc's man pages have been lacking. They are much
better now, but in many cases the manual pages are maintained and
distributed and packaged by those separate from the developers of the
software. (For example, "man-pages" package for Red Hat has a variety of
manuals that should have been supplied by upstream vendors and this
bundled with their respective packages. They are playing catchup.

As for a problem (in this old Red Hat), in man-pages-2.39-12.el5, the
sd(4) references scsi(4) which does not exist :)

Alex Goncharov

unread,
Aug 4, 2011, 11:29:40 AM8/4/11
to
,--- You/Adam (Thu, 4 Aug 2011 16:22:33 +0200) ----*

| Alex Goncharov <alex-go...@comcast.net> wrote:
| > Please give one example of a manual page, for the same functionality,
| > where the NetBSD version is superior to one in (a recent distribution
| > of) Linux (or FreeBSD, for that matter.)
|
| Any kernel driver.

You are right -- thank you:

----------------------------------------
uname -sr; (cmd=$(type -p lsmod || type -p kldstat); $cmd) | sed -r 's/.*((sound|snd_)[[:alpha:]]*).*/xxx \1/; /^xxx /!d; s/^xxx //;' | sort -u | xargs -n 1 -t man -w
=>
Linux 2.6.18-92.el5PAE
man -w snd_hda
No manual entry for snd_hda
man -w snd_pcm
No manual entry for snd_pcm
man -w snd_seq
No manual entry for snd_seq
man -w snd_timer
No manual entry for snd_timer
man -w soundcore
No manual entry for soundcore

----------------------------------------
uname -sr; (cmd=$(type -p lsmod || type -p kldstat); $cmd) | sed -r 's/.*((sound|snd_)[[:alpha:]]*).*/xxx \1/; /^xxx /!d; s/^xxx //;' | sort -u | xargs -n 1 -t man -w
=>
FreeBSD 8.2-STABLE
man -w snd_hda
/usr/share/man/en.ISO8859-1/cat4/snd_hda.4.gz (source:
/usr/share/man/en.ISO8859-1/man4/snd_hda.4.gz)
man -w sound
/usr/share/man/en.ISO8859-1/man4/sound.4.gz

----------------------------------------

Daniel Carrera

unread,
Aug 4, 2011, 1:23:52 PM8/4/11
to
On 08/04/2011 05:29 PM, Alex Goncharov wrote:
> ,--- You/Adam (Thu, 4 Aug 2011 16:22:33 +0200) ----*
> | Alex Goncharov<alex-go...@comcast.net> wrote:
> |> Please give one example of a manual page, for the same functionality,
> |> where the NetBSD version is superior to one in (a recent distribution
> |> of) Linux (or FreeBSD, for that matter.)
> |
> | Any kernel driver.
>
> You are right -- thank you:


I hope I don't stir an argument with the following question:

Would it be fair to say that the GNU guys do a decent job of
documentation but the (Linux) kernel guys do not?

I can imagine at least one reason why that would be the case: More
people see the GNU tools than the (Linux) drivers.

Daniel.
--
I'm not overweight, I'm undertall.

--

Steven Bellovin

unread,
Aug 4, 2011, 12:25:10 PM8/4/11
to

On Aug 4, 2011, at 8:27 02AM, Daniel Carrera wrote:

> On 08/04/2011 02:16 PM, Stephen Borrill wrote:
>> On Thu, 4 Aug 2011, Daniel Carrera wrote:

>>> On 08/04/2011 12:49 PM, Martin Husemann wrote:
>>>> Also "man wd" explains the drivers inheritage:
>>>>
>>>> DESCRIPTION
>>>> The wd driver supports hard disks that emulate the Western Digital
>>>> WD100x. This includes standard MFM, RLL, ESDI, IDE, and EIDE drives.
>>>
>>>
>>> Thanks. That's very interesting. I didn't realize that something like
>>> that would be in a man page.
>>

>> Having useful man pages is another difference between Linux and NetBSD...
>
>
> That may be true, but I don't think that this thread is an example. After the first reply in this thread I checked and confirmed that my Linux also documents at least devices in the man pages. I can do "man sd" and find out that this is for SCSI disks.
>
> It just had never occurred to me to type "man sd" before.
>

Going back further, there's an ancient tradition in the Unix world of
naming device names (especially visible for disks and network interfaces)
after the hardware type. But it isn't always easy to find a meaningful
two-letter abbreviation... Linux, from that perspective, broke the
tradition by abstracting that away and dealing only with large classes
of devices such as hd.


--Steve Bellovin, https://www.cs.columbia.edu/~smb

Scrap Happy

unread,
Aug 4, 2011, 2:02:02 PM8/4/11
to
Hi Daniel,

On 8/4/2011 10:23 AM, Daniel Carrera wrote:

> I hope I don't stir an argument with the following question:
>
> Would it be fair to say that the GNU guys do a decent job of
> documentation but the (Linux) kernel guys do not?

Why did it take so long for a (g)tar(1) man page to come into existence?
<grin>

People (on average) just don't like to prepare good documentation.
"It's boring" seems to be the general attitude. But, in fact, it
is actually very *difficult* to do! Unlike code where you can
"see if it works" (as one measure of your success), documentation
is much more subjective and prone to lots of assumptions on the
part of the writer ("Oh, I thought everyone *knew* that so I
didn't bother to explain it...")

And, most documentation tends to be written after-the-fact...
describing (often incompletely) how something (appears to) work
instead of how it is intended to work. (there is a subtle
difference, here, but one that, IMO, dramatically affects the
style of the documentation)

> I can imagine at least one reason why that would be the case: More
> people see the GNU tools than the (Linux) drivers.

--

Daniel Carrera

unread,
Aug 4, 2011, 2:26:48 PM8/4/11
to
On 08/04/2011 06:25 PM, Steven Bellovin wrote:
> Going back further, there's an ancient tradition in the Unix world of
> naming device names (especially visible for disks and network interfaces)
> after the hardware type. But it isn't always easy to find a meaningful
> two-letter abbreviation... Linux, from that perspective, broke the
> tradition by abstracting that away and dealing only with large classes
> of devices such as hd.

Interesting. It's a good reminder for me that just because I know Linux
doesn't mean I know Unix.

Daniel.
--
I'm not overweight, I'm undertall.

--

Daniel Carrera

unread,
Aug 4, 2011, 2:47:37 PM8/4/11
to
On 08/04/2011 08:02 PM, Scrap Happy wrote:
> Why did it take so long for a (g)tar(1) man page to come into existence?
> <grin>
>
> People (on average) just don't like to prepare good documentation.
> "It's boring" seems to be the general attitude. But, in fact, it
> is actually very *difficult* to do! Unlike code where you can
> "see if it works" (as one measure of your success), documentation
> is much more subjective and prone to lots of assumptions on the
> part of the writer ("Oh, I thought everyone *knew* that so I
> didn't bother to explain it...")

As someone who has written a fair amount of documentation, I can testify
to that - it *is* difficult. A lot of work, not much glory.


> And, most documentation tends to be written after-the-fact...
> describing (often incompletely) how something (appears to) work
> instead of how it is intended to work. (there is a subtle
> difference, here, but one that, IMO, dramatically affects the
> style of the documentation)

Or worse, written by someone who did not write the software, as in my
case. I've written documentation for OpenOffice.org and for the Perl
Data Language, and I was not a developer for either. In both cases, I
was just a user who got fed up at the lack of documentation and decided
to write some.

Daniel.
--
I'm not overweight, I'm undertall.

--

0 new messages