The method of the accessing remote logic equipment through multiple routes under the linux systemTechnical field
The present invention relates to a kind of method of visiting remote logic equipment, and be particularly related to the method for the accessing remote logic equipment through multiple routes under a kind of linux system.
Background technology
Store LAN (Storage Area Network, SAN) indication is for passing through internet small computer system interface (internet Small Computer Systems Interface, iSCSI) communication protocol standard, the technology of the virtual large-scale storage facilities that the storage facilities of a plurality of dispersions on the internet is connected to.The user stores LAN by one, and (Storage Area Network, the data on SAN) the access remote logic disk are just as the hard disk unit of access local side.Compared to existing RAID technology, the storage LAN of using iscsi technology to set up has small computer system interface (Small Computer Interface, high-speed transfer characteristic SCSI), and the high extendibility that is better than existing storage facilities concurrently.Therefore, store LAN and become the relevant hot technology of information storage gradually.Store LAN, it comprises originating end (Initiator) and destination end (Target) two parts.So-called originating end (initiator) can be considered requirement provides access service person, and destination end to can be considered be the supplier of storage device.Destination end produces a plurality of LUN, and (Logic UnitNumber, LUN), these LUN correspond to the entity storage device on the network respectively.After originating end and destination end foundation dialogue (Session), obtain these LUN immediately, and distributed to the user.The user looks for LUN, and by the aforesaid entity storage device of iSCSI command instruction access.Generally speaking, only can set up a dialogue between originating end and the destination end.If allow between originating end and destination end, to set up multi-path read-write (Multi-Path Input/Output), can reach the effect of fault-tolerant redundant and load balance.
Generally speaking, the server of (SuSE) Linux OS is all stable compared to Windows operating system in execution efficient and stability.Service server adopts the (SuSE) Linux OS meaning can bring the stability of a system of high gauge.In addition, these service servers then can improve the reliability of system availability and data if can support the multi-path read-write and avoid data to repeat.Yet under (SuSE) Linux OS, the part originating end and the destination end that store LAN can't be supported the multi-path read-write at all; In addition, though the originating end of part and destination end provide the multi-path read-write, yet when asking the different LUN of visit, find that the data content of institute's access is identical.Like that, how to allow the storage LAN under the linux system environment support the multipath visit, and avoid occurring two logical device that content is identical, become the important information subject under discussion that stores in the LAN field then.
Summary of the invention
In above-mentioned linux system environment, do not support accessing remote logic equipment through multiple routes, or (Logic Unit Number LUN), but obtains problems such as same data content to visit different logic device number.The objective of the invention is to propose a kind of method that is used for the accessing remote logic equipment through multiple routes under the linux system, by the on-line equipment of finding out access same logical units in all online main frames number, and these on-line equipment groups are turned to a unique reflection equipment, to allow each reflection equipment all be mapped to different LUN, to solve the problem of aforementioned access to same data content.
When realizing above-mentioned support accessing remote logic equipment through multiple routes (Logic Device), and (Logic Unit Number, LUN), but discovery obtains the phenomenon of identical data content to avoid visiting different logic device number.The method of the accessing remote logic equipment through multiple routes under the linux system of the present invention is as follows: at first, between originating end and destination end, set up communicate by letter online.Then, originating end requires to set up at least one on-line dialogue with destination end.Afterwards, originating end (initiator) is obtained the online main frame of at least one iSCSI that is distributed by destination end (target).Then, originating end is repaid LUN order (report LUN command) first by transmitting, and obtains the information of at least one on-line equipment of the online main frame of corresponding iSCSI.At last, originating end configuration device mapper, this device map device produces redundance unit information according to on-line equipment of obtaining and corresponding LUN, and the on-line equipment that these are redundant is mapped as unique reflection equipment (that is reflection device number, mapped LUN).What is called, redundant on-line equipment indication are the on-line equipment of a plurality of visit same logical units number.
According to preferred embodiment of the present invention, aforementioned communication is online, can be that the communication of being set up by TCP communication protocol or UDP communication protocol is online.The establishment step of on-line dialogue comprises: login Request Packet by iSCSI of originating end transmission earlier and give destination end; Judge whether to allow the access request of originating end transmission again according to information such as the safety certification of logining Request Packet parsing coating by iSCSI and cryptographic parameter by destination end; At last, destination end is logined the response package at passback iSCSI and is given originating end, and sets up described on-line dialogue.
According to preferred embodiment of the present invention, the information that iSCSI logins response package load (piggyback) comprises permission online-order and on line state.In addition, aforementioned repayment LUN order (report LUNcommand) is carried on the command description block (Command Description Block) in the iSCSI package.
According to preferred embodiment of the present invention, when wherein on-line dialogue generation flow congestion, aforesaid device map device is carried out network shunting means, and partial discharge is switched with another equipment equally loaded of videoing; In addition, when these on-line dialogues interrupt, then switch with another reflection equipment transmission data package by the device map device.
From the above mentioned, the present invention is after setting up on-line dialogue, and destination end is by transmitting the on-line equipment information that the order of repayment LUN obtains the online main frame of iSCSI.Then originating end again those on-line equipments that will correspond to same logical units number of the device map device by configuration be mapped as unique reflection equipment, to avoid visiting different on-line equipments, but connect to the thing of same logical units access identical data.
Describe the present invention below in conjunction with the drawings and specific embodiments, but not as a limitation of the invention.
Description of drawings
Fig. 1 is the method flow diagram of the accessing remote logic equipment through multiple routes under the linux system of preferred embodiment of the present invention;
Fig. 2 A is the iSCSI package form schematic diagram of preferred embodiment of the present invention;
Fig. 2 B comprises the field schematic diagram for the iSCSI data cell of Fig. 2 A;
Fig. 3 is the real system architecture schematic diagram of making accessing remote logic equipment through multiple routes in the preferred embodiment of the present invention.
Wherein, Reference numeral
210 network package
220 Etherloop header file
230 IP data cells
240 tcp data unit
250 iSCSI data cells
252 iSCSI header files
254 iSCSI control commands
256 data contents
310 originating ends
320 destination end
330 device map devices
312,314 online main frames
312a, 312b, 314a, 314b on-line equipment
322,324 LUN
332,334 reflection equipment
Embodiment
In following preferred embodiment, describing in detail of purpose of the present invention and proposition.Yet notion of the present invention also can be used for other scope.Following listed examples only is used to purpose of the present invention and manner of execution are described, is not in order to limit its scope.
Fig. 1 is the method flow diagram of the accessing remote logic equipment through multiple routes under the linux system of preferred embodiment of the present invention.Please refer to Fig. 1, in the present embodiment, the method for the accessing remote logic equipment through multiple routes under the linux system is in order to realize storing LAN (Storage Area Network, originating end SAN) and the visit of the multipath between the destination end.At first, originating end is set up communicate by letter online (step S110) with destination end.Then, originating end requires to set up at least one on-line dialogue (step S120) with destination end.Afterwards, originating end is obtained the online main frame of at least one iSCSI (step S130) that destination end is distributed.Then, originating end obtains the on-line equipment information (step S140) of the online main frame of corresponding iSCSI by transmitting the order of repayment LUN.At last, originating end configuration device projection instrument according to the LUN of on-line equipment and correspondence, produces redundance unit information, and the on-line equipment of redundancy is mapped as reflection equipment (step S150), that is form a unique reflection device number (mapped LUN).
Hold, it is as follows that originating end and destination end are set up the online step of communicate by letter: originating end transmits the iSCSI request of logining earlier to destination end.Destination end is logined Request Packet parsing safety certification and cryptographic parameter wherein according to this iSCSI again.After being judged as legal user, promptly allow the access request of originating end.At this moment, iSCSI of destination end passback logins the response package and gives originating end, to set up on-line dialogue.In this enforcement, described communication online for the communication of adopting TCP communication protocol to be set up online.Communicating by letter online can also be that UDP communication is online, does not limit its scope at this.
The information of the iSCSI package that originating end and destination end are transmitted (for example, iSCSI logins Request Packet or iSCSI logins response packet) load (Piggyback) also comprises information such as allowing online-order and on line state usually.When set up communication online after, originating end will be repaid the command description block (Command Description Block) that logical block command number (report LUNcommand) is carried on the iSCSI package.Fig. 2 A is the iSCSI package form schematic diagram of preferred embodiment of the present invention.Please refer to Fig. 2 A, the instruction that originating end will have repayment logical block command number is coated on the command description block, and is encapsulated as iSCSI data cell 250.By tcp data unit 240, IP data cell 230 and Etherloop header file 220 etc., be encapsulated as network package 210 layer by layer afterwards, give destination end by Internet transmission.Fig. 2 B comprises the field schematic diagram for the iSCSI data cell of Fig. 2 A.Please refer to Fig. 2 B, in iSCSI data cell 250, also comprise iSCSI header file 252, iSCSI control command 254 and data content 256.Aforesaid repayment logical block command number promptly is to write in iSCSI control command 254 fields, and all addressable LUN that target phase is noted down then are to be written into data content 256.
Fig. 3 is the real system architecture schematic diagram of making accessing remote logic equipment through multiple routes in the preferred embodiment of the present invention.Please refer to Fig. 3, originating end 310 is set up TCP with destination end 320 earlier and is communicated by letter online.Set up communication online after, reattempt with destination end 320 and set up many on-line dialogues (Session), originating end 310 transmits iSCSI and logins Request Packet (Login Request PDU) and give destination end, and it is online to require to set up many communications.And obtain and distribute online main frame 312,314 of iSCSI and corresponding LUN 322,324.Originating end also has the iSCSI package of repayment LUN order by transmission, obtain the on-line equipment information of the online main frame of corresponding SCSI, even be the information such as manufacturer, model of on-line equipment such as the speed of the kind of on-line equipment, storage data and space etc.For another obtaining online main frame 312 pairing on-line equipment 312a, 312b, and obtain online main frame 314 pairing on-line equipment 314a, 314b.Afterwards, originating end can dispose a device map device, and this device map device can be compared on-line equipment 312a, 312b, 314a, and the pairing LUN 322,324 of 314b, and finds out the on-line equipment that corresponds to same logical units number.For instance, on-line equipment 312a and the pairing LUN of on-line equipment 314a are LUN 322, and then on-line equipment 312a and on-line equipment 314a being considered as is redundance unit on the same group.In like manner, on-line equipment 312b and on-line equipment 314b then are considered as corresponding to the redundance unit on the same group of LUN 324.Device map device record is these redundance unit information down, and the on-line equipment that these are redundant is mapped as reflection equipment (that is reflection device number, mapped LUN).For example, on-line equipment 312a and on-line equipment 314a are made as reflection equipment 332, and on-line equipment 312b and on-line equipment 314b are made as reflection equipment 334.By Fig. 3, can find to visit two different reflection equipment (332,334), at last can on-line access to different LUN (Logic Unit Number), can avoid taking out identical data conditions and take place with different path access same logical units number.
Because each mapped device all comprises a plurality of on-line equipments, and can have access to the LUN of destination end by different on-line dialogues, characteristic can reach the purpose of network shunting thus.For instance, by reflection equipment 332, the different on-line dialogues that can be set up via the online main frame of difference (312,314) are visitedidentical LUN 322, and then are reached the purpose of network flow quantity shunting.In addition, when a certain on-line dialogue generation flow congestion, then carry out network shunting means, partial discharge is switched come the balancing flow load with another reflection equipment.When on-line dialogue interrupts, also can visit former LUN with another paths by all the other the redundant on-line equipments in the reflection equipment, and the transmission of duration data package, avoid online interruption.
Certainly; the present invention also can have other various embodiments; under the situation that does not deviate from spirit of the present invention and essence thereof; those of ordinary skill in the art work as can make various corresponding changes and distortion according to the present invention, but these corresponding changes and distortion all should belong to the protection range of the appended claim of the present invention.