📄 ch42.htm
字号:
became popular.</P>
<P>SCSI CD-ROMs use the major device number 11, and minor device numbers are allocated
dynamically. The first CD-ROM drive found is minor 0, the second is minor 1, and
so on. The naming convention used with Linux is <TT>/dev/sr{</TT>digit<TT>}</TT>,
such as <TT>/dev/sr0</TT> and <TT>/dev/sr1</TT> for the first and second CD-ROM drives
installed. Alternatively, some Linux distributions name the devices <TT>/dev/scd0</TT>,
<TT>/dev/scd1</TT>, and so on.</P>
<P>After you set the CD-ROM SCSI address properly (the system should recognize the
device when the SCSI card boots), the CD-ROM device must be mounted. This can be
done manually or embedded in the startup sequence so that the drive is always available.</P>
<P>To mount a CD-ROM device, the general command is<FONT COLOR="#0066FF"></FONT>
<PRE><FONT COLOR="#0066FF">mount /dev/sr0 /mount_point
</FONT></PRE>
<P>where mount_point is a directory that can be used. You must create the directory
beforehand in order for the mount to work. For convenience, most systems that use
CD-ROMs should create a directory called <TT>/cdrom</TT>, which is always the mount
point.</P>
<P>If your CD-ROM doesn't mount properly with this command, the reason might be the
disc type or the lack of an entry in the file <TT>/etc/fstab</TT> which identifies
the CD as an ISO 9660 device. The correct syntax to mount an ISO 9660 CD-ROM (also
called High-Sierra) is<FONT COLOR="#0066FF"></FONT>
<PRE><FONT COLOR="#0066FF">mount -t iso9660 /dev/sr0 /mount_point
</FONT></PRE>
<P>For this to work correctly, you must have the kernel set to support the ISO 9660
file system. If this hasn't been done, rebuild the kernel with this option added.</P>
<P>Linux attempts to lock the CD-ROM drive door when a disc is mounted. This is done
to prevent file system confusion due to a media change. Not all CD-ROM drives support
door locking, but if you find yourself unable to eject a CD-ROM, it is probably because
the disc is mounted (it doesn't have to be in use).
<H4 ALIGN="CENTER"><A NAME="Heading7<FONT COLOR="#000077">Tape Drives</FONT></H4>
<P>Linux supports several SCSI tape drives. You should check the hardware configuration
guide before purchasing one, though, to ensure compatibility. The most popular SCSI
tape models, including the Archive Viper QIC drives, Exabyte 8mm drives, and Wangtek
5150S and DAT tape drives, are all known to work well.</P>
<P>SCSI tapes use character device major number 9, and the minor numbers are assigned
dynamically. Usually, rewinding tape devices are numbered from 0, so the first tape
drive is <TT>/dev/rst0</TT> (character mode, major number 9, minor number 0), the
second device is <TT>/dev/rst1</TT> (character mode, major number 9, minor number
1), and so on. Non-rewinding devices have the high bit set in the minor number so
that the first non-rewinding tape drive is <TT>/dev/nrst0</TT> (character mode, major
device 9, minor device 128).</P>
<P>The standard naming convention for SCSI tape drives is <TT>/dev/nrst{</TT>digit<TT>}</TT>
for non-rewinding devices (such as <TT>/dev/nrst0</TT>, <TT>/dev/nrst1</TT>, and
so on), and <TT>/dev/rst{</TT>digit<TT>}</TT> for rewinding devices (such as <TT>/dev/rst0</TT>
and <TT>/dev/rst1</TT>).</P>
<P>Generally, Linux supports tape devices that use either fixed- or variable-length
blocks, as long as the block length is smaller than the driver buffer length, which
is set to 32KB in most Linux distribution sources (although this can be changed).
Tape drive parameters such as block size, buffering process, and tape density are
set with <TT>ioctls</TT>, which can be issued by the <TT>mt</TT> program.
<H4 ALIGN="CENTER"><A NAME="Heading8<FONT COLOR="#000077">Other Devices</FONT></H4>
<P>Many other SCSI devices are available, such as scanners, printers, removable cartridge
drives, and so on. These are handled by the Linux generic SCSI device driver. The
generic SCSI driver provides an interface for sending commands to all SCSI devices.</P>
<P>SCSI generic devices use character mode and major number 21. The minor device
numbers are assigned dynamically from 0 for the first device, and so on. The generic
devices have the names <TT>/dev/sg0</TT>, <TT>/dev/sg1</TT>, <TT>/dev/sg2</TT>, and
so on.
<H3 ALIGN="CENTER"><A NAME="Heading9<FONT COLOR="#000077">Troubleshooting SCSI
Devices</FONT></H3>
<P>Many common problems with SCSI devices are quite easy to solve. Finding the cause
of the problem is often the most difficult step. It's usually helpful to read the
diagnostic message that the operating system displays when it boots or attempts to
use a SCSI device.</P>
<P>The following are the most common problems encountered with SCSI devices, their
probable causes, and possible solutions: SCSI devices show up at all possible SCSI
IDs You have configured the device with the same SCSI address as the controller,
which is typically set at SCSI ID 7. Change the jumper settings to another SCSI ID.</P>
<P>A SCSI device shows up with all possible LUNs The device probably has bad firmware.
The file <TT>/usr/src/linux/drivers/scsi/scsi.c</TT> contains a list of bad devices
under the variable <TT>blacklist</TT>. You can try adding the device to this list
and see if it affects the behavior. If not, contact the device manufacturer.</P>
<P>Your SCSI system times out Make sure the controller card's interrupts are enabled
correctly and that there are no IRQ, DMA, or address conflicts with other boards
in your system.</P>
<P>You get "sense errors" from error-free devices This is usually caused
by either bad cables or improper termination on the chain. Make sure the SCSI chain
is terminated at both ends using external or onboard terminators. Don't terminate
in the middle of the chain, because this can also cause problems. You can probably
use passive termination, but for long chains with several devices, try active termination
for better behavior.</P>
<P>The tape drive is not recognized at boot time Try booting with a tape in the drive.</P>
<P>A networking kernel does not work with new SCSI devices The <TT>autoprobe</TT>
routines for many network drivers are not passive and can interfere with some SCSI
drivers. Try to disable the network portions to identify the guilty program, and
then reconfigure it.</P>
<P>A SCSI device is detected, but the system is unable to access it You probably
don't have a device file for the device. Device drivers should be in <TT>/dev</TT>
and configured with the proper type (block or character) and unique major and minor
device numbers. Run <TT>mkdev</TT> for the device.</P>
<P>The SCSI controller card fails when it uses memory-mapped I/O This problem is
common with Trantor T128 and Seagate boards, and is caused when the memory-mapped
I/O ports are incorrectly cached. You should have the board's address space marked
as uncacheable in the XCMOS settings. If you can't mark them as such, disable the
cache and see if the board functions properly.</P>
<P>Your system fails to find the SCSI devices and you get messages when the system
boots, such as <TT>scsi : 0 hosts</TT> or <TT>scsi%d : type:</TT> The <TT>autoprobe</TT>
routines on the controller cards rely on the system BIOS autoprobe and can't boot
properly. This is particularly prevalent with these SCSI adapters: Adaptec 152x,
Adaptec 151x, Adaptec AIC-6260, Adaptec AIC-6360, Future Domain 1680, Future Domain
TMC-950, Future Domain TMC-8xx, Trantor T128, Trantor T128F, Trantor T228F, Seagate
ST01, Seagate ST02, and Western Digital 7000. Check that your BIOS is enabled and
not conflicting with any other peripheral BIOSes (such as on some adapter cards).
If the BIOS is properly enabled, find the board's "signature" by running
DOS's <TT>DEBUG</TT> command to check if the board is responding. For example, use
the <TT>DEBUG</TT> command <TT>d=c800:0</TT> to see if the board replies with an
acknowledgment (assuming you have set the controller card to use address 0xc8000;
if not, replace the <TT>DEBUG</TT> command with the proper address). If the card
doesn't respond, check the address settings.
<BLOCKQUOTE>
<P>Sometimes the SCSI system locks up completely There are many possible solutions,
including a problem with the host adapter. Check the host adapter with any diagnostics
that came with the board. Try a different SCSI cable to see if that is the problem.
If the lockups seem to occur when multiple devices are in use at the same time, there
is probably a firmware problem. Contact the manufacturer to see if upgrades are available
that would correct the problem. Finally, check the disk drives to ensure that there
are no bad blocks that could affect the device files, buffers, or swap space.
</BLOCKQUOTE>
<H3 ALIGN="CENTER"><A NAME="Heading10<FONT COLOR="#000077">Summary</FONT></H3>
<P>SCSI has a reputation for being difficult to work with, but in fact, it is one
of the easiest and most versatile systems available. Once you get used to the nomenclature,
SCSI offers many useful features to the Linux user. Indeed, most veteran UNIX people
prefer working with SCSI because it is easy to use with the UNIX kernel, and the
same applies to Linux.
</td>
</tr>
</table>
<!-- begin footer information -->
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -