CN104166601A - Storage data backup method and device - Google Patents

Storage data backup method and device Download PDF

Info

Publication number
CN104166601A
CN104166601A CN201410401367.4A CN201410401367A CN104166601A CN 104166601 A CN104166601 A CN 104166601A CN 201410401367 A CN201410401367 A CN 201410401367A CN 104166601 A CN104166601 A CN 104166601A
Authority
CN
China
Prior art keywords
block
head
data
write
raid array
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201410401367.4A
Other languages
Chinese (zh)
Other versions
CN104166601B (en
Inventor
余丽
许勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Uniview Technologies Co Ltd
Original Assignee
Zhejiang Uniview Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Uniview Technologies Co Ltd filed Critical Zhejiang Uniview Technologies Co Ltd
Priority to CN201410401367.4A priority Critical patent/CN104166601B/en
Publication of CN104166601A publication Critical patent/CN104166601A/en
Application granted granted Critical
Publication of CN104166601B publication Critical patent/CN104166601B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention provides a storage data backup method which is applied to an RAID array. The storage data backup method comprises the steps that a write cache is built for the target RAID array, wherein the write cache is enabled when the target RAID array loses efficacy; when the target RAID array loses efficacy, data written into the target RAID array are written into the write cache as a write IO instruction is executed, and the data are read from the write cache when a read IO instruction is executed; when the target RAID array returns to normal, the write cache is triggered automatically to write the written data back to the target RAID array, and is disabled when the process of writing back the written data is completed. The storage data backup method can reduce the hardware cost and the influence on the performance of services.

Description

A kind of backup method and device of storing data
Technical field
The present invention relates to field of storage, relate in particular to a kind of backup method and device of storing data.
Background technology
When RAID array lost efficacy, all logical resources on this array all can not be read and write, and will cause service disconnection.For example, in RAID5 array, there are 2 dishes not read and write, or in RAID0 array, have 1 dish not read and write, will cause RAID array to lose efficacy.Yet, in most of the cases, the hard disk that can not read and write, probably just hard disk connector goes wrong, or DEU frame SAS line is loosening, and disk itself does not have problem.Maintainer is by changing card extender or when fixedly SAS line recovers RAID array; conventionally can cause RAID array temporarily to lose efficacy; the in the situation that of the temporary transient inefficacy of RAID array, the business of paralysis period cannot provide, data cannot be preserved, thereby can cause serious loss of data.Such as in monitoring application, all monitoring videos of RAID array paralysis period all can be lost.
For addressing the above problem, current general use mirror image technology is dealt with the inefficacy of RAID array.Particularly, can, first to RAID Creating mirror image RAID array, also can create mirror image logical resource to logical resource.When to RAID array data writing, data are write to two parts independently on RAID array (or logical resource) simultaneously.If main RAID array lost efficacy, by work flow to mirror image RAID array.
Yet in such scheme, owing to must using RAID array or the logical resource of formed objects to create mirror image, hard drive space cost is double; When business is write data, need to write two parts simultaneously, in the situation that system business is busy, can affect business write performance, and can cause the system resource loads such as CPU double, thereby affect the performance that other read and write business.
Summary of the invention
In view of this, the present invention proposes a kind of backup method of storing data, is applied to RAID array, and described method comprises:
For target RAID Creating is write buffer memory; Wherein, described in, write to be buffered in when described target RAID array loses efficacy and enable;
When described target RAID array lost efficacy, described in when IO order is write in execution, the data that write described target RAID array being write, write buffer memory, when IO order is read in execution from described write buffer memory reading out data;
When described target RAID array recovers normal, described in automatically triggering, write buffer memory written data is written back to described target RAID array, and described in forbidding, write buffer memory when write-back completes.
Preferably, described method also comprises:
In described write-back process, if need to carry out, write IO order, this is write to data corresponding to IO order and write described target RAID array;
In described write-back process, if need carried out, read IO order, according to data message to be read, from described, write reading out data buffer memory or from described target RAID array.
Preferably, the storage space of writing buffer memory described in is divided into overall situation head, RAID head, Block head and Block data field;
Described overall head, the size in buffer memory space and the bitmap bitmap whether each RAID head has been assigned with write in record;
Described RAID head, writes the lost efficacy target RAID array number of backup of buffer memory according to use and is divided into some subregions, the respectively corresponding target RAID array of every sub regions, and record this target RAID array information; Described target RAID array information comprises array numbering, Block size and the available Block number of described target RAID array;
Described Block head, the respectively corresponding Block data block of each Block head, and record respectively lba address in target RAID array of RAID head numbering under described Block data block, this Block data block and record whether the 2nd bitmap bitmap of written data of this Block data block;
Described Block data field, comprises several Block data blocks, and the size of described Block data block is the described Block size recording in described RAID head.
Preferably, describedly write buffer memory and comprise for target RAID Creating:
According to a described bitmap bitmap, for described target RAID array distributes a untapped RAID head;
Described target RAID array information and the available Block number of distributing for described target RAID array are recorded in corresponding RAID head.
Preferably, describedly write buffer memory described in the storage data that write described target RAID array are write and comprise:
According to the target RAID array numbering of writing in IO request of receiving, search corresponding RAID head;
According to the described lba address of writing in IO request, in the Block head of this RAID head correspondence, search Block head;
If found corresponding Block head, data are write in the Block data block of this Block head correspondence;
If do not find corresponding Block head, obtain an empty Block data block, data are write in this sky Block data block, the numbering of RAID head under simultaneously recording in Block head corresponding to this sky Block data block, in described the 2nd bitmap bitmap, record the Block data block written data of this Block head correspondence, and the lba address in target RAID array is recorded in this Block head by these data;
Wherein, when getting an empty data block, upgrade the described available Block number recording in corresponding RAID head.
Preferably, describedly from described, write reading out data buffer memory and comprise:
According to the target RAID array numbering of reading in IO request of receiving, search corresponding RAID head;
According to described lba address of reading in IO request, in the Block head of this RAID head correspondence, search Block head;
If found corresponding Block head, and the Block data block that described the 2nd bitmap bitmap in this Block head records this Block head correspondence write data, reads this data;
If do not find corresponding Block head, or the Block data block data writing not that records this Block head correspondence of described the 2nd bitmap bitmap in this Block head, reading out data from described target RAID array, and return to reading result.
The present invention also proposes a kind of back-up device of storing data, is applied to RAID array, and described device comprises:
Creation module, is used to target RAID Creating to write buffer memory; Wherein, described in, write to be buffered in when described target RAID array loses efficacy and enable;
Module for reading and writing, for when described target RAID array lost efficacy, writes buffer memory described in when IO order is write in execution, the data that write described target RAID array being write, when IO order is read in execution from described write buffer memory reading out data;
Write-back module, for when described target RAID array recovers normal, writes buffer memory described in automatically triggering written data is written back to described target RAID array, and described in forbidding, write buffer memory when write-back completes.
Preferably, described write-back module is further used for:
In described write-back process, if need to carry out, write IO order, this is write to data corresponding to IO order and write described target RAID array;
Described module for reading and writing is further used for:
In described write-back process, if need carried out, read IO order, according to data message to be read, from described, write reading out data buffer memory or from described target RAID array.
Preferably, the storage space of writing buffer memory described in is divided into overall situation head, RAID head, Block head and Block data field;
Described overall head, comprises and writes the size in buffer memory space and record the bitmap bitmap whether each RAID head has been assigned with;
Described RAID head, writes the lost efficacy target RAID array number of backup of buffer memory according to use and is divided into some subregions, the respectively corresponding target RAID array of every sub regions, and record this target RAID array information; Described target RAID array information comprises array numbering, Block size and the available Block number of described target RAID array;
Described Block head, the respectively corresponding Block data block of each Block head, and record respectively lba address in target RAID array of RAID head numbering under described Block data block, this Block data block and record whether the 2nd bitmap bitmap of written data of this Block data block;
Described Block data field, comprises several Block data blocks, and the size of described Block data block is the described Block size recording in described RAID head.
Preferably, described creation module is further used for:
According to a described bitmap bitmap, for described target RAID array distributes a untapped RAID head;
Described target RAID array information and the available Block number of distributing for described target RAID array are recorded in corresponding RAID head.
Preferably, described module for reading and writing is further used for:
According to the target RAID array numbering of writing in IO request of receiving, search corresponding RAID head;
According to the described lba address of writing in IO request, in the Block head of this RAID head correspondence, search Block head;
If found corresponding Block head, data are write in the Block data block of this Block head correspondence;
If do not find corresponding Block head, obtain an empty Block data block, data are write in this sky Block data block, the numbering of RAID head under simultaneously recording in Block head corresponding to this sky Block data block, in described the 2nd bitmap bitmap, record the Block data block written data of this Block head correspondence, and the lba address in target RAID array is recorded in this Block head by these data;
Wherein, when getting an empty data block, upgrade the described available Block number recording in corresponding RAID head.
Preferably, described module for reading and writing is further used for:
According to the target RAID array numbering of reading in IO request of receiving, search corresponding RAID head;
According to described lba address of reading in IO request, in the Block head of this RAID head correspondence, search Block head;
If found corresponding Block head, and the Block data block that described the 2nd bitmap bitmap in this Block head records this Block head correspondence write data, reads this data;
If do not find corresponding Block head, or the Block data block data writing not that records this Block head correspondence of described the 2nd bitmap bitmap in this Block head, reading out data from described target RAID array, and return to reading result.
The present invention writes buffer memory by establishment, uses a small amount of storage space simultaneously for a plurality of RAID arrays provide the backup of losing efficacy, to have reduced hardware cost; And, due to described write to be buffered in when RAID array lost efficacy just enable, and lost efficacy while recovering again at RAID array, the data that write-back paralysis period writes, thereby significantly reduced the performance impact to business.
Accompanying drawing explanation
Fig. 1 is the processing schematic diagram of RAID storage array to exterior read-write IO in prior art;
Fig. 2 is the processing schematic diagram of a kind of RAID array shown in a kind of exemplary embodiment of the present invention to exterior read-write IO;
Fig. 3 is a kind of backup method process flow diagram of storing data shown in a kind of illustrative embodiments of the present invention;
Fig. 4 is a kind of storage space organizational form of writing buffer memory medium shown in a kind of illustrative embodiments of the present invention;
Fig. 5 is that a kind of RAID array shown in a kind of illustrative embodiments of the present invention carries out the treatment scheme of data failure backup and data recovery by writing buffer memory;
Fig. 6 is a kind of back-up device block diagram of storing data shown in a kind of illustrative embodiments of the present invention.
Embodiment
Refer to Fig. 1, Fig. 1 is the processing schematic diagram of RAID array to exterior read-write IO in prior art.As shown in the figure, RAID array is when carrying out reading and writing data, read-write IO request is issued to RAID module by upper layer module, Raid request submodule judges the state of the affiliated RAID array of this IO request, if state is normal, this IO request is issued to RAID IO submodule and process, data are write to rear end hard disk, or from rear end hard disk reading out data; If array lost efficacy, to upper layer module, return and read or data writing failure.
In invention, can independently write buffer memory for RAID Creating, and using the described submodule of buffer memory in the RAID module of RAID array of writing, participate in the processing of RAID array to exterior read-write IO.
Particularly, refer to Fig. 2, Fig. 2 is the processing schematic diagram of a kind of RAID array shown in the present embodiment to exterior read-write IO.As shown in the figure, introduced and write after cache sub-module, read-write IO request is issued to RAID module by upper layer module, Raid request submodule judges the state of the affiliated RAID array of this IO request, if state is normal, still this IO request is issued to RAID IO submodule and process, data are write to rear end hard disk, or from rear end hard disk reading out data; If array lost efficacy, read-write IO request is no longer issued RAID IO submodule and is processed, but processes by writing cache sub-module, and the read-write of data is all carried out in writing buffer memory.When array recovers, automatically trigger and write buffer memory by written data write-back.
In order to make technical scheme of the present invention clearer, below in conjunction with the accompanying drawing embodiment that develops simultaneously, describe the present invention.
Refer to Fig. 3, in the exemplary a kind of embodiment of the present invention, propose a kind of backup method of storing data, be applied to RAID array, described method is carried out following steps:
Step 301, for target RAID Creating, write buffer memory; Wherein, described in, write to be buffered in when described target RAID array loses efficacy and enable;
Step 302, when described target RAID array lost efficacy, described in when IO order is write in execution, the data that write described target RAID array being write, write buffer memory, when IO order is read in execution from described write buffer memory reading out data;
Step 303, when described target RAID array recovers normal, described in automatically triggering, write buffer memory written data be written back to described target RAID array, and described in forbidding, write buffer memory when write-back completes.
In the present embodiment, described in write buffer memory storage medium can be one or more independently internal memory, one or more is hard disk independently, or one or more independently RAID array.Wherein, no matter write buffer memory and adopt which kind of storage medium, all according to structure organization storage space as shown in Figure 4.
As shown in Figure 4, in the present embodiment, the storage medium of writing buffer memory is divided into 4 regions, and following information is recorded respectively in each region: overall situation head, one or more RAID head, a plurality of Block head and a plurality of Block data field, the parameter that power-off must be preserved is only recorded in each region.
To the function in above 4 regions, the parameter with record is described in detail below.
Overall situation head region, this regional record writes the size (Size) in buffer memory space, for recording the data check value (check_sum) in a bitmap bitmap (raid_bitmap), affiliated controller ID (contol_id) and this region that whether each RAID head be assigned with.Wherein, described in write the size in buffer memory space, can when buffer memory is write in establishment, according to the time of actual business and the backup of losing efficacy, arrange; For example, suppose the video recording of RAID array Shang You 50 road 1Mbps, the inefficacy backup of 24h need to be provided, the RAID that therefore need to create about 528G size writes buffer memory.The hard disk of a 4TB size, as writing buffer memory, provides 24h inefficacy backup can to the RAID array of 7 this business simultaneously simultaneously so.
Whether a described bitmap bitmap, be assigned with for recording each RAID head, and RAID head correspondence position value in this bitmap bitmap is 1 o'clock, represents that this RAID head distributes; Be 0 o'clock, represent that this RAID head not yet distributes.
Controller ID under described, for distinguishing the controller of writing buffer memory described in control.For example, when concrete application, in order to improve reliability, target RAID array is many controls (being commonly called as dual control) by two controllers, by described controller ID, can distinguish the controller of controlling described target RAID array.Certainly, under the environment of non-dual control, this parameter has just not necessarily needed.
Described data check value, while surprisingly losing for some parameter recording in one's respective area, recovers by the master gage parameter of losing of getting it right.
RAID head region, this region is write the lost efficacy target RAID array number of backup of buffer memory according to use and is divided into some subregions, the respectively corresponding target RAID array of every sub regions; For example, supposing to write buffer memory need to be the backup of losing efficacy of two target RAID arrays, and RAID head region can be equal to so is divided into two sub regions, the corresponding target RAID region of every sub regions.In RAID head region, every sub regions records respectively the data check value in corresponding target RAID array information and this region; Described target RAID array information generally includes array numbering (uuid), sector-size (sector_size), stripe size (strip_size), Block size (block_size) and the available Block number (block_number) of described target RAID array; Wherein, described sector-size and stripe size depend on the concrete configuration of target RAID array; When writing buffer memory for creating, described available Block number distributed by keeper.
Block head region, is divided into several Block heads according to the total number of the Block that writes buffer memory, the respectively corresponding Block data block of each Block head; Each Block head records respectively the Block head numbering (index of this Block head in Block head region, represent which Block that this Block head is Block head region), Raid head numbering (raid_index under this Block head, represent this Block head belongs to which RAID in RAID head region), the lba address (logical block address, logical block addresses) of this Block data block recorded data in target RAID array and record whether the 2nd bitmap bitmap (block_bitmap) of written data of this Block data block.
Block data area, this region is divided into several Block data blocks according to the total number of Block of writing buffer memory, and the size of Block data block is the described Block size recording in described RAID head.Wherein, writing real space size that the total number of Block of buffer memory can be by writing buffer memory Block data area calculates divided by the Block size of single Block data block.
Refer to Fig. 5, Fig. 5 is that the RAID array shown in the present embodiment carries out the treatment scheme of data failure backup and data recovery by writing buffer memory, and the treatment scheme of below in conjunction with Fig. 4, RAID array being carried out data failure backup and data recovery by writing buffer memory is described in detail.
In the present embodiment, write and be buffered under original state not the backup of losing efficacy of any RAID array, after RAID Creating, if to the backup of losing efficacy of this RAID array, continue to create the write buffer memory corresponding with this RAID array.
Particularly, when writing buffer memory for this RAID Creating, can use bitmap bitmap according to the RAID head in overall situation head, for this RAID array distributes an empty RAID head, then in the RAID head being assigned to, record the information such as array numbering, sector-size, stripe size, Block size of this RAID array, for this RAID array, distribute available Block number simultaneously, and the available Block number of distributing is also recorded in RAID head.Wherein, described available Block number, in concrete minute timing, can be to be distributed equally for each target RAID array according to total Block number of writing buffer memory; Certainly, when specific implementation, also can be according to the practical business of target RAID array, be the available Block number that different target RAID array quantity allotteds does not wait, the present embodiment is not particularly limited.
In the present embodiment, what created writes buffer memory, when RAID array normally moves, is defaulted as disabled status, when RAID array loses efficacy, automatically enables.After writing buffer memory and enabling, for the exterior read-write IO request for inefficacy RAID array, all by writing buffer memory, process.
Write buffer memory first according to target RAID array numbering and the lba address in IO request of writing of receiving, search corresponding Block head; Particularly, when writing buffer memory, receive and write after IO request, first the target RAID array numbering of writing in IO request according to this is searched corresponding RAID head, writes the lba address in IO request again after finding RAID head according to this, in the Block head corresponding with this RAID head, searches Block head.If write first, the content recording in Block head is sky, cannot find corresponding Block head, therefore can directly obtain an empty Block data block, the data that this is write write in this sky Block data block, and in Block head corresponding to this sky Block data block the numbering of RAID head (being according to the numbering of reading that RAID head that in IO request, target RAID array numbering finds) under record, and be 1 by position, corresponding bit position in described the 2nd bitmap bitmap; Simultaneously, lba address by these data in target RAID array (this writes the lba address in IO request) is also recorded in Block head corresponding to this sky Block data block, when facilitating target RAID array to revert to normal condition by failure state, can written data be written back to target RAID array according to the lba address of recording in Block head.
When the target RAID array numbering when write IO request according to this in and sevtor address are searched Block, if found corresponding Block head, the Block data block that shows this Block head correspondence has write data before, so the data that directly this write write in the Block data block of this Block head correspondence.
What deserves to be explained is, when writing buffering write data, when getting an empty Block data block, need to upgrade the described available Block number recording in corresponding RAID head, described available Block number is subtracted to 1.
Further, when writing buffer memory, receive and read after IO request, first according to target RAID array numbering and the lba address in IO request of reading of receiving, described, search Block head in writing buffer memory; Particularly, when writing buffer memory, receive and read after IO request, first the target RAID array numbering of reading in IO request according to this is searched corresponding RAID head, reads the lba address in IO request again after finding RAID head according to this, in the Block head corresponding with this RAID head, searches Block head;
If found corresponding Block head, and in described the 2nd bitmap bitmap in this Block head corresponding bit position set be 1, show to have write data before the block data block of this block head correspondence, directly read these data;
Certainly, if do not find corresponding Block head, or in described the 2nd bitmap bitmap in this Block head, position, corresponding bit position is 0, shows to write in buffer memory, not record the data that this need to read, so reading out data from described target RAID array, and return to reading result.Because described target RAID array is now still in failure state, therefore directly returns and read failure.
In the present embodiment, can also be in writing buffer memory reserved part storage space as the competition usage space of each target RAID array.For competition usage space, even if arbitrary RAID head exhausts available Block (being that the available Block number recording in RAID head is 0), if competition usage space also exists empty Block data block, this RAID head still can be used the empty Block data block in competition usage space so.For the size of competition usage space, user can be according to business concrete configuration.Reserved competition usage space in writing buffer memory, can be so that when only having a target RAID array to lose efficacy, be used more backup space, and the BACKUP TIME of backup thereby maximization prolongation was lost efficacy, for maintainer provides the longer malfunction elimination time.
In the present embodiment, when target RAID array lost efficacy and to enable and write buffer memory, now maintainer can go on-the-spot investigation problem as early as possible, again recovers array.For example, for hard disk connector fault, or the loosening not problematic fault of disk that waits of DEU frame SAS line itself, maintainer can be by the replacing recovery array of card extender or SAS line.
After the target RAID array losing efficacy recovers, automatically trigger and write buffer memory written data is carried out to write-back to this target RAID array, and after the whole write-backs of the written data in writing buffer memory complete, automatically disable write buffer memory.
In the present embodiment, write and be buffered in while carrying out write-back, owing to having recorded the lba address of corresponding Block data block in described target RAID array in Block head, therefore can, according to this lba address, written data be written back to target RAID array by write sequence.Such as, this lba address can be converted into pba address (physics block address, physical blocks address), then according to the pba address conversing, the data of write-back are write to corresponding physical block.Wherein, the specific implementation that this lba address is converted into pba address please refer to prior art, and the present invention no longer describes in detail.
In the present embodiment, during data write-back, the new IO that writes will be no longer by writing caching process, and the data that newly write are by the target RAID array writing direct after recovering.Yet, due to during writing and being buffered in write-back, the part valid data on target RAID array still in writing buffer memory, the therefore IO request of reading during write-back or first by writing caching process, when the data of miss correspondence when writing cache read and fetch data, then from target RAID array reading out data.
Certainly, when specific implementation, write buffer memory also can just enable when target RAID array is normal, this target RAID array written data is synchronously write to buffer memory, even thereby this target RAID array lost efficacy because hard disk failure causes, target RAID array local data can all not lost yet.For example, for the application of field of video monitoring, before writing, video recording needs to read video recording index data, therefore can when RAID array be normal, enable and write buffer memory, index data is backed up in advance, thereby when RAID array was lost efficacy, also can read normally video recording index data.
Known by above description, the present invention writes buffer memory by establishment, can use a small amount of storage space simultaneously for a plurality of RAID arrays provide the backup of losing efficacy, to have lowered hardware cost; And, due to described write to be buffered in when RAID array lost efficacy just enable, can effectively distinguish the data that array paralysis period writes, and while recovering again owing to losing efficacy at RAID array, the data that write-back paralysis period writes, thus the performance impact to business significantly reduced.The data backup and resume that the RAID array that this scheme is particularly useful for causing because of nonmagnetic disk fault lost efficacy.
Refer to Fig. 6, the present invention also proposes a kind of back-up device 60 of storing data, is applied to RAID array, and described device 60 comprises:
Creation module 601, is used to target RAID Creating to write buffer memory; Wherein, described in, write to be buffered in when described target RAID array loses efficacy and enable;
Module for reading and writing 602, for when described target RAID array lost efficacy, writes buffer memory described in when IO order is write in execution, the data that write described target RAID array being write, when IO order is read in execution from described write buffer memory reading out data;
Write-back module 603, for when described target RAID array recovers normal, writes buffer memory described in automatically triggering written data is written back to described target RAID array, and described in forbidding, write buffer memory when write-back completes.
In the present embodiment, described write-back module 603 is further used for:
In described write-back process, if need to carry out, write IO order, this is write to data corresponding to IO order and write described target RAID array;
Described module for reading and writing 602 is further used for:
In described write-back process, if need carried out, read IO order, according to data message to be read, from described, write reading out data buffer memory or from described target RAID array.
In the present embodiment, the storage space of writing buffer memory described in is divided into overall situation head, RAID head, Block head and Block data field;
Described overall head, comprises and writes the size in buffer memory space and record the bitmap bitmap whether each RAID head has been assigned with;
Described RAID head, writes the lost efficacy target RAID array number of backup of buffer memory according to use and is divided into some subregions, the respectively corresponding target RAID array of every sub regions, and record this target RAID array information; Described target RAID array information comprises array numbering, Block size and the available Block number of described target RAID array;
Described Block head, the respectively corresponding Block data block of each Block head, and record respectively lba address in target RAID array of RAID head numbering under described Block data block, this Block data block and record whether the 2nd bitmap bitmap of written data of this Block data block;
Described Block data field, comprises several Block data blocks, and the size of described Block data block is the described Block size recording in described RAID head.
In the present embodiment, described creation module 601 is further used for:
According to a described bitmap bitmap, for described target RAID array distributes a untapped RAID head;
Described target RAID array information and the available Block number of distributing for described target RAID array are recorded in corresponding RAID head.
In the present embodiment, described module for reading and writing 602 is further used for:
According to the target RAID array numbering of writing in IO request of receiving, search corresponding RAID head;
According to the described lba address of writing in IO request, in the Block head of this RAID head correspondence, search Block head;
If found corresponding Block head, data are write in the Block data block of this Block head correspondence;
If do not find corresponding Block head, obtain an empty Block data block, data are write in this sky Block data block, the numbering of RAID head under simultaneously recording in Block head corresponding to this sky Block data block, in described the 2nd bitmap bitmap, record the Block data block written data of this Block head correspondence, and the lba address in target RAID array is recorded in this Block head by these data;
Wherein, when getting an empty data block, upgrade the described available Block number recording in corresponding RAID head.
In the present embodiment, described module for reading and writing 602 is further used for:
According to the target RAID array numbering of reading in IO request of receiving, search corresponding RAID head;
According to described lba address of reading in IO request, in the Block head of this RAID head correspondence, search Block head;
If found corresponding Block head, and the Block data block that described the 2nd bitmap bitmap in this Block head records this Block head correspondence write data, reads this data;
If do not find corresponding Block head, or the Block data block data writing not that records this Block head correspondence of described the 2nd bitmap bitmap in this Block head, reading out data from described target RAID array, and return to reading result.
It will be appreciated by those skilled in the art that the module in the device in embodiment can be distributed in the device of embodiment according to embodiment description, also can carry out respective change and be arranged in the one or more devices that are different from the present embodiment.The module of above-described embodiment can be merged into a module, also can further split into a plurality of submodules.Foregoing invention embodiment numbering, just to describing, does not represent the quality of embodiment.
The foregoing is only preferred embodiment of the present invention, in order to limit the present invention, within the spirit and principles in the present invention not all, any modification of making, be equal to replacement, improvement etc., within all should being included in the scope of protection of the invention.

Claims (12)

1. store a backup method for data, be applied to RAID array, it is characterized in that, described method comprises:
For target RAID Creating is write buffer memory; Wherein, described in, write to be buffered in when described target RAID array loses efficacy and enable;
When described target RAID array lost efficacy, described in when IO order is write in execution, the data that write described target RAID array being write, write buffer memory, when IO order is read in execution from described write buffer memory reading out data;
When described target RAID array recovers normal, described in automatically triggering, write buffer memory written data is written back to described target RAID array, and described in forbidding, write buffer memory when write-back completes.
2. the method for claim 1, is characterized in that, described method also comprises:
In described write-back process, if need to carry out, write IO order, this is write to data corresponding to IO order and write described target RAID array;
In described write-back process, if need carried out, read IO order, according to data message to be read, from described, write reading out data buffer memory or from described target RAID array.
3. the method for claim 1, is characterized in that, described in write buffer memory storage space be divided into overall situation head, RAID head, Block head and Block data field;
Described overall head, the size in buffer memory space and the bitmap bitmap whether each RAID head has been assigned with write in record;
Described RAID head, writes the lost efficacy target RAID array number of backup of buffer memory according to use and is divided into some subregions, the respectively corresponding target RAID array of every sub regions, and record this target RAID array information; Described target RAID array information comprises array numbering, Block size and the available Block number of described target RAID array;
Described Block head, the respectively corresponding Block data block of each Block head, and record respectively lba address in target RAID array of RAID head numbering under described Block data block, this Block data block and record whether the 2nd bitmap bitmap of written data of this Block data block;
Described Block data field, comprises several Block data blocks, and the size of described Block data block is the described Block size recording in described RAID head.
4. method as claimed in claim 3, is characterized in that, describedly writes buffer memory and comprises for target RAID Creating:
According to a described bitmap bitmap, for described target RAID array distributes a untapped RAID head;
Described target RAID array information and the available Block number of distributing for described target RAID array are recorded in corresponding RAID head.
5. method as claimed in claim 3, is characterized in that, describedly writes buffer memory described in the storage data that write described target RAID array are write and comprises:
According to the target RAID array numbering of writing in IO request of receiving, search corresponding RAID head;
According to the described lba address of writing in IO request, in the Block head of this RAID head correspondence, search Block head;
If found corresponding Block head, data are write in the Block data block of this Block head correspondence;
If do not find corresponding Block head, obtain an empty Block data block, data are write in this sky Block data block, the numbering of RAID head under simultaneously recording in Block head corresponding to this sky Block data block, in described the 2nd bitmap bitmap, record the Block data block written data of this Block head correspondence, and the lba address in target RAID array is recorded in this Block head by these data;
Wherein, when getting an empty data block, upgrade the described available Block number recording in corresponding RAID head.
6. method as claimed in claim 3, is characterized in that, describedly from described, write reading out data buffer memory and comprises:
According to the target RAID array numbering of reading in IO request of receiving, search corresponding RAID head;
According to described lba address of reading in IO request, in the Block head of this RAID head correspondence, search Block head;
If found corresponding Block head, and the Block data block that described the 2nd bitmap bitmap in this Block head records this Block head correspondence write data, reads this data;
If do not find corresponding Block head, or the Block data block data writing not that records this Block head correspondence of described the 2nd bitmap bitmap in this Block head, reading out data from described target RAID array, and return to reading result.
7. store a back-up device for data, be applied to RAID array, it is characterized in that, described device comprises:
Creation module, is used to target RAID Creating to write buffer memory; Wherein, described in, write to be buffered in when described target RAID array loses efficacy and enable;
Module for reading and writing, for when described target RAID array lost efficacy, writes buffer memory described in when IO order is write in execution, the data that write described target RAID array being write, when IO order is read in execution from described write buffer memory reading out data;
Write-back module, for when described target RAID array recovers normal, writes buffer memory described in automatically triggering written data is written back to described target RAID array, and described in forbidding, write buffer memory when write-back completes.
8. device as claimed in claim 7, is characterized in that, described write-back module is further used for:
In described write-back process, if need to carry out, write IO order, this is write to data corresponding to IO order and write described target RAID array;
Described module for reading and writing is further used for:
In described write-back process, if need carried out, read IO order, according to data message to be read, from described, write reading out data buffer memory or from described target RAID array.
9. device as claimed in claim 7, is characterized in that, described in write buffer memory storage space be divided into overall situation head, RAID head, Block head and Block data field;
Described overall head, comprises and writes the size in buffer memory space and record the bitmap bitmap whether each RAID head has been assigned with;
Described RAID head, writes the lost efficacy target RAID array number of backup of buffer memory according to use and is divided into some subregions, the respectively corresponding target RAID array of every sub regions, and record this target RAID array information; Described target RAID array information comprises array numbering, Block size and the available Block number of described target RAID array;
Described Block head, the respectively corresponding Block data block of each Block head, and record respectively lba address in target RAID array of RAID head numbering under described Block data block, this Block data block and record whether the 2nd bitmap bitmap of written data of this Block data block;
Described Block data field, comprises several Block data blocks, and the size of described Block data block is the described Block size recording in described RAID head.
10. device as claimed in claim 9, is characterized in that, described creation module is further used for:
According to a described bitmap bitmap, for described target RAID array distributes a untapped RAID head;
Described target RAID array information and the available Block number of distributing for described target RAID array are recorded in corresponding RAID head.
11. devices as claimed in claim 9, is characterized in that, described module for reading and writing is further used for:
According to the target RAID array numbering of writing in IO request of receiving, search corresponding RAID head;
According to the described lba address of writing in IO request, in the Block head of this RAID head correspondence, search Block head;
If found corresponding Block head, data are write in the Block data block of this Block head correspondence;
If do not find corresponding Block head, obtain an empty Block data block, data are write in this sky Block data block, the numbering of RAID head under simultaneously recording in Block head corresponding to this sky Block data block, in described the 2nd bitmap bitmap, record the Block data block written data of this Block head correspondence, and the lba address in target RAID array is recorded in this Block head by these data;
Wherein, when getting an empty data block, upgrade the described available Block number recording in corresponding RAID head.
12. devices as claimed in claim 9, is characterized in that, described module for reading and writing is further used for:
According to the target RAID array numbering of reading in IO request of receiving, search corresponding RAID head;
According to described lba address of reading in IO request, in the Block head of this RAID head correspondence, search Block head;
If found corresponding Block head, and the Block data block that described the 2nd bitmap bitmap in this Block head records this Block head correspondence write data, reads this data;
If do not find corresponding Block head, or the Block data block data writing not that records this Block head correspondence of described the 2nd bitmap bitmap in this Block head, reading out data from described target RAID array, and return to reading result.
CN201410401367.4A 2014-08-14 2014-08-14 The backup method and device of a kind of data storage Active CN104166601B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410401367.4A CN104166601B (en) 2014-08-14 2014-08-14 The backup method and device of a kind of data storage

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410401367.4A CN104166601B (en) 2014-08-14 2014-08-14 The backup method and device of a kind of data storage

Publications (2)

Publication Number Publication Date
CN104166601A true CN104166601A (en) 2014-11-26
CN104166601B CN104166601B (en) 2017-08-15

Family

ID=51910431

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410401367.4A Active CN104166601B (en) 2014-08-14 2014-08-14 The backup method and device of a kind of data storage

Country Status (1)

Country Link
CN (1) CN104166601B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105068896A (en) * 2015-09-25 2015-11-18 浙江宇视科技有限公司 Data processing method and device based on RAID backup
CN108228084A (en) * 2016-12-21 2018-06-29 伊姆西Ip控股有限责任公司 For managing the method and apparatus of storage system
CN108491162A (en) * 2018-03-13 2018-09-04 山东超越数控电子股份有限公司 A kind of method and device improving performance of storage system
CN108874312A (en) * 2018-05-30 2018-11-23 郑州云海信息技术有限公司 Date storage method and storage equipment
CN110069212A (en) * 2018-01-22 2019-07-30 爱思开海力士有限公司 The operating method of storage device and storage device
CN112669148A (en) * 2020-12-22 2021-04-16 深圳市富途网络科技有限公司 Order processing method and device
CN117093160A (en) * 2023-10-18 2023-11-21 苏州元脑智能科技有限公司 Data processing method and device of Cache, computer equipment and medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101236482A (en) * 2008-02-26 2008-08-06 杭州华三通信技术有限公司 Method for processing data under degrading state and independent redundancy magnetic disc array system
CN101527142A (en) * 2009-04-17 2009-09-09 杭州华三通信技术有限公司 Reading-writing method of data in redundant arrays of inexpensive disks (RAID) and equipment thereof
CN102520883A (en) * 2011-12-12 2012-06-27 杭州华三通信技术有限公司 Data access method and device thereof
CN102521068A (en) * 2011-11-08 2012-06-27 华中科技大学 Reconstructing method of solid-state disk array

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101236482A (en) * 2008-02-26 2008-08-06 杭州华三通信技术有限公司 Method for processing data under degrading state and independent redundancy magnetic disc array system
CN101527142A (en) * 2009-04-17 2009-09-09 杭州华三通信技术有限公司 Reading-writing method of data in redundant arrays of inexpensive disks (RAID) and equipment thereof
CN102521068A (en) * 2011-11-08 2012-06-27 华中科技大学 Reconstructing method of solid-state disk array
CN102520883A (en) * 2011-12-12 2012-06-27 杭州华三通信技术有限公司 Data access method and device thereof

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105068896B (en) * 2015-09-25 2019-03-12 浙江宇视科技有限公司 Data processing method and device based on RAID backup
CN105068896A (en) * 2015-09-25 2015-11-18 浙江宇视科技有限公司 Data processing method and device based on RAID backup
US11144414B2 (en) 2016-12-21 2021-10-12 EMC IP Holding Company LLC Method and apparatus for managing storage system
CN108228084B (en) * 2016-12-21 2020-10-13 伊姆西Ip控股有限责任公司 Method and apparatus for managing storage system
CN108228084A (en) * 2016-12-21 2018-06-29 伊姆西Ip控股有限责任公司 For managing the method and apparatus of storage system
CN110069212A (en) * 2018-01-22 2019-07-30 爱思开海力士有限公司 The operating method of storage device and storage device
CN110069212B (en) * 2018-01-22 2022-11-11 爱思开海力士有限公司 Storage device and operation method of storage device
CN108491162A (en) * 2018-03-13 2018-09-04 山东超越数控电子股份有限公司 A kind of method and device improving performance of storage system
CN108874312A (en) * 2018-05-30 2018-11-23 郑州云海信息技术有限公司 Date storage method and storage equipment
CN108874312B (en) * 2018-05-30 2021-09-17 郑州云海信息技术有限公司 Data storage method and storage device
CN112669148A (en) * 2020-12-22 2021-04-16 深圳市富途网络科技有限公司 Order processing method and device
CN117093160A (en) * 2023-10-18 2023-11-21 苏州元脑智能科技有限公司 Data processing method and device of Cache, computer equipment and medium
CN117093160B (en) * 2023-10-18 2024-02-02 苏州元脑智能科技有限公司 Data processing method and device of Cache, computer equipment and medium

Also Published As

Publication number Publication date
CN104166601B (en) 2017-08-15

Similar Documents

Publication Publication Date Title
CN104166601A (en) Storage data backup method and device
CN103049222B (en) A kind of RAID5 writes IO optimized treatment method
US9684591B2 (en) Storage system and storage apparatus
CN103577121B (en) A kind of highly reliable linear file access method based on Nand Flash
US7228381B2 (en) Storage system using fast storage device for storing redundant data
US5634109A (en) Method and system for enhanced data management efficiency in memory subsystems utilizing redundant arrays of disk memory devices and a nonvolatile cache
KR101678868B1 (en) Apparatus for flash address translation apparatus and method thereof
CN101236482B (en) Method for processing data under degrading state and independent redundancy magnetic disc array system
CN104050094A (en) System, method and computer-readable medium for managing a cache store to achieve improved cache ramp-up across system reboots
US8862819B2 (en) Log structure array
CN104620230A (en) Method of managing memory
CN101354633A (en) Method for improving writing efficiency of virtual storage system and virtual storage system thereof
US20120072663A1 (en) Storage control device and RAID group extension method
CN103534688A (en) Data recovery method, storage equipment and storage system
CN103729149A (en) Data storage method
US11379326B2 (en) Data access method, apparatus and computer program product
US10409690B2 (en) Storage utilizing a distributed cache chain and a checkpoint drive in response to a data drive corruption
CN110134551B (en) Continuous data protection method and device
CN102262657A (en) Method and system for storing multimedia data
CN105068896B (en) Data processing method and device based on RAID backup
CN101807212B (en) Caching method for embedded file system and embedded file system
CN101408833A (en) Method for initializing synchronous course omitting RAID1 equipment
JP5953245B2 (en) Information processing system
CN107122261B (en) Data reading and writing method and device of storage equipment
CN110764695A (en) Storage method and system based on high-speed acquisition

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant