Background technology
RAID (Redundant Access Independent Disks, raid-array) technology is widely used in the data storage as a kind of proven technique.The RAID technology has seven kinds of basic RAID ranks from RAID0 to 6, and different RAID ranks are being represented different memory properties, data security and carrying cost.Wherein RAID4 grows up on the basis of RAID3.As shown in Figure 1; in the RAID4 pattern; the dish battle array comprises the disk (abbreviation data disks) of N storage data and the disk (abbreviation check disk) that is exclusively used in store parity information; it is based on band (Data striping); after the file data piecemeal, write in the data disks; to in other data disks with this data block same disc in all data blocks of position calculate their parity values (xor operation is finished); message block of forming by parity values of final formation; and it is write check disk, this is called as data protection (Data guarding).Its benefit has provided fault-tolerant ability, and promptly any one breaks down in this N+1 disk, can not cause the problem of obliterated data.Because the symmetry of parity checking can calculate the correct data content that leaves in the failed disk, although this calculating is more time-consuming with the content of N remaining disk.
With respect to the mechanical disk technology, solid-state storage is a kind of file layout that adopts semi-conductor chip as data storage medium and reading mechanism fully, abandoned the defective of disk physics and mechanical property, it has high IOPS (Input/Output Operations Per Second, be the number of times that per second carries out read-write operation) and the feature of low-power consumption, the IOPS of typical solid state hard disc (SSD) can reach more than 20 times of mechanical hard disk.Therefore adopt the check disk of SSD, can significantly improve the responding ability of RAID4 system and reduce system power dissipation as the RAID4 system.Existing employing SSD as the RAID4 system of check disk as shown in Figure 2, it comprises RAID controller 203 and dish battle array, the dish battle array comprises disk array 204 and SSD 205 who is used as check disk that N data disks (N for more than or equal to 2 positive integer) constitutes.Host side is a server 201,202, it supports optical-fibre channel 206 and iSCSI (Internet Small Computer System Interface simultaneously, Internet Small Computer Systems Interface) passage 207, and is connected with RAID controller 203 by two passages, RAID controller 203 gust is connected with coiling.The flow process of this system's read data is: the RAID controller splits according to band the address space of reading of read request, reads each strip data from the data disks of correspondence, afterwards these strip data is buffered in the RAID controller, is sent to host side again.The flow process of this system's write data is: strip data and the checking data in the check disk earlier the needs in the data disks write read into buffer memory in the RAID controller, thereby and to they carry out backwards calculation obtain in other data disks with this strip data same disc in the position all data verification and, this verification and carry out xor operation with new strip data again, the calculating checking data that makes new advances, then new strip data is written to the corresponding data dish, new checking data is written to check disk.Therefore, write operation need carry out check disk read and write each once, i.e. twice IO operation.
This shows, adopt SSD still to exist as the check disk bottleneck problem of the RAID4 system of check disk, reason is, simply SSD is replaced traditional mechanical hard disk, do not change its IO read-write mode, any one data disks generation write operation all needs to upgrade check disk, even the read or write speed of SSD is fast than mechanical hard disk, but the responding ability that big data quantity upgrades the functional check dish has still been determined the IO responding ability of total system.
Summary of the invention
The object of the present invention is to provide a kind of RAID4 system and data read-write method thereof with New type of S SD of simplification IO operating function as check disk, the IO operand of check disk when this system reads and writes data by significantly reducing, effectively eliminate the read-write bottleneck of check disk, and then improve the performance of system.
RAID4 provided by the invention system, comprise RAID controller and dish battle array, the dish battle array comprises disk array and the SSD as check disk that is made of a plurality of data disks, the RAID controller is connected with the dish battle array, it is characterized in that, the RAID controller is by the data interaction between self-defining interface command realization of SSD and the SSD, in the controller of SSD, set up cache module and XOR module, cache module is used to store the data that the RAID controller writes SSD, the XOR module replaces the checksum update module in the controller, realize the computing function of check information, to realize data write.
System provided by the present invention adopts SSD as check disk, the checksum update module in traditional RAID controller is changed to be put among the SSD realize, makes this SSD have the IO of simplification operating function.Compare system provided by the present invention with traditional SSD as the RAID4 system of check disk, reduced between RAID controller and the check disk because of upgrading the IO operand that checking data produces.Thereby the present invention has the following advantages:
1. owing to adopt SSD, significantly improved the responding ability of RAID4 system, reduced system power dissipation simultaneously as check disk;
2. owing to adopt SSD, significantly reduced the IO operand of check disk when reading and writing data as check disk with simplification IO operating function; 3. owing to adopt SSD, effectively eliminated the read-write bottleneck of check disk as check disk with simplification IO operating function;
3. owing to adopt SSD, improved the performance of system greatly as check disk with simplification IO operating function;
4. owing to adopt the SSD with simplification IO operating function as check disk, the checksum update module realizes in SSD, greatly reduces the design difficulty and the cost of RAID controller.
Embodiment
Below in conjunction with the accompanying drawing in the invention process example, the technical scheme in the example of the present invention is carried out clear, complete description, embodiment described herein is a part of example of the present invention, rather than whole embodiment.Based on embodiments of the invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that is obtained under the creative work prerequisite.
RAID4 system provided by the invention (also being referred to as RAID 4+ system) as shown in Figure 3, and is the same with existing RAID4 system, includes RAID controller 303 and dish battle array, and the dish battle array comprises disk array 304 and the SSD 305 as check disk.Host side server 301,302 is connected with RAID controller 303 with iSCSI passage 307 by optical-fibre channel 306.Because the needs of RAID4+ system are different as check disk with the common SSD of prior art, that the present invention adopts is a kind of improved SSD, and this SSD has the IO of simplification operating function.As shown in Figure 4, improved SSD is that the controller at the SSD of existing structure has partly added two functional modules: cache module (Data Buffer) 4093, with XOR module 4091, wherein cache module 4093 is except as the data buffering, the life problems of writing owing to SSD, usability is buffer memory hardware and the more excellent strategy of writing preferably, can reduce the flash media of SSD write number of times (at main frame to identical address repeatedly during write operation, can in buffer memory, finally be merged into one and operate and send to flash media), thus delay life-span of writing of SSD.In addition, XOR module 4091 is to change in the field programmable gate array in SSD and realizing originally being arranged on checksum update module in the RAID controller, handle handling to change in the SSD controller at the data XOR that this layer of RAID controller carries out originally, the benefit of doing like this is to reduce between RAID controller and the SSD because of upgrading the IO operand that checking data produces, to improve the entire system performance.Because in the RAID controller during calculation check, original check information need read back earlier, and with the data computation that newly is written to data disks to generate new check information, therefore calculation check can be avoided unnecessary data transmission action in check disk, the maximum capacity of performance IO interface, thus the entire system performance improved.
Improved SSD provided by the invention has realized one group of self-defining interface command, and the RAID controller calls the relevant function of verification calculating by using this to organize self-defining interface command.This organizes self-defining interface command and comprises: " XOR is write " etc., finish by the XOR module of SSD.When carrying out write operation, the RAID controller uses " XOR is write " order with the former strip data in the data disks and the disposable SSD of the writing cache module of new strip data that need write data disks, carries out verification by the XOR module of SSD and calculates.
Below, the reading/writing method of setting forth system of the present invention.
The read operation method of RAID4+ of the present invention system is consistent with traditional RAID4 system, as shown in Figure 5, is example with SCSI (Small Computer System Interface, small computer system interface) agreement, and read operation may further comprise the steps:
Step 501, the RAID controller is received the read request from server, and response;
Step 502 splits according to band the address space of reading of this command request, and these bands that belong to same read request are with queue management;
Step 503, the processing threads of RAID controller are the read command of communicating by letter between destination disk of each banded structure and the RAID controller buffer module, and order is sent to corresponding data disks;
Step 504, RAID controller are read each strip data from the data disks of correspondence, afterwards these strip data are buffered in the RAID controller;
Step 505 is transmitted data in buffer in the RAID controller to host side.
As shown in Figure 6, the write operation of RAID4+ system may further comprise the steps:
Step 601, the RAID controller is received the write request from server, and response;
Step 602 splits according to band the write address space of this command request, and these bands that belong to same write order are with queue management.
Step 603, the RAID controller calculates its target data dish for each band, and the pairing check information of target writing position of each band is in the position of check disk.
Step 604, the RAID controller reads in buffer memory in the RAID controller with original strip data, calls the custom command of SSD afterwards: " XOR is write " writes original strip data 1 and the new strip data 1 ' that need write the cache module of SSD simultaneously.
Step 605, the XOR module is carried out XOR in SSD
(the wherein original checking data in data P position) obtains new checking data band P ';
Step 606 writes relevant position as the SSD of check disk with verification data strip band P ', simultaneously strip data 1 ' is write in the corresponding data disks.
By above write operation method as can be known, a write operation of RAID4+ system has only carried out the IO operation of a check disk, compares with RAID4 of the prior art system, has significantly reduced the IO operand of check disk when reading and writing data.
In typical R AID system, in the calculation check data, two kinds of situations are arranged; A kind of is target data and the check disk data computation that will revise with write operation, and another kind is that the data of other data disks of the band at the target data place that will revise with write operation are directly calculated.According to the implementation strategy difference of RAID system, write operation general step of the present invention is divided into two kinds of situations.
The step of situation 1 is:
Step 1: read in target data and buffer memory that write operation will be revised.
Step 2: the target data that write operation will be revised and the data of write operation are delivered in the solid state hard disc as check disk, and corresponding order is " XOR is write ".
Step 3: the data of write operation are delivered to the target data dish.
The step of situation 2 is:
Step 1: the data of other data disks of reading in the band at the target data place that write operation will revise.
Step 2: other data of the band at the target data place that write operation will be revised and the data of write operation are delivered in the solid state hard disc as check disk, and corresponding order is " XOR is write ".
Step 3: the data of write operation are delivered to the target data dish.
The present invention not only is confined to above-mentioned embodiment; persons skilled in the art are according to content disclosed by the invention; can adopt other multiple embodiment to implement the present invention; therefore; every employing project organization of the present invention and thinking; do some simple designs that change or change, all fall into the scope of protection of the invention.