Array card control method
Technical field
The invention relates to a kind of array card control method, and the array card control method of the device that is particularly connected with second interface on the array of controls card relevant for a kind of reception first interface instruction.
Background technology
In the system of Linux, normally come each device on the slim calculator system interface RAID card is controlled by slim calculator system interface type driver (SCSI generic driver).Yet, because the difference of RAID card manufacturer makes RAID card may see through different drivers and controls.Therefore, the application software that designs at slim calculator system interface type driver in the linux system, and the use of the RAID card of other driver of can't arranging in pairs or groups, and must redesign to support different drivers.Above-mentioned mode will be a process consuming time and effort, to stressing the scientific and technological industry of efficient, be quite disadvantageous.
Therefore, how designing a new array card control method, different drivers can be integrated with the default driver of supporting in the linux system, is the industry problem demanding prompt solution.
Summary of the invention
Therefore the object of the present invention is to provide a kind of array card control method, different drivers can be integrated with the default driver of supporting in the linux system.
To achieve these goals, the invention provides a kind of array card control method, wherein RAID card is in order to receiving at least one device that at least one first interface instruction is connected with second interface on the array of controls card, and array card control method comprises the following step: detect at least one device that is connected on second interface; Set up at least one first interface virtual bench, respectively corresponding at least one device; Set up the first interface instruction formation; Phase checks that whether the first interface instruction formation receives to few one first interface instruction from main frame week about, and when the first interface instruction formation receives first interface instruction, translating first interface instruction is at least one second interface instruction; According to the second interface instruction control device; Device transmits a device information respectively to the first corresponding interface virtual bench; And the device information of at least one first interface virtual bench passback correspondence is to main frame.
The invention has the advantages that to utilize and set up virtual bench, after conversion first interface instruction is second interface instruction, the device on second interface is carried out the control of essence, and reach above-mentioned purpose easily to receive first interface instruction from main frame.
Behind the embodiment of consulting accompanying drawing and describing subsequently, this technical field has knows that usually the knowledgeable just can understand purpose of the present invention, and technological means of the present invention and embodiment.
Description of drawings
For above and other objects of the present invention, feature, advantage and embodiment can be become apparent, being described in detail as follows of appended accompanying drawing:
Fig. 1 is the synoptic diagram of an array card system of setting up according to the array card control method of the first embodiment of the present invention; And
Fig. 2 is a process flow diagram of the array card control method of the first embodiment of the present invention.
[primary clustering symbol description]
1: RAID card system 10: RAID card
101: the first interface instructions of interface instruction formation in 100: the first
102,104,103: the second interface instructions of 106: the first interface virtual benchs
12,14,16: device 108: translation module
18: main frame 121,141,161: device information
Embodiment
Please refer to Fig. 1, be the synoptic diagram of an array card system 1 of setting up according to the array card control method of the first embodiment of the present invention.RAID card system 1 comprises RAID card 10 and three devices 12,14,16.RAID card 10 is in order to receive the device 12,14,16 that first interface instruction 101 is connected with RAID card 10 by second interface (not illustrating) on the RAID card 10 with control from a main frame 18.First interface and second interface are the slim calculator system interface of two inequalities in one embodiment.Among one embodiment, application program in the main frame 18 in fact only provides first interface instruction 101, yet because the form of first interface instruction 101 is to be 12,14,16 identifications of the device on second interface, can't directly control, therefore need provide a new mechanism so that first interface instruction 101 can be controlled installing 12,14,16 indirectly to the device on second interface 12,14,16.After RAID card 10 passes through second interface and device 12,14,16 is connected, RAID card 10 will be set up the first interface virtual bench 102,104,106 of corresponding intrument 12,14,16, and set up one first interface instruction formation 100.The first interface instruction formation 100 is in order to receive first interface instruction 101 from main frame 18.RAID card 10 will be carried out first interface instruction 101 in the mode of poll, anticipate promptly the phase week about, and RAID card 10 will check whether received first interface instruction 101 in the first interface instruction formation 100.Among one embodiment, RAID card 10 is to judge by a quene state parameter, and when the first interface instruction formation 100 does not receive any first interface instruction 101, then the quene state parameter setting is non-busy condition, and RAID card 10 will be left intact.If the first interface instruction formation 100 has received at least one first interface instruction 101, then the quene state parameter will be set at busy condition, RAID card 10 will take out all first interface instructions 101 in the first interface instruction formation 100, and further make first interface instruction 101 translate to second interface instruction 103 by translation module 108.RAID card 10 further transmits the device 12,14,16 of second interface instruction 103 to correspondence, to carry out access according to second interface instruction, 103 control device 12,14,16.After device 12,14,16 is finished the indicated control action of second interface instruction 103, with the first interface virtual bench 102,104,106 of difference conveyer information 121,141,161 to correspondence, after the first interface virtual bench 102,104,106 receives, device information 121,141,161 is back to an application program of main frame 18 again, so that main frame 18 learns that control action is finished.
Fig. 2 is a process flow diagram of the array card control method of the first embodiment of the present invention.Array card control method is in order to receive at least one device that at least one first interface instruction is connected with second interface on the array of controls card, the RAID card interface control method comprises the following step: in step 201, detect at least one device that is connected on second interface; In step 202, set up at least one first interface virtual bench, respectively corresponding at least one device; In step 203, set up the first interface instruction formation; In step 204, the phase checks that whether the first interface instruction formation receives to few one first interface instruction from main frame week about, and when the first interface instruction formation receives first interface instruction, translating first interface instruction is at least one second interface instruction; In step 205, according to the second interface instruction control device; In step 206, device transmits a device information respectively to the first corresponding interface virtual bench; And in step 207, first interface virtual bench passback device information is to main frame.
The invention has the advantages that to utilize and set up virtual bench, after conversion first interface instruction is second interface instruction, the device on second interface is carried out the control of essence to receive first interface instruction from main frame.
Though the present invention discloses as above with a preferred embodiment; right its is not in order to limit the present invention; any person skilled in the art; without departing from the spirit and scope of the present invention; when can being used for a variety of modifications and variations, so protection scope of the present invention is when being as the criterion with the scope that claims were defined.