First, thanks to Bart-Jan Vrielink for filling in the "where to look"
pieces of this.  I knew they had to be there somewhere :-).

The only thing I would add to his comments is to make sure you have a
tape in the drive before trying the "mt" commands.

>Yes, because i read that the first scsi device becomes the device /dev/sg0, 
>the second device becomes sg1 etc. 

Ah, yes.  This I can explain.

When the system boots it "probes" for devices in a certain order.  As you
noted, device drivers find the first device that matches the type it is
looking for and makes that zero, the second becomes one, and so on.

The st driver does this, for instance.  The man page says:

       ...  Currently, the driver takes control of  all
       detected  devices  of  type  "sequential-access."  ...

In other words, this is the type of device it is interested in, and:

       ...  The  lower-
       most  five  bits in the minor numbers are assigned sequen-
       tially in the order of detection.  ...

... it picks minor numbers as above (first device it sees is zero, etc).

I don't have an sg man page but I suspect it says something similar.

The problem is that the order of probing is often obscure, involving
hardware trivia only the most dedicated computerites waste their neurons
remembering :-).  So much for ease of administration.

I'm sure it makes perfect sense to device driver writers, but it makes
sysadmins insane.  As you've discovered, just minor shuffling of hardware
can shift minor numbers (and thus, /dev names) all over the place,
causing untold havoc.  Solaris does the same annoying thing and I've
spent my share of time cursing them for renumbering all my disks and
turning a perfectly good server into a lump of metal until I can figure
out what went where.

>Bye Juergen

John R. Jackson, Technical Software Specialist, [EMAIL PROTECTED]

Reply via email to