《SCSI命令概述(翻译).ppt》由会员分享,可在线阅读,更多相关《SCSI命令概述(翻译).ppt(34页珍藏版)》请在三一办公上搜索。
1、UNH 互操作性实验室,SCSI 命令概述,物理,物理层,数据链路层,数据传输层,应用层,陈述主题,命令摘要命令选择释义附加意义上的代码及资格,CDB,命令数据程序块命令由CDBs定义每个对象都有他自己的 CDBCDBs 由多种SCSI标准定义拥有固定和变化的长度变量In SAS:囊括在一个指令框架中,SCSI Command Sets,SPC-4SCSI Primary Commands Version 4命令对于所有的方法类型普遍适用SBC-3SCSI Block Command Version 3命令针对特定的块设备(硬盘)SSC-2SCSI Streaming Commands Ver
2、sion 2命令针对特定的流设备(磁盘驱动)MMC-4SCSI Multi Media Commands Version 4命令针对特定的多媒体设备(CD/DVD),Common SCSI Commands in SAS,Read CommandsREAD(6)(SSC and SBC)*READ(10)(SBC)READ(12)(SBC)READ(16)(SBC)READ(32)(SBC)*不同的域定义使用相同的 CDB长度,Command SCSI Commands in SAS,Write CommandsWRITE(6)(SSC and SBC)*WRITE(10)(SBC)WRITE
3、(12)(SBC)WRITE(16)(SBC)WRITE(32)(SBC)*Different Field Definitions,same CDB Length,诊断与初始化指令,读缓冲(SPC)写缓冲(SPC)询问(SPC)测试单元就绪(SPC)模式识别(SPC)模式选择(SPC)日志识别(SPC)日志选择(SPC)读取归类(SPC)REPORT LUNS(SPC),READ BUFFER(SPC)WRITE BUFFER(SPC)INQUIRY(SPC)TEST UNIT READY(SPC)MODE SENSE(SPC)MODE SELECT(SPC)LOG SENSE(SPC)LOG
4、 SELECT(SPC)READ ATTRIUBUTE(SPC)REPORT LUNS(SPC),数据块指定的指令,READ CAPACITYVERIFYWRITE AND VERIFYREAD LONGWRITE LONGMany more,Streaming Specific Commands,LOAD UNLOADLOCATE(16)PREVENT ALLOW MEDIUM REMOVALREAD BLOCK LIMITSREAD POSITIONREWINDSET CAPACITYSPACE(16),READ(16)Command,OP 代码:88h Specifies the com
5、mand读保护:关于写保护检查的多种设定,READ(16)Command,DPO Disable Page Out Bit用于最优化登录目标设备的缓存 Set to 1 tells the target that data at this Logical Block Address is not likely to be accessed again in the near future and that the target can remove it from its local cache,Set to 1告诉目标在这个逻辑区块地址中的数据在不久的将来无法再次接近并且目标可在将它从它的本
6、地缓存中移除,READ(16)Command,FUA and FUA_NV Force Unit Access(Non-Volatile)Used to override the targets internal caching and force it to access the media,适用于目标内部缓存并且指示其接近媒介,READ(16)Command,Logical Block Address(LBA)The address on the medium that the initiator would like to readInternally,the target conver
7、ts the LBA to a(Cylinder,Sector,Head)address Transparent to the computer system and user,逻辑区块地址,在内部,对象将LBA转化成一个地址,此地址对计算机系统和用户而言显而易见,READ(16)Command,Transfer LengthSpecifies the length in contiguous logical units to be transferred in this commandLogical unit is typically 512-bytes(1 Block),本地单元使典型的5
8、12字节(1数据块),在此对象中指定在临近逻辑单元上被转移的长度,READ(16)Command,Restricted for MMC-4Used for the MMC-4 Version of this command,READ(16)Command,Group NumberUsed to collect performance statistics of different groups of commandsApplication As performance vs.Applications Bs performance,用于收集不同组别命令的执行统计,READ(16)Command,
9、ControlStandard SCSI Control BytesDefined in SAM-4Has a consistently defined meaning across all commandsFound only on fixed-length CDB commands,翻译:标准SCSI控制字节,WRITE(16)Command,OP Code:8Ah Specifies the commandWD Protect:Various settings regarding the write protection checking,WRITE(16)Command,DPO Dis
10、able Page Out BitUsed to optimize caching onboard the target device Set to 1 tells the target that data at this Logical Block Address is not likely to be accessed again in the near future and that the target can remove it from its local cache,WRITE(16)Command,FUA and FUA_NV Force Unit Access(Non-Vol
11、atile)Used to override the targets internal caching and force it to access the media,WRITE(16)Command,Logical Block Address(LBA)The address on the medium that the initiator would like to readInternally,the target converts the LBA to a(Cylinder,Sector,Head)address Transparent to the computer system a
12、nd user,WRITE(16)Command,Transfer LengthSpecifies the length in contiguous logical units to be transferred in this commandLogical unit is typically 512-bytes(1 Block),WRITE(16)Command,Restricted for MMC-4Used for the MMC-4 Version of this command,WRITE(16)Command,Group NumberUsed to collect performa
13、nce statistics of different groups of commandsApplication As performance vs.Applications Bs performance,WRITE(16)Command,ControlStandard SCSI Control BytesDefined in SAM-4Has a consistently defined meaning across all commandsFound only on fixed-length CDB commands,TEST UNIT READY Command,OP Code:00h
14、 Specifies the commandControl Bits are typically zeroDefined in SAM-4Result:6 Byte CDB consisting of entirely 0s,TEST UNIT READY Command,Also:CHECK CONDITION NOT READY POWER ON OCCURED,INQUIRY Command,OP Code:12h Specifies the CommandEVPD:Enable Vital Product DataSet to zero,the device returns stand
15、ard inquiry dataSet to one,enables the page code field,设置为0,设备返回普通的询问信息,设置为1,启用页面代码字段,INQUIRY Command,Page Code:Specifies the page code to return.Pages are defined in SAM-4,SPC-4,and technology specific standardsAllocation Length specifies the length of inquiry data the initiator is prepared to acce
16、pt in bytes,定位长度决定了发起者准备接收的询问信息的长度,REPORT LUNS Command,OP Code:A0h Specifies the commandSelect Report:,REPORT LUNS Command,Allocation Length should be at least 16 bytesIf the allocation length is insufficient to report all the LUNs on the device,the device shall report only what it is able to report
17、,翻译:定位长度至少要有16字节,翻译:如果定位长度不足以报告设备上所有的逻辑单元,硬盘应该只报告它可以报告的单元,Additional Sense Codes,Values returned in a Response Frame(SAS)in the event that a command could not be completedSo many possible problems that a qualifier is used to expand the pool of possible returns,翻译:在一个指令无法完成的活动中,值在应答框架中返回,翻译:由很多可能存在的问题因此修饰符通常用于扩展返回问题池,Additional Sense Codes Examples,ASC:0 x00 ASCQ:0 x06I/O Process TerminatedASC:0 x04 ASCQ:0 x11Logical Unit Not Ready,Notify(Enable Spinup)Required ASC:0 x4B ASCQ:0 x03ACK/NAK Timeout,