⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ch42.htm

📁 linux-unix130.linux.and.unix.ebooks130 linux and unix ebookslinuxLearning Linux - Collection of 12 E
💻 HTM
📖 第 1 页 / 共 2 页
字号:


<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<SCRIPT>
<!--
function displayWindow(url, width, height) {
        var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>

 -->




 



<UL>



	<LI><A HREF="#Heading1">- 42 -</A>



	<UL>



		<LI><A HREF="#Heading2">SCSI Devices</A>



		<UL>



			<LI><A HREF="#Heading3">Supported SCSI Devices</A>



			<LI><A HREF="#Heading4">SCSI Device Drivers</A>



			<UL>



				<LI><A HREF="#Heading5">Hard Drives</A>



				<LI><A HREF="#Heading6">CD-ROM Devices</A>



				<LI><A HREF="#Heading7">Tape Drives</A>



				<LI><A HREF="#Heading8">Other Devices</A>



			</UL>



			<LI><A HREF="#Heading9">Troubleshooting SCSI Devices</A>



			<LI><A HREF="#Heading10">Summary</A>



		</UL>



	</UL>



</UL>







<P>



<HR SIZE="4">







<H2 ALIGN="CENTER"><A NAME="Heading1<FONT COLOR="#000077">- 42 -</FONT></H2>



<H2 ALIGN="CENTER"><A NAME="Heading2<FONT COLOR="#000077">SCSI Devices</FONT></H2>



<P><I>by Tim Parker</I></P>



<P>IN THIS CHAPTER</P>







<UL>



	<LI>Supported SCSI Devices 



	<P>



	<LI>SCSI Device Drivers 



	<P>



	<LI>Troubleshooting SCSI Devices  



</UL>







<P><BR>



This chapter will look at SCSI devices. More specifically, you will see:







<UL>



	<LI>What a SCSI device is



	<P>



	<LI>What kind of SCSI devices can be attached to Linux



	<P>



	<LI>How to configure SCSI devices



	<P>



	<LI>Typical problems and solutions for SCSI users



</UL>







<P>SCSI (Small Computer Systems Interface), pronounced &quot;scuzzy,&quot; is a standard



method of interfacing between a computer and peripherals. It has many advantages



over other interconnect systems such as IDE, albeit generally at a higher price.</P>



<P>SCSI uses a dedicated controller card within the computer, from which a chain



of devices can be connected. All the SCSI devices are coupled using a flat-ribbon



cable (internally) or a shielded cable (externally). Each SCSI chain can support



seven devices. Each device has a SCSI ID number from 0 to 7. Usually the controller



card is set to use number 7, while bootable SCSI hard drives are set to use SCSI



ID 0. The other numbers are available for other devices, although each ID can be



used by only one device.</P>



<P>The advantages of SCSI are primarily in its high speed. Also, with most SCSI devices,



all the electronics needed to control them are attached to the device, making it



easier for devices to talk to each other. The other major advantage of SCSI is that



you don't have to do anything special to configure the system. When you plug in a



new SCSI device (such as a scanner) with a unique SCSI ID, the system controller



card recognizes it because the on-board electronics identify the type of device to



the card automatically.</P>



<P>SCSI devices must have a terminator at each end of the chain. Terminators are



a set of resistors that provide an electrical indication that the chain ends at that



point. There should be only two terminators on each SCSI chain, one at each end.



Most SCSI controller cards have a set of switches or a block of removable resistors



that terminate one end, while SCSI devices have a switch or resistors that allow



that device to automatically terminate the chain. Some devices are clever enough



to sense that they are the last SCSI device in a chain, and they terminate without



any intervention from you.</P>



<P>SCSI devices can communicate with each other quickly over the chain. A scanner



can send instructions straight to a hard drive, and a tape drive can dump information



straight to another SCSI device without involving the operating system too much.



This helps the speed and makes SCSI devices particularly flexible.</P>



<P>I won't go into all the details of SCSI connectivity and architecture, because



you don't need to know these details for most purposes. If you need more information,



most SCSI controller cards include a good description of the theory.



<H3 ALIGN="CENTER"><A NAME="Heading3<FONT COLOR="#000077">Supported SCSI Devices</FONT></H3>



<P>You can't assume that since Linux supports SCSI, any SCSI device will work. Most



versions of the operating system have a hardware compatibility file in the distribution



set that lists all devices that have been tested and are known to work properly with



the SCSI system. Check this file carefully before you buy a new device or controller



card! Some devices and cards simply don't work with Linux.</P>



<P>Some SCSI devices are shipped with their own kernel patches. You will have to



make sure the patches correspond to the version of the Linux kernel you are using,



then rebuild the kernel with the new drivers in place. If the devices don't have



a Linux kernel patch, check with the manufacturer or Linux distribution sites.



<H3 ALIGN="CENTER"><A NAME="Heading4<FONT COLOR="#000077">SCSI Device Drivers</FONT></H3>



<P>Every device on the Linux system must have a device file, and SCSI devices are



no different. In many cases, Linux is distributed with a complete set of SCSI device



files that only need to be configured properly. You should know a little about device



drivers, device files, and major and minor device numbers. See Chapter 39, &quot;Devices,&quot;



for more information.



<H4 ALIGN="CENTER"><A NAME="Heading5<FONT COLOR="#000077">Hard Drives</FONT></H4>



<P>SCSI disk drives are always block devices and should always use major device number



8. No &quot;raw&quot; SCSI devices are usually supported by Linux, despite its similarity



to BSD UNIX, which does support raw SCSI devices.</P>



<P>Sixteen minor device numbers are allocated to each SCSI disk device. Minor device



number 0 represents the whole disk drive, minor numbers 1 through 4 are the four



primary partitions, and minor numbers 5 through 15 are used for any extended partitions.</P>



<P>With Linux, SCSI disk minor device numbers are assigned dynamically, starting



with the lowest SCSI ID numbers. The standard naming convention for SCSI hard drives



is <TT>/dev/sd{</TT>letter<TT>}</TT> for the entire disk device (such as <TT>/dev/sda</TT>



or <TT>/dev/sdb</TT>), and <TT>/dev/sd{</TT>letter<TT>}{</TT>partition<TT>}</TT>



for the partitions on that device (such as <TT>/dev/sda1</TT> or <TT>/dev/sda2</TT>).</P>



<P>Linux presents a few problems when partitioning SCSI disks, because Linux talks



directly to the SCSI interface. Each disk drive is viewed as the SCSI host sees it,



with block numbers from 0 up to the highest block number. They are all assumed to



be error-free. This means there is an easy way to get at the disk geometry. (For



comparison, DOS requires head-cylinder-sector mapping, which is not as efficient



but does allow direct manipulation.)</P>



<P>To partition the drive, either you will have to use the entire disk for Linux



(in which case the installation takes care of it), or you can use DOS or Linux's



<TT>fdisk</TT> program to create partitions for other operating systems first. Also,



with systems that support both SCSI hard drives and IDE hard drives, you might have



to reconfigure the system in the machine's BIOS to recognize the SCSI drive as the



primary (boot) device.



<H4 ALIGN="CENTER"><A NAME="Heading6<FONT COLOR="#000077">CD-ROM Devices</FONT></H4>



<P>SCSI CD-ROM drives with a block size of 512 or 2048 bytes will work with Linux,



but any other block size will not. Since most CD-ROM drives and CD-ROM discs have



either 512- or 2048-byte blocks, this shouldn't cause a problem unless the drive



is from a source where other block sizes are the norm.</P>



<P>CD-ROM discs are offered in several different formats, not all of which might



be readable on a Linux system. The international standard is called ISO 9660, but



not all CD-ROMs conform to this standard because it was adopted long after CD-ROMs

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -