[cochiselinux] SCSI device naming conventions

  • From: Jeffrey Denton <dentonj@xxxxxxxx>
  • To: cochiselinux@xxxxxxxxxxxxx
  • Date: Mon, 20 Oct 2003 15:50:48 -0700 (MST)

From /usr/src/linux/Documentation/scsi-generic.txt:

The SCSI Generic driver (sg) is one of the four "high level" SCSI device
drivers along with sd, st and sr (disk, tape and CDROM respectively). Sg
is more generalized (but lower level) than its siblings and tends to be
used on SCSI devices that don't fit into the already serviced
categories. Thus sg is used for scanners, CD writers and reading audio
CDs digitally amongst other things.


It's also common to cd SCSI CDROM's using the name scd0.  It you look at
both sr0 and scd0, the major and minor numbers are the same.

brw-r----- 1 root disk 11, 0 Apr 12 1999 /dev/sr0
brw-r----- 1 root disk 11, 0 Jul 18 1994 /dev/scd0


From /usr/src/linux/Documentation/devices.txt:

 11 char        Raw keyboard device
                  0 = /dev/kbd          Raw keyboard device

                The raw keyboard device is used on Linux/SPARC only.

    block       SCSI CD-ROM devices
                  0 = /dev/sr0          First SCSI CD-ROM
                  1 = /dev/sr1          Second SCSI CD-ROM
                    ...

                The prefix /dev/scd instead of /dev/sr has been used
                as well, and might make more sense.


Major and minor numbers are used by the kernel to determine they will
access different devices.  Some explanations of major and minor numbers
(fairly indepth and low-level stuff):

http://www.tldp.org/LDP/khg/HyperNews/get/devices/whatis.html
http://lwn.net/Articles/29729/

dentonj

--------------------------------------------------------------------
Cochise Linux Users Group Mailing List - cochiselinux@xxxxxxxxxxxxx
For more information:  http://www.cochiselinux.org
To unsubscribe: //www.freelists.org/list/cochiselinux

Other related posts:

  • » [cochiselinux] SCSI device naming conventions