Summary of the invention
The purpose of the embodiment of the invention is to provide a kind of method, solid state hard disc and electronic equipment of realizing Redundant Array of Independent Disks (RAID) RAID, can guarantee data reliability again under the lower-cost prerequisite of Redundant Array of Independent Disks (RAID) RAID that makes up.
For achieving the above object, the embodiment of the invention provides following technical scheme:
A kind of method that realizes Redundant Array of Independent Disks (RAID) RAID comprises:
The solid state hard disc internal separation is at least two storage areas, comprises at least two sub regions in each storage area;
In described storage area, make up Redundant Array of Independent Disks (RAID) RAID respectively;
According to the rank and the preset parameters of the Redundant Array of Independent Disks (RAID) that makes up in the described storage area, from the subregion of forming storage area, determine subregion as the storage redundancy data.
A kind of solid state hard disc comprises:
Memory controller and storage medium, memory controller is connected with storage medium, and described storage medium comprises:
At least two storage areas, comprise at least two sub regions in each storage area, each storage area is built into Redundant Array of Independent Disks (RAID) respectively, wherein, comprise in the subregion of each storage area: the rank of the Redundant Array of Independent Disks (RAID) that makes up according to described storage area and the subregion that is used for the storage redundancy data that preset parameters is determined.
A kind of electronic equipment comprises central processor CPU and above-mentioned solid state hard disc, and solid state hard disc is connected with central processor CPU, and solid state hard disc is used to store data, and central processor CPU is used for the data that solid state hard disc is stored are handled.
By above-mentioned disclosed technical scheme as can be known, in the embodiment of the invention, mark off a plurality of storage areas in the inside of solid state hard disc, in each storage area, realize RAID level separately then, and be provided for the subregion of storage redundancy data in each storage area inside, and the subregion of these storage redundancy data can be adjusted flexibly according to default parameter and RAID rank, so the redundant data storage zone that is used for disaster-tolerant recovery in the embodiment of the invention may reside in the various piece of total system SSD inside, and provide in the prior art the storage unit of fixing whole SSD dish as redundant data, existence is to the excessive erasable phenomenon of same position, solved this problem in the embodiment of the invention, avoid excessively erasable with a part, improved the reliability of data, and the embodiment of the invention has just realized RAID in SSD dish inside, not needing increases the extra SSD dish that is specifically designed to the storage redundancy data, has therefore also just saved the cost of total system.
Embodiment
For the purpose, technical scheme and the advantage that make the embodiment of the invention clearer, below in conjunction with the accompanying drawing in the embodiment of the invention, technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present 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.
Below in conjunction with accompanying drawing the embodiment of the invention is described in detail.
Fig. 1 shows the process flow diagram of the method for the realization Redundant Array of Independent Disks (RAID) that the embodiment of the invention provides, and as shown in Figure 1, this method comprises:
Step S101: the solid state hard disc internal separation is become at least two storage areas, comprise at least two sub regions in each storage area again;
Step S102: in each storage area, make up Redundant Array of Independent Disks (RAID) RAID respectively;
Step S103: the rank and the preset parameters of the Redundant Array of Independent Disks (RAID) that makes up according to this storage area, from the subregion of forming storage area, determine subregion as the storage redundancy data.
Wherein, the difference according to the composition mode of array in the Redundant Array of Independent Disks (RAID) can be divided into RAID several ranks, for example RAID 0, RAID 1, RAID 0+1, RAID 3, RAID 5 etc.
Can utilize above-mentioned preset parameters to come to be used in the designated storage area position of subregion of storage redundancy data.
Can also comprise in the method that the embodiment of the invention provides in addition:
Step S104: after the data of the subregion in the described storage area lost efficacy, carry out corresponding RAID computing, recover fail data with the data of other subregion in the described storage area with as the redundant data in the subregion of storage redundancy data.
Embodiment of the invention method can be adjusted each sequence of steps according to actual needs.
According to the embodiment of the invention, can under the prerequisite of saving system cost, improve the reliability of data.
The embodiment of the invention is also corresponding to provide a kind of solid state hard disc, realizes RAID in this solid state hard disc, and this hard disk can comprise memory controller and storage medium, and memory controller is connected with storage medium, and the above-mentioned storage medium of stating comprises:
A plurality of storage areas, comprise a plurality of subregions in each storage area, each storage area is built into Redundant Array of Independent Disks (RAID) respectively, wherein, comprise in the subregion of described each storage area: the rank and the preset parameters of the Redundant Array of Independent Disks (RAID) that makes up according to this storage area, definite subregion that is used for the storage redundancy data.
Like this under the situation that does not increase extra SSD dish, the method that the embodiment of the invention provides has realized RAID in SSD dish inside, saved cost, and can be by the flexible subregion of selecting to be used for the storage redundancy data of the rank of preset parameters and RAID, so not can as in the prior art to inner too much erasable with a part of fixing SSD dish, thereby improve the reliability of data.Further, because it is relatively independent to make up RAID in each storage area, makes the user can be chosen in different storage areas according to demand and make up RAID level redundancy with failover capabilities scheme, so dirigibility is also very big.
In different embodiments of the invention, according to the difference of above-mentioned division storage area mode, realize that the mode of RAID is also different, below in conjunction with these different modes, the embodiment of the invention is described in detail.
Embodiment one
Before introducing present embodiment, at first introduce the institutional framework in the SSD dish.The SSD dish comprises a plurality of Flash unit, wherein the Flash unit transverse is divided into each ROW, can be designated as ROW 1, ROW2, ROW 3......ROW N, vertically be divided into each Flash passage (Flash Channel), can be designated as FC 1, FC 2, FC 3......FC M.Wherein, ROW is the unit that Flash carries out data organizational structure's management, comprises a plurality of Flash unit in each ROW, respectively corresponding each Flash passage, and a certain amount of data of Flash are formed the unit of a software inhouse management data in each ROW.The Flash passage is that Flash controller and Flash unit carry out mutual passage.The Flash control chip is that unit manages control to the Flash unit with the Flash passage, comprises a plurality of Flash unit on every Flash passage, respectively corresponding each ROW.
The SSD dish that utilizes that Fig. 2 shows present embodiment to be provided is realized the synoptic diagram of Redundant Array of Independent Disks (RAID), as shown in Figure 2, divides storage area according to Flash passage in the SSD dish in the present embodiment, and make up RAID respectively in each Flash passage.The Flash unit of each ROW correspondence is as the subregion in the storage area in each Flash passage.Wherein, the rank of the RAID that makes up according to each Flash passage, the Flash unit that is used for the storage redundancy data of different numbers is set, these Flash unit that are used for the storage redundancy data can be selected the unit by original Flash in the Flash passage, also can increase several Flash unit in addition in corresponding Flash passage.Among Fig. 2 especially, is example with extra increase Flash unit as the Flash unit of storage redundancy data in the Flash passage, the user can make up the RAID of different stage as required in different Flash passages, for example, as shown in Figure 2, in FC 0, the Flash unit of two storage redundancy data is set, and the Flash unit of storage redundancy data is set in other the Flash passage.
Be that example illustrates the process that interior read-write of above-mentioned SSD dish and data are recovered with one of them Flash passage below.The synoptic diagram of reading and writing data in Fig. 3 shows in the Flash passage, be example with Flash passage FC0 among Fig. 3, when certain Flash unit of each FC inside read-write operation, rank according to RAID, utilize the RAID computing to obtain comprising the redundant data of proof test value, described redundant data is deposited in the Flash unit that is used for the storage redundancy data (being designated as Flash0 among the figure) of this FC inside.Fig. 4 shows the synoptic diagram of restore data in the Flash passage, when SSD coils an interior Flash unit generation data failure phenomenon, perhaps the ECC that can not correct (Error Checking and Correcting has taken place in reading of data, bug check and correction) time, can utilize data in the Flash unit remaining among the FC0 and the redundant data that is used for the Flash unit of storage redundancy data this moment, carry out corresponding RAID computing, recover inefficacy Flash data, reach the application purpose of the storage system of fault-tolerant recovery and high reliability.
Each unit of the embodiment of the invention can be integrated in one, and also can separate deployment.Said units can be merged into a unit, also can further split into a plurality of subelements.
According to present embodiment, can under the prerequisite that reduces the RAID system cost, guarantee the reliability of data.
Embodiment two
The SSD dish that utilizes that Fig. 5 shows present embodiment to be provided is realized the synoptic diagram of Redundant Array of Independent Disks (RAID), as shown in Figure 5, divides storage area according to the ROW in the SSD dish in the present embodiment, and make up RAID respectively in each ROW.The Flash unit of each Flash passage correspondence in each ROW is as the subregion of storage area.Wherein, the rank of the RAID that makes up according to each ROW, the Flash unit that is used for the storage redundancy data of different numbers is set, these Flash unit that are used for the storage redundancy data can be selected the unit by original Flash in ROW, also can increase a Flash unit in addition in corresponding ROW.Fig. 5 especially, is example with extra increase Flash unit as the Flash unit of ROW stored redundant data, the user can make up the RAID of different stage as required in different ROW, as shown in Figure 5, a Flash unit that is used for the storage redundancy data is set in ROW0, and two Flash unit that are used for the storage redundancy data are set in other the ROW.
Be that example illustrates the process that interior read-write of above-mentioned SSD dish and data are recovered with one of them ROW below.Fig. 6 shows the synoptic diagram of reading and writing data in the ROW, ROW0 is an example among Fig. 6, when certain Flash unit of each ROW inside read-write operation, rank according to RAID, utilize the RAID computing to obtain comprising the redundant data of proof test value, described redundant data is deposited in the Flash unit that is used for the storage redundancy data of this ROW inside.Fig. 7 shows the synoptic diagram of restore data in the ROW, when SSD coils an interior Flash unit generation data failure phenomenon, perhaps the ECC that can not correct (Error Checking and Correcting has taken place in reading of data, bug check and correction) time, can utilize data in the Flash unit remaining among the FC0 and the redundant data that is used for the Flash unit of storage redundancy data this moment, carry out corresponding RAID computing, recover inefficacy Flash data, reach the application purpose of the storage system of fault-tolerant recovery and high reliability.
Each unit of the embodiment of the invention can be integrated in one, and also can separate deployment.Said units can be merged into a unit, also can further split into a plurality of subelements.
According to present embodiment, can under the prerequisite that reduces the RAID system cost, guarantee the reliability of data.
Need to prove that among above-mentioned two embodiment, subregion is all distinguished corresponding Flash unit, those skilled in the art should be understood that subregion also can be a piece (Sector) in the Flash unit.
Embodiment three
The difference of present embodiment and preceding several embodiment is: do not adopt in the SSD dish original institutional framework to divide storage area, but be that unit divides storage area with the set of any storage unit, and make up RAID on this storage area.The storage area of Hua Fening is a logical organization in an embodiment, can comprise the part among different ROW or the different FC in each storage area, also can comprise the part in the different Flash unit, storage area to each delimitation can make up RAID separately, this shows scheme that present embodiment provides realize aspect the RAID more flexible.Can divide above-mentioned storage area by software in the middle of actual.Among the process that reading and writing data and data are recovered in the present embodiment and the embodiment one with embodiment two in correlation method similar, repeat no more here.
Each unit of the embodiment of the invention can be integrated in one, and also can separate deployment.Said units can be merged into a unit, also can further split into a plurality of subelements.
Embodiment four
Present embodiment four provides a kind of electronic equipment, as shown in Figure 8, this electronic equipment 800 comprises solid state hard disc 801 and central processor CPU 802, solid state hard disc 801 is connected with central processor CPU 802, solid state hard disc 801 is used to store data, and central processor CPU 802 is used for the data of solid state hard disc 801 storages are handled.
Wherein comprise in the solid state hard disc 801: a plurality of storage areas, comprise a plurality of subregions in each storage area, each storage area is built into Redundant Array of Independent Disks (RAID) respectively, wherein, comprise in the subregion of described each storage area: the rank and the preset parameters of the Redundant Array of Independent Disks (RAID) that makes up according to this storage area, definite subregion that is used for the storage redundancy data.
In actual applications, the type of electronic device in the present embodiment can comprise: computing machine or server or router or switch or base station or base station controller or digital subscriber line access multiplex or attaching position register or mobile phone or personal digital assistant or set-top box.
In the electronic equipment that present embodiment provides under the situation that does not increase extra SSD dish, the method that the embodiment of the invention provides has realized RAID in SSD dish inside, saved cost, and can be by the flexible subregion of selecting to be used for the storage redundancy data of the rank of preset parameters and RAID, so not can as in the prior art to inner too much erasable with a part of fixing SSD dish, thereby improve the reliability of data.Further, because it is relatively independent to make up RAID in each storage area, makes the user can be chosen in different storage areas according to demand and make up RAID level redundancy with failover capabilities scheme, so dirigibility is also very big.
In sum, can reduce under the prerequisite that makes up the RAID system cost, guarantee the reliability of data by the embodiment of the invention.
Those of ordinary skills can recognize, the unit and the algorithm steps of each example of describing in conjunction with embodiment disclosed herein, can realize with electronic hardware, computer software or the combination of the two, for the interchangeability of hardware and software clearly is described, the composition and the step of each example described prevailingly according to function in the above description.These functions still are that software mode is carried out with hardware actually, depend on the application-specific and the design constraint of technical scheme.The professional and technical personnel can use distinct methods to realize described function to each specific should being used for, but this realization should not thought and exceeds scope of the present invention.
The method of describing in conjunction with embodiment disclosed herein or the step of algorithm can use the software module of hardware, processor execution, and perhaps the combination of the two is implemented.Software module can place the storage medium of any other form known in random access memory (RAM), internal memory, ROM (read-only memory) (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or the technical field.
The above only is a preferred implementation of the present invention; should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the principle of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.