[GRLUG] Meeting agenda?

Raymond McLaughlin driveray at ameritech.net
Thu Oct 12 17:47:02 EDT 2006


Michael Mol wrote:
> On 10/11/06, Tim Schmidt <timschmidt at gmail.com> wrote:

>> Hmmm...  I'd wager they have been, or will be soon.  Allan Cox has
>> been working on moving all support for IDEish drives over to the SATA
>> code, which has either been comitted, or is being planned for comit in
>> the next release or two.  The old IDE code will still stick around
>> (like OSS), but be formally deprecated.
> 
> Well, that'll be nice.  Will that mean that the SCSI code will be the
> basis for all the mass storage device now?  Here's looking forward to
> /dev/sd* instead of both /dev/sd* and /dev/hd*.

Sounds nice and simple? Except that, at least in true scsi land, cdroms aren't
/dev/sd? they are /dev/sr? (old school) or /dev/scd? (new school).  Where
/dev/hdc points to what ever device is master on the second IDE channel, SATA
cd/dvd-roms will (assuming they follow the scsi standard) require you to *know*
what is hooked up to which channel before mounting.

This is not just a mater of naming conventions, it is built into the kernel. See
/usr/src/linux/Documentation/devices.txt.

All IDE/ATAPI devices are block device major number 3:
  3 block       First MFM, RLL and IDE hard disk/CD-ROM interface
                  0 = /dev/hda          Master: whole disk (or CD-ROM)
                 64 = /dev/hdb          Slave: whole disk (or CD-ROM)

                For partitions, add to the whole disk device number:
                  0 = /dev/hd?          Whole disk
                  1 = /dev/hd?1         First partition
                  2 = /dev/hd?2         Second partition
                    ...
                 63 = /dev/hd?63        63rd partition

                For Linux/i386, partitions 1-4 are the primary
                partitions, and 5 and above are logical partitions.
                Other versions of Linux use partitioning schemes
                appropriate to their respective architectures.

or block device, major number 22:
                    ...
 22 block       Second IDE hard disk/CD-ROM interface
                  0 = /dev/hdc          Master: whole disk (or CD-ROM)
                 64 = /dev/hdd          Slave: whole disk (or CD-ROM)

                Partitions are handled the same way as for the first
                interface (see major number 3).

or so on:
                   ...
 33 block       Third IDE hard disk/CD-ROM interface
                  0 = /dev/hde          Master: whole disk (or CD-ROM)
                 64 = /dev/hdf          Slave: whole disk (or CD-ROM)

                Partitions are handled the same way as for the first
                interface (see major number 3).

By comparison the first 16 SCSI hard drives are all block major 8:
  8 block       SCSI disk devices (0-15)
                  0 = /dev/sda          First SCSI disk whole disk
                 16 = /dev/sdb          Second SCSI disk whole disk
                 32 = /dev/sdc          Third SCSI disk whole disk
                    ...
                240 = /dev/sdp          Sixteenth SCSI disk whole disk

                Partitions are handled in the same way as for IDE
                disks (see major number 3) except that the limit on
                partitions is 15.

while SCSI CDROM drives are all block major 11:
 11 block       SCSI CD-ROM devices
                  0 = /dev/scd0         First SCSI CD-ROM
                  1 = /dev/scd1         Second SCSI CD-ROM
                    ...

                The prefix /dev/sr (instead of /dev/scd) has been deprecated.

So, at least at the administrator level, it looks like we're swapping one
complexity for another.

My .02
Raymond McLaughlin


More information about the grlug mailing list