
技术领域technical field
本发明涉及一种iSCSI协议实现方法,特别是涉及一种利用iSCSI协议访问逻辑设备的方法。The invention relates to a method for realizing the iSCSI protocol, in particular to a method for using the iSCSI protocol to access logic devices.
背景技术Background technique
iSCSI(互联网小型计算机系统接口),即internet SCSI,是一种在Internet协议网络上,特别是以太网上进行数据块传输的标准。从根本上说,iSCSI协议是一种跨过IP网络来传输潜伏时间短的SCSI数据块的方法。iSCSI (Internet Small Computer System Interface), or internet SCSI, is a standard for data block transfer over Internet Protocol networks, especially Ethernet. Fundamentally, the iSCSI protocol is a method of transporting SCSI blocks of data with low latency across an IP network.
SCSI(小型计算机系统接口)是一种广泛使用的连接硬盘和计算机的技术标准,iSCSI这种技术则是将该技术应用到网络连接上。SCSI是一个在物理设备(如驱动器、打印机、计算机等等)之间通信的面向数据块的客户机/服务器的I/O协议。发送一个SCSI指令的设备叫做发起设备(Initiator),也就是发出存取数据要求的一方,通常为服务器端或使用者计算机。接收并响应要求的一方为目标设备(Target),通常为储存设备端。发起设备负责发送命令数据块(Command Data Block,CDB),命令数据块中包含有必须由接收CDB的目标设备执行的参数。SCSI传输器把这些CDB消息映像为物理的互联以传播这些信息。发起设备将SCSI任务发送给目标设备以执行一次OS级数据传输操作。一个目标设备有一个或多个逻辑单元处理发起设备的请求命令,每个逻辑单元被分配给一个标示编号或逻辑单元号(LogicalUnit Numbers,LUN)。每个包含处理命令的逻辑单元都被包含在一个CDB中,并由发起设备向目标设备特定的逻辑单元发送。例如:发起者请求读取指定的数据块,目标设备的逻辑单元向发设备传送相应的数据块,并通过中断状态指明请求已完成。而iSCSI的主要任务是,通过IP网络在发起设备和目标设备之间完成CDB的封装、可靠转送等处理。SCSI (Small Computer System Interface) is a widely used technical standard for connecting hard drives and computers, and iSCSI is a technology that applies this technology to network connections. SCSI is a block-oriented client/server I/O protocol for communication between physical devices (such as drives, printers, computers, etc.). The device that sends a SCSI command is called an initiator, that is, the party that issues a data access request, usually a server or a user computer. The party that receives and responds to the request is the target device (Target), usually the storage device. The initiating device is responsible for sending a command data block (Command Data Block, CDB), which contains parameters that must be executed by the target device receiving the CDB. The SCSI transport maps these CDB messages to the physical interconnect to disseminate the information. The initiating device sends a SCSI task to the target device to perform an OS-level data transfer operation. A target device has one or more logical units to process the request commands of the initiating device, and each logical unit is assigned an identification number or logical unit number (LogicalUnit Numbers, LUN). Each logical unit containing processing commands is contained in a CDB and sent by the initiator device to the specific logical unit of the target device. For example: the initiator requests to read the specified data block, the logic unit of the target device transmits the corresponding data block to the sending device, and indicates that the request has been completed through the interrupt status. The main task of iSCSI is to complete CDB encapsulation and reliable transfer between the initiator device and the target device through the IP network.
iSCSI协议实现了在TCP/IP网络上传输SCSI指令,使用户能够通过目前最被广泛使用的以太网来访问在网络任何地点服务器上的块(block)存储设备。这些存储设备可为硬盘、CD-ROM或其它硬件设备,但这些设备必须都能够执行SCSI指令。The iSCSI protocol implements the transmission of SCSI commands on the TCP/IP network, enabling users to access block storage devices on servers anywhere in the network through the most widely used Ethernet at present. These storage devices can be hard disks, CD-ROMs or other hardware devices, but these devices must be able to execute SCSI commands.
在Linux中,几乎所有的硬件设备都有其相应的设备文件,如硬盘、CPU等等,并且许多生成的设备如磁盘冗余数组(Raid)也会有其对应的设备文件。而Linux内核通过设备文件和进程对话,所以内核中的设备驱动程序可以通过它们和物理设备通信或执行指令。In Linux, almost all hardware devices have their corresponding device files, such as hard disk, CPU, etc., and many generated devices such as disk redundancy array (Raid) will also have their corresponding device files. The Linux kernel talks to processes through device files, so device drivers in the kernel can communicate with physical devices or execute instructions through them.
请参见图1,目前在Linux下,此协议的大部分的目标设备120端的实现办法都是写成一个Linux kernel module(内核模块),经编译后装载到内核之中,然后此Module便会在内核中充当网络子系统(Network Subsystem)121和SCSI子系统(SCSI Subsystem)123的桥梁。iSCSI协议就是一个在网络上封包和解包的过程,在网络的一端,数据包被封装成包括TCP/IP头、iSCSI识别包和SCSI数据的三部分内容,传输到网络另一端时,这三部分内容分别被顺序地解开。Please refer to Fig. 1, currently under Linux, most of the implementation methods of the target device 120 end of this protocol are written as a Linux kernel module (kernel module), loaded into the kernel after compilation, and then this Module will be in the kernel It acts as a bridge between the Network Subsystem (Network Subsystem) 121 and the SCSI Subsystem (SCSI Subsystem) 123. The iSCSI protocol is a process of encapsulating and unpacking on the network. At one end of the network, the data packet is encapsulated into three parts including the TCP/IP header, iSCSI identification packet and SCSI data. When transmitted to the other end of the network, these three parts The contents are sequentially unpacked respectively.
首先从网络子系统121中取得从发起设备110传来的iSCSI PDU(协议数据单元),然后根据在PDU中不同的iSCSI指令,做相应的处理及响应,然后传回网络子系统121。有很多PDU包含SCSI CDB,而这些CDB便会递交至SCSI子系统123去处理,而处理完后的响应便会以CDB的形式传递上来,iSCSI模块122便再做相关的处理,然后再将这些PDU传送至网络子系统121。因此,目前的模块(Module)只能将SCSI物理设备,如驱动器、打印机、计算机等等,提供给用户来使用。但若服务器为了性能、容错、扩展性或方便管理的目的,通常会构造出一些逻辑设备(或称为虚拟设备),例如将硬盘重新组织为其它方式(如RAID)、逻辑卷等,并想将这些方式通过Module提供给用户来使用,这在iSCSI协议中是不能直接做到的。First obtain the iSCSI PDU (protocol data unit) transmitted from the initiator 110 from the network subsystem 121, then perform corresponding processing and responses according to different iSCSI commands in the PDU, and then send back to the network subsystem 121. There are many PDUs containing SCSI CDBs, and these CDBs will be submitted to the SCSI subsystem 123 for processing, and the response after processing will be passed up in the form of CDBs, and the iSCSI module 122 will then perform relevant processing, and then these The PDU is sent to the network subsystem 121 . Therefore, the current module (Module) can only provide SCSI physical devices, such as drivers, printers, computers, etc., to users for use. However, if the server is for the purpose of performance, fault tolerance, scalability or convenient management, it usually constructs some logical devices (or called virtual devices), such as reorganizing the hard disk into other methods (such as RAID), logical volumes, etc., and want to These methods are provided to users through the Module, which cannot be directly implemented in the iSCSI protocol.
发明内容Contents of the invention
有鉴于此,本发明为解决上述问题而提出一种利用iSCSI协议访问逻辑设备的方法,主要目的在于:使iSCSI协议不仅仅只能提供给SCSI物理设备,也可将RAID、逻辑卷等这样的逻辑设备提供给用户,从而实现发起设备与逻辑目标设备之间的通信。In view of this, the present invention proposes a method for utilizing the iSCSI protocol to access logical devices in order to solve the above-mentioned problems. Logical devices are provided to users to enable communication between initiator devices and logical target devices.
所以为达到上述目的,本发明中提供一种利用iSCSI协议访问逻辑设备的方法,其可实现发起设备到逻辑目标设备的数据传输,其中包括如下步骤:Therefore, in order to achieve the above object, the present invention provides a method for utilizing the iSCSI protocol to access a logical device, which can realize data transmission from an initiating device to a logical target device, which includes the following steps:
赋予每个目标设备文件一组ID与逻辑单元号;Give each target device file a set of ID and logical unit number;
接收该发起设备的访问请求,同时建立该发起设备与该目标设备的连接;receiving an access request from the initiating device, and simultaneously establishing a connection between the initiating device and the target device;
自该连接中提取SCSI协议数据单元;extracting SCSI protocol data units from the connection;
自该协议数据单元中提取SCSI命令数据块;Extracting a SCSI command data block from the protocol data unit;
确定该命令数据块中的ID与逻辑单元号对应的设备文件,同时根据该命令数据块中的SCSI指令,对该设备文件进行相应处理,并制造出相应的响应;及Determine the device file corresponding to the ID in the command data block and the logical unit number, and simultaneously process the device file correspondingly according to the SCSI command in the command data block, and produce a corresponding response; and
将该响应构造成SCSI协议数据单元放入连接中回送至该发起设备。The response is constructed as a SCSI protocol data unit put into the connection back to the initiating device.
本发明的利用iSCSI协议访问逻辑设备的方法使iSCSI协议不仅仅只能提供SCSI物理设备,也可将RAID、逻辑卷等逻辑设备,提供给用户使用,因此用户可直接享受到服务器带来的便利及性能的提升,而不用在自己本机上多增加硬件设备。从而可以降低成本,也可以降低管理的复杂度。充分利用了存储容量、集中管理存储、降低了存储成本。The method of using the iSCSI protocol to access logical devices of the present invention makes the iSCSI protocol not only provide SCSI physical devices, but also provide logical devices such as RAID and logical volumes to users, so users can directly enjoy the convenience brought by the server And performance improvement, without adding more hardware devices on your own machine. Therefore, the cost can be reduced, and the complexity of management can also be reduced. Make full use of storage capacity, centrally manage storage, and reduce storage costs.
有关本发明的详细内容及技术,现结合附图说明如下。The details and technology of the present invention are described below in conjunction with the accompanying drawings.
附图说明Description of drawings
图1为iSCSI协议实现过程的示意图;Fig. 1 is a schematic diagram of the implementation process of the iSCSI protocol;
图2为本发明利用iSCSI协议访问逻辑设备的方法的总体流程图;Fig. 2 is the overall flowchart of the method for utilizing the iSCSI protocol to access logical devices in the present invention;
图3为本发明初始化的流程图;Fig. 3 is the flowchart of initialization of the present invention;
图4为本发明处理SCSI CDB的流程图;及Fig. 4 is the flow chart that the present invention handles SCSI CDB; And
图5为本发明实施例的ISCSI协议下逻辑卷实现方法的流程图。FIG. 5 is a flowchart of a method for implementing a logical volume under the ISCSI protocol according to an embodiment of the present invention.
图中标号说明:Explanation of symbols in the figure:
110 发起设备110 Initiating device
120 目标设备120 target devices
121 网络子系统121 network subsystem
122 iSCSI模块122 iSCSI modules
123 SCSI子系统123 SCSI subsystem
步骤210赋予每个目标设备文件一组ID与逻辑单元号Step 210 assigns each target device file a set of ID and LUN
步骤220接收该发起设备的访问请求,同时建立该发起设备与该目标设备的连接Step 220 receives the access request from the initiating device, and simultaneously establishes a connection between the initiating device and the target device
步骤230自该连接中提取SCSI协议数据单元Step 230 extracts SCSI protocol data units from the connection
步骤240自该协议数据单元中提取SCSI命令数据块Step 240 extracts the SCSI command data block from the protocol data unit
步骤250确定该命令数据块中的ID与逻辑单元号对应的设备文件,同时根据该命令数据块中的SCSI指令,对该设备文件进行相应处理,并制造出相应的响应Step 250 determines the device file corresponding to the ID in the command data block and the logical unit number, and simultaneously processes the device file according to the SCSI command in the command data block, and produces a corresponding response
步骤260将该响应构造成SCSI协议数据单元放入连接中回送至该发起设备Step 260 constructs the response as a SCSI protocol data unit into the connection and sends it back to the initiating device
步骤301打开设备文件
步骤302赋予设备文件ID与LUN
步骤303创建守护进程处理SCSI CDB
步骤304创建守护进程建立连接
步骤4100有下一个iSCSI PDU?Step 4100 Is there a next iSCSI PDU?
步骤4200SCSI指令从SCSI CDB中被提取Step 4200 SCSI command is fetched from SCSI CDB
步骤4300辨别命令对象与种类Step 4300 distinguishes the command object and type
步骤4310指令为INQUIRY?Step 4310 Instruction INQUIRY?
步骤4311种类设定为DiskStep 4311 type is set to Disk
步骤4312制造相应的响应Step 4312 produces a corresponding response
步骤4320指令为READ?Step 4320 instruction is READ?
步骤4321调用函数得到DataStep 4321 calls the function to get Data
步骤4330指令为READ CAPACITY?Step 4330 instruction is READ CAPACITY?
步骤4331计算容量Step 4331 calculate capacity
步骤4340指令为WRITE?Step 4340 instruction is WRITE?
步骤4341调用函数写入DataStep 4341 calls the function to write Data
步骤4400响应与Data被做成iSCSI PDUStep 4400 Response and Data are made into iSCSI PDU
步骤4500将iSCSI PDU放入连接中传送Step 4500 puts iSCSI PDUs into the connection for transmission
步骤5100有下一个iSCSI PDU?Step 5100 Is there a next iSCSI PDU?
步骤5200SCSI指令从SCSI CDB中被提取Step 5200 SCSI command is fetched from SCSI CDB
步骤5300辨别命令对象与种类Step 5300 distinguishes the command object and type
步骤5310指令为INQUIRY?Step 5310 instruction is INQUIRY?
步骤5311种类设定为DiskStep 5311 type is set to Disk
步骤5312制造相应的响应Step 5312 produces the corresponding response
步骤5320指令为READ?Step 5320 instruction is READ?
步骤5321调用逻辑卷函数得到DataStep 5321 calls the logical volume function to get the Data
步骤5330指令为READ CAPACITY?Step 5330 instruction is READ CAPACITY?
步骤5331计算逻辑卷容量Step 5331 calculates logical volume capacity
步骤5340指令为WRITE?Step 5340 instruction is WRITE?
步骤5350其它STEP 5350 Miscellaneous
步骤5341调用逻辑卷函数写入DataStep 5341 calls the logical volume function to write Data
步骤5400响应与Data被做成iSCSI PDUStep 5400 Response and Data are made into iSCSI PDU
步骤5500将iSCSI PDU放入连接中传送Step 5500 puts iSCSI PDUs into the connection for transmission
具体实施方式Detailed ways
随着计算机系统和存储设备的管理员时常被日益膨胀的数据量和不断变化的数据存储需求所困扰,很多人开始考虑采用虚拟存储解决方案。虚拟存储,将大量不同的物理存储网络和装置,出于管理的目的,从逻辑上整合成一个逻辑设备的过程,目的是帮助企业扩充、集中并简化大部分存储设备。本发明使用iSCSI协议不仅可以应用在物理设备之间的通信,而且还可以实现像逻辑卷、Raid这样的逻辑设备的通信。As administrators of computer systems and storage devices are often plagued by ever-increasing data volumes and changing data storage requirements, many are beginning to consider virtual storage solutions. Virtual storage is the process of logically integrating a large number of different physical storage networks and devices into one logical device for management purposes, with the purpose of helping enterprises expand, centralize and simplify most storage devices. The invention uses the iSCSI protocol not only to be applied to the communication between physical devices, but also to realize the communication of logical devices such as logical volumes and Raid.
iSCSI使我们可以用以太网来构建IP存储局域网。通过这种方法,iSCSI克服了直接连接存储的局限性,使我们可以跨不同服务器共享存储资源,并可在不停机状态下扩充存储容量。iSCSI系统由一块SCSI卡(大部分实现方式为虚拟SCSI卡)发出一个SCSI指令,指令被封装到信息包中并发送。接收方从信息包中抽取SCSI指令并执行,然后把返回的SCSI响应和数据封装到IP信息包中,并将它们发回到发送方。系统抽取数据或指令,并把它们传回SCSI子系统。iSCSI allows us to use Ethernet to build IP storage area networks. In this way, iSCSI overcomes the limitations of direct-attached storage, allowing us to share storage resources across different servers and expand storage capacity without downtime. The iSCSI system sends a SCSI command from a SCSI card (mostly implemented as a virtual SCSI card), and the command is encapsulated into a packet and sent. The receiver extracts and executes SCSI commands from the information packet, then encapsulates the returned SCSI response and data into IP information packets, and sends them back to the sender. The system extracts data or instructions and passes them back to the SCSI subsystem.
本发明SCSI CDB便不传交给SCSI子系统来处理,而是在模块(module)中解开SCSI CDB然后根据SCSI指令在module中处理。The SCSI CDB of the present invention is not delivered to the SCSI subsystem for processing, but the SCSI CDB is untied in the module and then processed in the module according to the SCSI command.
请参见图2,该图为本发明利用iSCSI协议访问逻辑设备的方法的总体流程图。如图所示,首先赋予每个目标设备文件一组ID与逻辑单元号(步骤210),接收该发起设备的访问请求,同时建立该发起设备与该目标设备的连接(步骤220),自该连接中提取SCSI协议数据单元(步骤230),自该协议数据单元中提取SCSI命令数据块(步骤240),确定该命令数据块中的ID与逻辑单元号对应的设备文件,同时根据该命令数据块中的SCSI指令,对该设备文件进行相应处理,并制造出相应的响应(步骤250),将该响应构造成SCSI协议数据单元放入连接中回送至该发起设备(步骤260)。Please refer to FIG. 2 , which is an overall flow chart of the method for accessing logical devices using the iSCSI protocol in the present invention. As shown in the figure, at first give each target device a set of ID and logical unit number (step 210), receive the access request of the originating device, and set up the connection between the originating device and the target device (step 220), from the Extract the SCSI protocol data unit (step 230) in the connection, extract the SCSI command data block (step 240) from the protocol data unit, determine the device file corresponding to the ID in the command data block and the logical unit number, and simultaneously according to the command data The SCSI command in the block, the device file is processed accordingly, and a corresponding response is produced (step 250), and the response is constructed as a SCSI protocol data unit and put into the connection and sent back to the initiating device (step 260).
本发明在Linux下使iSCSI协议将设备文件当物理硬盘使用。请参见图3,该图是本发明初始化的流程图。加载module时,各设备文件首先被打开(步骤301),每个设备文件被赋予一组ID与逻辑单元号(LUN:logical unitnumber,LUN)(步骤302),同时启动守护进程一(负责处理创建连接)(步骤303)和守护进程三(解释和处理SCSI CDB)(步骤304),然后等待起动设备的访问。The invention enables the iSCSI protocol to use the device file as a physical hard disk under Linux. Please refer to FIG. 3 , which is a flowchart of the initialization of the present invention. When loading the module, each device file is opened at first (step 301), and each device file is given a group of ID and logical unit number (LUN: logical unitnumber, LUN) (step 302), starts daemon process one simultaneously (responsible for processing creation connect) (step 303) and daemon process three (interpretation and processing SCSI CDB) (step 304), then wait for the access of the boot device.
一个“守护进程”(即守护程序进程)通常为一个后台进程,而且它不属于任何一个终端会话(terminal session)。许多系统服务由守护程序实施,如网络服务,打印等。A "daemon" (that is, a daemon process) is usually a background process, and it does not belong to any terminal session (terminal session). Many system services are implemented by daemons, such as web services, printing, etc.
发起设备访问时,守护进程一从内核接受来自发起设备的套接字(socket)(从发起设备来的参数也包含在其中),而后守护进程一建立连接并将套接字(Socket)置于连接(Connection)中,随后依次创建守护进程四(回送iSCSI PDU给发起设备)与守护进程二(处理从发起设备来的iSCSIPDU),建立的连接被转交至守护进程四和守护进程二。每当有新的访问时,此过程便会循环一次。When initiating device access, the daemon process accepts the socket (socket) from the initiating device from the kernel (the parameters from the initiating device are also included), and then the daemon process establishes a connection and puts the socket (Socket) in In Connection, daemon process 4 (returns iSCSI PDU to the initiating device) and daemon process 2 (processing iSCSI PDU from the initiating device) are created sequentially, and the established connection is transferred to daemon process 4 and daemon process 2. This process loops every time there is a new visit.
然后守护进程二从连接中提取iSCSI PDU的头(header),而后根据header中的指令,作相应的处理。指令可分两类,第一种为SCSI硬盘的IO或对SCSI硬盘状态的请求;第二种为其它请求,如对iSCSI目标设备(target)状态的请求、参数的交换、登录等等。若为第一种指令时,SCSI CDB被提取出来,然后交给守护进程三处理;若为其它请求,则根据不同的指令,做出不同的响应。请参见图4,若有下一个iSCSI PDU((步骤4100),守护进程三从连接的SCSI CDB中提取SCSI指令,确定对哪个ID与LUN的指令(步骤4200),并辨别是为哪一种指令(步骤4300),SCSI指令包括INQUIRY、READ、READ CAPACITY以及WRITE等。若为INQUIRY(步骤4310),响应的种类要设定为disk(步骤4311),相应的响应被制造出来(步骤4312),响应包含设备的种类、厂商数据、产品数据;若为READ(步骤4320),调用设备文件的寻找和读取函数得到Data(步骤4321),相应的响应被制造出来;若为READ CAPACITY(步骤4330),设备的容量被计算出来(步骤4331),相应的响应跟着被制造出来;若为WRITE(步骤4340),调用设备文件的寻找和存写函数写入Data(步骤4341),相应的响应被制造出来;若为其它指令如MODE SENSE、REPORT LUNS、START STOPUNIT、TEST UNIT READY、VERIFY等等,相应的响应被制造出来。随后响应被做成iSCSI PDU(步骤4400),如果有DATA,则响应与DATA被做成iSCSI PDU,然后放回连接中等待传送(步骤4500),等待守护进程四处理。每当有新的SCSI指令时,此过程便会循环一次。另外每当有新的iSCSIPDU时,守护进程四便会从连接中将iSCSI PDU传回发起设备。如需要卸载module,所有资源被清除,各守护进程被关闭。Then daemon process 2 extracts the iSCSI PDU header (header) from the connection, and then performs corresponding processing according to the instructions in the header. Instructions can be divided into two categories, the first is the IO of the SCSI hard disk or the request for the status of the SCSI hard disk; the second is other requests, such as the request for the status of the iSCSI target device (target), parameter exchange, login, etc. If it is the first command, the SCSI CDB is extracted, and then handed over to the daemon process 3 for processing; if it is other requests, different responses will be made according to different commands. Referring to Fig. 4, if there is next iSCSI PDU ((step 4100), the daemon process three extracts the SCSI command from the connected SCSI CDB, determines which ID and LUN command (step 4200), and distinguishes which kind Instruction (step 4300), SCSI instruction comprises INQUIRY, READ, READ CAPACITY and WRITE etc. If be INQUIRY (step 4310), the kind of response will be set to disk (step 4311), and corresponding response is produced (step 4312) , the response includes the type, manufacturer data, and product data of the device; if it is READ (step 4320), the search and read function of the device file is called to obtain Data (step 4321), and the corresponding response is produced; if it is READ CAPACITY (step 4320) 4330), the capacity of the device is calculated (step 4331), and the corresponding response is produced; if it is WRITE (step 4340), call the device file to find and store and write functions to write Data (step 4341), and the corresponding response If it is other commands such as MODE SENSE, REPORT LUNS, START STOPUNIT, TEST UNIT READY, VERIFY, etc., the corresponding response is produced. Then the response is made into iSCSI PDU (step 4400), if there is DATA, then Response and DATA are made into iSCSI PDU, then put back into the connection and wait for transmission (step 4500), waiting for daemon process four to process. Whenever there is a new SCSI command, this process will cycle once. In addition, whenever there is a new iSCSI PDU , the daemon process 4 will return the iSCSI PDU from the connection to the initiating device. If the module needs to be unloaded, all resources will be cleared and each daemon process will be shut down.
应用本发明的利用iSCSI协议访问逻辑设备的方法,可将Raid、逻辑卷(logical volume)等提供给用户使用,下面以磁盘阵列系统中iSCSI协议下的逻辑卷实现方法为例,对本发明进行详细说明。Apply the method for utilizing the iSCSI protocol of the present invention to access a logical device, Raid, logical volume (logical volume) etc. can be provided to the user for use, the logical volume implementation method under the iSCSI protocol in the disk array system is taken as an example below, the present invention is described in detail illustrate.
像磁盘一样逻辑卷可以保留文件系统、原始数据区、转储区或交换区。与磁盘不同的是,当创建逻辑卷并随后扩展其大小时,逻辑卷可以选择大小。也可以通过多块磁盘来扩展逻辑卷。Logical volumes, like disks, can hold file systems, raw data areas, dump areas, or swap areas. Unlike disks, logical volumes can choose a size when they are created and then expanded in size. Logical volumes can also be extended by multiple disks.
首先初始化阶段打开逻辑卷的设备文件,赋予一组ID与LUN于此设备文件,创建SCSI CDB处理守护进程以及连接守护进程。请参见图5,该图是本发明实施例的逻辑卷实现方法中处理SCSI CDB的流程图。当有iSCSIPDU时(步骤5100),提取SCSI命令(步骤5200),辨别命令对象与种类(步骤5300)。若为INQUIRY(步骤5310),设定响应中的种类为disk(步骤5311),制造出相应的响应(步骤5312),设定厂商数据、产品数据。若为READ(步骤5320),则调用逻辑卷的寻找和读取函数得到Data(步骤5321)并制造相应的响应。若为READ CAPACITY(步骤5330),则计算此逻辑卷的容量(步骤5331)并制造相应的响应。若为WRITE(步骤5340),则调用逻辑卷的寻找和存写函数写入Data(步骤5341)并制造相应的响应。若为其它指令(步骤5350),如MODE SENSE、REPORT LUNS、START STOP UNIT、TEST UNITREADY、VERIFY等等,则制造相应的响应(步骤5312)。随后制作iSCSIPDU,其包含响应以及Data(步骤5400),再将iSCSI PDU放回连接中等待传送(步骤5500)。First, open the device file of the logical volume in the initialization stage, assign a set of IDs and LUNs to the device file, create the SCSI CDB processing daemon process and connect the daemon process. Please refer to Fig. 5, which is a flow chart of processing SCSI CDB in the logical volume implementation method of the embodiment of the present invention. When there is an iSCS PDU (step 5100), extract the SCSI command (step 5200), and identify the object and type of the command (step 5300). If it is INQUIRY (step 5310), the type in the setting response is disk (step 5311), and a corresponding response is produced (step 5312), and manufacturer data and product data are set. If it is READ (step 5320), call the search and read function of the logical volume to obtain Data (step 5321) and generate a corresponding response. If it is READ CAPACITY (step 5330), then calculate the capacity of this logical volume (step 5331) and make corresponding response. If it is WRITE (step 5340), call the search and write function of the logical volume to write Data (step 5341) and generate a corresponding response. If be other instructions (step 5350), as MODE SENSE, REPORT LUNS, START STOP UNIT, TEST UNITREADY, VERIFY etc., then make corresponding response (step 5312). Make iSCSI PDU subsequently, it comprises response and Data (step 5400), put iSCSI PDU back into the connection and wait for transmission (step 5500).
虽然本发明以前述的较佳实施例披露如上,然而并非用以限定本发明,因此熟悉该项技术的普通技术人员,在不脱离本发明的精神和范围内,可作些许的更动与润饰,因此本发明的保护范围应以权利要求书所界定的范围为准。Although the present invention is disclosed above with the aforementioned preferred embodiments, it is not intended to limit the present invention, so those who are familiar with this technology can make some changes and modifications without departing from the spirit and scope of the present invention. , so the protection scope of the present invention should be determined by the scope defined in the claims.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CNB2004100019714ACN100452795C (en) | 2004-01-16 | 2004-01-16 | Method for accessing logical device by using iSCSI protocol |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CNB2004100019714ACN100452795C (en) | 2004-01-16 | 2004-01-16 | Method for accessing logical device by using iSCSI protocol |
| Publication Number | Publication Date |
|---|---|
| CN1642170Atrue CN1642170A (en) | 2005-07-20 |
| CN100452795C CN100452795C (en) | 2009-01-14 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CNB2004100019714AExpired - Fee RelatedCN100452795C (en) | 2004-01-16 | 2004-01-16 | Method for accessing logical device by using iSCSI protocol |
| Country | Link |
|---|---|
| CN (1) | CN100452795C (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101188558B (en)* | 2007-12-07 | 2010-12-01 | 杭州华三通信技术有限公司 | Access control method, unit and network device |
| CN101471830B (en)* | 2007-12-25 | 2011-02-02 | 英业达股份有限公司 | Method of multi-path accessing remote logical device under Linux system |
| CN102014528A (en)* | 2010-04-28 | 2011-04-13 | 华为终端有限公司 | Wireless internet equipment, system and method |
| CN101132376B (en)* | 2007-09-28 | 2011-06-15 | 杭州华三通信技术有限公司 | Method, device and corresponding system for controlling iSCSI message transmitting and receiving |
| CN101651559B (en)* | 2009-07-13 | 2011-07-06 | 浪潮电子信息产业股份有限公司 | A method for failover of storage services in a dual-controller storage system |
| CN102207921A (en)* | 2010-06-01 | 2011-10-05 | 钰创科技股份有限公司 | System and method for realizing multi-port storage media based on UASP protocol |
| CN103858091A (en)* | 2013-12-27 | 2014-06-11 | 华为技术有限公司 | Management method and equipment for storage equipment |
| CN104144171A (en)* | 2013-05-06 | 2014-11-12 | 中国科学院声学研究所 | A Realization Method of SCSI and SCSI Subsystem |
| CN106527989A (en)* | 2016-10-28 | 2017-03-22 | 郑州云海信息技术有限公司 | SCSI (Small Computer System Interface) command control method and system for storage system |
| TWI584195B (en)* | 2015-10-16 | 2017-05-21 | 廣達電腦股份有限公司 | Method for iscsi based bare metal os image deployment and diskless boot in a server system |
| CN110691094A (en)* | 2019-10-10 | 2020-01-14 | 山东超越数控电子股份有限公司 | Method, equipment and medium for transmitting data based on ISCSI protocol |
| CN119814770A (en)* | 2024-12-31 | 2025-04-11 | 苏州元脑智能科技有限公司 | A data transmission method, cloud platform, computer equipment and storage medium |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2003001792A1 (en)* | 2001-06-25 | 2003-01-03 | Narad Networks, Inc. | Delivering consumer entertainment services using virtual devices |
| JP4259036B2 (en)* | 2002-05-14 | 2009-04-30 | 株式会社日立製作所 | Network data caching method and system |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101132376B (en)* | 2007-09-28 | 2011-06-15 | 杭州华三通信技术有限公司 | Method, device and corresponding system for controlling iSCSI message transmitting and receiving |
| CN101188558B (en)* | 2007-12-07 | 2010-12-01 | 杭州华三通信技术有限公司 | Access control method, unit and network device |
| CN101471830B (en)* | 2007-12-25 | 2011-02-02 | 英业达股份有限公司 | Method of multi-path accessing remote logical device under Linux system |
| CN101651559B (en)* | 2009-07-13 | 2011-07-06 | 浪潮电子信息产业股份有限公司 | A method for failover of storage services in a dual-controller storage system |
| CN102014528A (en)* | 2010-04-28 | 2011-04-13 | 华为终端有限公司 | Wireless internet equipment, system and method |
| CN102014528B (en)* | 2010-04-28 | 2012-04-18 | 华为终端有限公司 | A wireless Internet access device, system and method |
| US9420636B2 (en) | 2010-04-28 | 2016-08-16 | Huawei Technologies Co., Ltd. | Mobile network device using a wireless SD card that uses SCSI to SD command conversion |
| CN102207921B (en)* | 2010-06-01 | 2015-11-25 | 钰创科技股份有限公司 | System and method for realizing multi-port storage media based on UASP protocol |
| CN102207921A (en)* | 2010-06-01 | 2011-10-05 | 钰创科技股份有限公司 | System and method for realizing multi-port storage media based on UASP protocol |
| CN104144171A (en)* | 2013-05-06 | 2014-11-12 | 中国科学院声学研究所 | A Realization Method of SCSI and SCSI Subsystem |
| CN104144171B (en)* | 2013-05-06 | 2017-11-21 | 中国科学院声学研究所 | SCSI and iSCSI subsystems a kind of implementation method |
| CN103858091A (en)* | 2013-12-27 | 2014-06-11 | 华为技术有限公司 | Management method and equipment for storage equipment |
| CN103858091B (en)* | 2013-12-27 | 2017-03-29 | 华为技术有限公司 | A kind of management method and equipment of storage device |
| TWI584195B (en)* | 2015-10-16 | 2017-05-21 | 廣達電腦股份有限公司 | Method for iscsi based bare metal os image deployment and diskless boot in a server system |
| CN106527989A (en)* | 2016-10-28 | 2017-03-22 | 郑州云海信息技术有限公司 | SCSI (Small Computer System Interface) command control method and system for storage system |
| CN110691094A (en)* | 2019-10-10 | 2020-01-14 | 山东超越数控电子股份有限公司 | Method, equipment and medium for transmitting data based on ISCSI protocol |
| CN119814770A (en)* | 2024-12-31 | 2025-04-11 | 苏州元脑智能科技有限公司 | A data transmission method, cloud platform, computer equipment and storage medium |
| Publication number | Publication date |
|---|---|
| CN100452795C (en) | 2009-01-14 |
| Publication | Publication Date | Title |
|---|---|---|
| CN1212574C (en) | End node partitioning using local identifiers | |
| US8010707B2 (en) | System and method for network interfacing | |
| US8291148B1 (en) | Resource virtualization switch | |
| US7934021B2 (en) | System and method for network interfacing | |
| CN100544310C (en) | Method, system and program for managing memory for data transmission over a network | |
| CN104636076B (en) | A kind of distributed block device drives method and system for cloud storage | |
| US20080126578A1 (en) | Method, system, and program for managing data read operations | |
| US9813283B2 (en) | Efficient data transfer between servers and remote peripherals | |
| US8793432B2 (en) | Consistent distributed storage communication protocol semantics in a clustered storage system | |
| CN1647054A (en) | Network Device Driver Architecture | |
| CN1599319A (en) | Method, system, and program for managing data transmission through a network | |
| EP1665662A1 (en) | Method, system, and article of manufacture for utilizing host memory from an offload adapter | |
| CN1642170A (en) | Method of Accessing Logical Devices Using iSCSI Protocol | |
| CN101059791A (en) | Virtual universal serial bus device system and its data transmission method | |
| US12197359B2 (en) | Memory registration for optimizing RDMA performance in hyperconverged computing environments | |
| US20050246443A1 (en) | Management of offload operations in a network storage driver | |
| EP1460805B1 (en) | System and method for network interfacing | |
| CN1949203A (en) | Architecture of interface target machine for miniature computer system and data transmitting method | |
| CN114911411A (en) | Data storage method and device and network equipment | |
| CN101212490A (en) | storage device controller | |
| US20070156974A1 (en) | Managing internet small computer systems interface communications | |
| CN102868684A (en) | Fiber channel target and realizing method thereof | |
| CN110471627B (en) | Method, system and device for sharing storage | |
| WO2024245069A1 (en) | Cloud storage processing method, and device, storage medium and system | |
| CN100502337C (en) | A System Realizing Real-time Backup of Data in Digital Home Network |
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| C14 | Grant of patent or utility model | ||
| GR01 | Patent grant | ||
| C17 | Cessation of patent right | ||
| CF01 | Termination of patent right due to non-payment of annual fee | Granted publication date:20090114 Termination date:20110116 |