CN109783401A - Date storage method and storage system - Google Patents

Date storage method and storage system Download PDF

Info

Publication number
CN109783401A
CN109783401A CN201910108023.7A CN201910108023A CN109783401A CN 109783401 A CN109783401 A CN 109783401A CN 201910108023 A CN201910108023 A CN 201910108023A CN 109783401 A CN109783401 A CN 109783401A
Authority
CN
China
Prior art keywords
controller
memory device
buffer memory
data
attributed region
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
CN201910108023.7A
Other languages
Chinese (zh)
Other versions
CN109783401B (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201910108023.7A priority Critical patent/CN109783401B/en
Publication of CN109783401A publication Critical patent/CN109783401A/en
Application granted granted Critical
Publication of CN109783401B publication Critical patent/CN109783401B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems

Abstract

The invention discloses a kind of date storage method and storage systems.The described method includes: the first controller receives target data, when the attaching information of the target data is the first controller, first controller stores target data to the first buffer memory device to obtain the first mirror image data, wherein, first buffer memory device is used to store the mirror image data of the first controller, it is needing to store the data in the first buffer memory device to when storing equipment, the first controller will include being stored by the data after the processing of the first controller to storage equipment including target data in the first buffer memory device.Reduce the demand to controller memory with this, and between controller mirror paths pressure.

Description

Date storage method and storage system
Technical field
The present invention relates to field of storage more particularly to a kind of date storage method and storage systems.
Background technique
The data of operation in host computer, most of will finally be sent in storage equipment are stored.On guaranteeing Position machine stores data into the reliability of storage device procedures, and storage system generallys use multi-controller structure.For example, such as Fig. 1 Shown, storage system 120 includes the first controller 121, second controller 122 and storage equipment 123.Wherein, the first control Device 121 is used to be equally used for and 110 data communication of host computer, the first control with 110 data communication of host computer, second controller 122 It is connected between device 121 and second controller 122 processed by PCIe/IB (nfiniband), the connection storage of the first controller 121 is set Standby 123, second controller equally connects storage equipment 123.
Due to reading and writing the speed of data between host computer 110 and controller more than between host computer 110 and storage equipment 123 The speed for reading and writing data is fast, and when data are frequently read and write, it is slow that data will not be directly stored in read or write speed by host computer 110 Storage equipment 123 in, but to read or write speed than faster controller send data, until the data in controller reach one When fixed amount or 110 determination of host computer will store data into storage equipment 123, controller sends the data in controller It is stored to storage equipment 123.For example, host computer 110 first sends the data to the first controller 121 and second controller The data received can be stored in the caching of this controller by any one controller in 122, the controller for receiving data In, in order to be interacted with host computer 110.In addition, the controller for receiving data will count in order to improve the reliability of data It is stored into the memory of another controller according to by tunnels such as PCIe/IB (nfiniband) to obtain a mirror It is backed up as data.Finally, working as, data reach a certain amount or the determination of host computer 110 stores data into storage equipment When 123, controller will be sent to storage equipment 123 and store after the data processing in memory, to improve reading and writing data effect Rate.
But in this manner, the space of mirror image data storage must be reserved in the memory of controller, to accommodate other The mirror image data that controller sends over, so bigger to the capacity requirement of the memory of controller.Moreover, because PCIe/IB (nfiniband) bandwidth of access is limited, can be to PCIe/IB (nfiniband) access just when mirror image data is more Regular data transmission belt carrys out pressure.Finally, working as one of controller when something goes wrong, all data can only all pass through remaining control Device processed is stored, in order to guarantee the reliability of data, remaining controller will not by data buffer storage in this controller, but It directly writes in storage equipment, greatly reduces the speed of read-write.
Summary of the invention
The technical problem to be solved by the embodiment of the invention is that a kind of storage system and date storage method are provided, Realize the requirement reduced to memory size.
In a first aspect, the present invention provides a kind of date storage methods, comprising: include at least the first controller and second At least two controllers including controller, storage equipment and comprising the first buffer memory device and the second buffer memory device including At least two buffer memory devices, for being communicated with host computer, first controller is also respectively connected with first controller The storage equipment, first buffer memory device and second buffer memory device, the second controller is used for and host computer It is communicated, the second controller is also respectively connected with the storage equipment, first buffer memory device and described second slow Equipment is deposited, first controller connects the second controller, is provided with the first attributed region in first buffer memory device And second attributed region, the first attributed region and the second attributed region are provided in second buffer memory device,
The attribute of first attributed region are as follows: first controller is to the first ownership in first buffer memory device The first attributed region in region and second buffer memory device can be read and write operation, the second controller The first attributed region in the first attributed region and second buffer memory device in first buffer memory device can be carried out Read operation but it not can be carried out write operation,
The attribute of second attributed region are as follows: the second controller is to the second ownership in first buffer memory device The second attributed region in region and second buffer memory device can be read and write operation, first controller The second attributed region in the second attributed region and second buffer memory device in first buffer memory device can be carried out Read operation but it not can be carried out write operation;
First controller receives target data transmitted by the host computer;
First controller judges whether the target data belongs to institute according to the attaching information in the target data State the processing of the first controller;
If it is not, then the target data is forwarded to the second controller by first controller, if it is, institute The target data is sent in first buffer memory device or second buffer memory device by the first controller first is stated to return Belong to region to be stored to obtain the first mirror image data;
When needing the data storage in buffer memory device to the storage equipment, first controller is by described first In first attributed region of buffer memory device and second buffer memory device comprising including the target data by described first Data after controller processing are stored into the storage equipment.
With reference to first aspect, in the first possible embodiment of first aspect present invention, the method also includes:
If first buffer memory device breaks down, first controller and the second controller will be described Data in first buffer memory device are transferred to second buffer memory device.
With reference to first aspect, in second of first aspect present invention possible embodiment, the method also includes:
If the target data is sent to first buffer memory device to obtain described first by first controller Mirror image data, then the target data is also sent to second buffer memory device to obtain described second by first controller Mirror image data.
With reference to first aspect or second of the first possible embodiment of first aspect or first aspect possible Embodiment, in the third possible embodiment of first aspect present invention, when first controller breaks down, institute State second controller modify in the first attributed region and second buffer memory device in first buffer memory device first The attribute of attributed region are as follows: the second controller is to the first attributed region and described second in first buffer memory device The first attributed region in buffer memory device can be read and write operation,
The second controller reads the first attributed region in first buffer memory device and second caching is set The data in the first attributed region in standby, and store into the storage equipment;
After the second controller receives the data of host computer transmission, institute can be sent by the data that host computer is sent The first attributed region in the first attributed region in the first buffer memory device and second buffer memory device is stated to be stored.
With reference to first aspect or second of the first possible embodiment of first aspect or first aspect possible Embodiment, in the 4th kind of possible embodiment of first aspect present invention, if first controller and described second Controller breaks down, when third controller replaces first controller, after the 4th controller replaces the second controller, The third controller is from first in the first attributed region and/or second buffer memory device in first buffer memory device Attributed region reads the data of first controller storage, and the 4th controller is from second in first buffer memory device The second attributed region in attributed region and/or second buffer memory device reads the data of the second controller storage, with Restore data service.
Second aspect, the present invention provides a kind of storage systems, comprising: includes at least the first controller and the second control At least two controllers including device, storage equipment and comprising including the first buffer memory device and the second buffer memory device at least Two buffer memory devices, for being communicated with host computer, first controller is also respectively connected with described first controller Equipment, first buffer memory device and second buffer memory device are stored, the second controller is used to carry out with host computer Communication, the second controller are also respectively connected with the storage equipment, first buffer memory device and second caching and set Standby, first controller connects the second controller, be provided in first buffer memory device the first attributed region and Second attributed region is provided with the first attributed region and the second attributed region in second buffer memory device,
The attribute of first attributed region are as follows: first controller is to the first ownership in first buffer memory device The first attributed region in region and second buffer memory device can be read and write operation, the second controller The first attributed region in the first attributed region and second buffer memory device in first buffer memory device can be carried out Read operation but it not can be carried out write operation,
The attribute of second attributed region are as follows: the second controller is to the second ownership in first buffer memory device The second attributed region in region and second buffer memory device can be read and write operation, first controller The second attributed region in the second attributed region and second buffer memory device in first buffer memory device can be carried out Read operation but it not can be carried out write operation;
First controller is for receiving target data transmitted by the host computer;
First controller is used to judge whether the target data belongs to according to the attaching information in the target data In first controller processing, when the judgment result is No, the target data is forwarded to the second controller, is being sentenced Disconnected result is when being, first that the target data is sent in first buffer memory device or second buffer memory device returns Belong to region to be stored to obtain the first mirror image data;
First controller is also used to when needing data from buffer memory device storage to the storage equipment, will be described In first attributed region of the first buffer memory device and second buffer memory device comprising including the target data by described Data after the processing of first controller are stored into the storage equipment.
In conjunction with second aspect, in the possible embodiment of the first of second aspect of the present invention, first controller with And the second controller is used for when first buffer memory device breaks down, and the data in first buffer memory device are turned Move to second buffer memory device.
In conjunction with second aspect, in the possible embodiment of second of second aspect of the present invention, first controller is also For the target data to be sent to first buffer memory device to obtain the first mirror image number in first controller According to when, the target data is sent to second buffer memory device to obtain second mirror image data.
Second in conjunction with the possible embodiment of the first of second aspect or second aspect or second aspect is possible Embodiment, in the third possible embodiment of second aspect of the present invention, when first controller breaks down, institute State second controller modify in the first attributed region and second buffer memory device in first buffer memory device first The attribute of attributed region are as follows: the second controller is to the first attributed region and described second in first buffer memory device The first attributed region in buffer memory device can be read and write operation,
The second controller is used to read the first attributed region in first buffer memory device and described second slow The data in the first attributed region in equipment are deposited, and are stored into the storage equipment;
After the second controller is also used to receive the data of host computer transmission, the data that host computer can be sent are sent out The first attributed region is deposited in the first attributed region and second buffer memory device being sent in first buffer memory device Storage.
Second in conjunction with the possible embodiment of the first of second aspect or second aspect or second aspect is possible Embodiment, in the 4th kind of possible embodiment of second aspect of the present invention, in first controller and second control Device processed breaks down, when third controller replaces first controller, after the 4th controller replaces the second controller,
The third controller is for the first attributed region and/or second caching from first buffer memory device The first attributed region in equipment reads the data of the first controller storage;
4th controller is for the second attributed region and/or second caching from first buffer memory device The second attributed region in equipment reads the data of the second controller storage, to restore data service.
By implementing the embodiment of the present invention, can in addition buffer memory device be set and mirror image data is stored in buffer memory device In, then controller is not necessarily to provide memory space for mirror image data, to reduce the requirement to controller memory size.Moreover, working as After the data that host computer is sent reach affiliated controller, do not need to send data by PCIe/IB (nfiniband) access To another controller, then it can mitigate the pressure of the data transmission of PCIe/IB (nfiniband) access between two controllers Power.Finally, working as one of controller when something goes wrong, the data that host computer is sent can be write caching by another controller To guarantee data reliability in equipment, moreover, controller does not need to write the data directly into storage equipment, to mention significantly The high speed for writing data.Moreover, the first controller, which cannot be write, belongs to the second attributed region that second controller can be write, second Controller, which cannot be write, belongs to the first attributed region that the first controller can be write, that is, the first controller and second controller can be with Carry out write operation memory space be independent of each other, can prevent two different controllers simultaneously to same storage unit into Row write operation and caused by conflict.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.
Fig. 1 is the structural schematic diagram of one embodiment of prior art memory system;
Fig. 2 is a kind of structural schematic diagram of possible embodiment of storage system of the present invention;
Fig. 3 is the schematic diagram of the first attributed region and the second attributed region in buffer memory device in storage system of the present invention;
Fig. 4 is the structural schematic diagram of one embodiment of buffer memory device in storage system of the present invention;
Fig. 5 is the structural schematic diagram of another embodiment of buffer memory device in storage system of the present invention;
Fig. 6 is the flow chart of one embodiment of date storage method of the present invention;
Fig. 7 is the flow chart of another embodiment of date storage method of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
It should be noted that the term used in embodiments of the present invention is only merely for the mesh of description specific embodiment , it is not intended to limit the invention." the one of the embodiment of the present invention and singular used in the attached claims Kind ", " described " and "the" are also intended to including most forms, unless the context clearly indicates other meaning.It is also understood that this Term "and/or" used herein refers to and includes one or more associated any or all possible group for listing project It closes.
Referring to Fig.2, Fig. 2 is a kind of structural schematic diagram of possible embodiment of storage system of the present invention.Present embodiment Storage system 220 include: the first controller 221, second controller 222, storage equipment 223, the first buffer memory device 224 and Second buffer memory device 225.Wherein, the first buffer memory device 224 and the second buffer memory device 225 are multi bri devices, here, first Buffer memory device 224 and the second buffer memory device 225 all have two ports of first port and second port.
For first controller 221 for connecting host computer 210, the first controller 221 is also respectively connected with storage equipment 223, the The first port of the first port of one buffer memory device 224 and the second buffer memory device 225, the first controller 221 pass through PCIe/IB (nfiniband) second controller 222 is connected, second controller 222 is connected for connecting host computer 210, second controller 222 Store the second port of equipment 223, the second port of the first buffer memory device 224 and the second buffer memory device 225.Wherein, first Between the first port of the first port and the second buffer memory device 225 of controller 221 and the first buffer memory device 224, the second control It can pass through between the second port of the second port and the second buffer memory device 225 of device 222 processed and the first buffer memory device 224 PCIe/IB (nfiniband) connection.In other implementations, it can also be attached by other buses, the present invention is not Make specific limit.
Any one controller hair of 210 property of can choose of host computer into the first controller 221 and second controller 222 Send target data.Since a data cannot be handled by two controllers simultaneously, so, mesh is provided in target data The attaching information of data is marked, controller can judge whether target data is to one's name handled according to this attaching information.Assuming that The controller for receiving target data is the first controller 221, then the first controller 221 is according to the affiliated control in target data The information of device judges whether target data belongs to the processing of the first controller 221.If target data is not belonging to the first controller 221 Processing, then target data is transmitted to second controller 222 by PCIe/IB (nfiniband) by the first controller 221, then by Second controller 222 judges whether target data belongs to second controller according to the information of the affiliated controller in target data 222 processing.If target data belongs to the processing of the first controller 221, target data can be sent to the by the first controller 221 A buffer memory device in one buffer memory device 224 and the second buffer memory device 225 is stored to obtain the first mirror image data.
When host computer 210 selects to send target data to second controller 222, second controller 222 also carries out similar Operation.
Need by buffer memory device data storage to storage equipment 223 when, for example, the data in buffer memory device reach Threshold value or host computer 210 give an order by buffer memory device data storage to storage equipment 223 when, 221 meeting of the first controller By being handled inside by the first controller 221 comprising target data in the first buffer memory device 224 and the second buffer memory device 225 Data storage to storage equipment 223 in.Second controller 222 also can be by the first buffer memory device 224 and the second buffer memory device 225 In handled by second controller 222 data storage to storage equipment 223 in.
If non-catastrophic failure, the first controller 221 and second controller 222 occur for the first buffer memory device 224 Data in first buffer memory device 224 can be transferred to the second buffer memory device 225, on the contrary, if the second buffer memory device 225 is sent out Raw failure, then the data in the second buffer memory device 225 can be transferred to the by the first controller 221 and second controller 222 One buffer memory device 224, to improve the safety of data.
In the present embodiment, the first caching is in addition provided with except the first controller 221 and second controller 222 to set Standby 224 and second buffer memory device 225.When the first controller 221 or second controller 222 receive transmitted by host computer 210 Target data when, target data can be forwarded to the first buffer memory device 224 by the first controller 221 or second controller 222 Or second carry out storage in buffer memory device 225 to obtain the first mirror image data.So when target data when something goes wrong, The reliability of data can also be improved used as the first mirror image data of backup.
In another embodiment, it after the first controller 221 receives target data transmitted by host computer 210, removes The buffer memory device that target data is sent in the first buffer memory device 224 and the second buffer memory device 225 store with It obtains outside the first mirror image data, target data can also be sent in another buffer memory device and deposit by the first controller 221 Storage, to obtain the second mirror image data.At this point, respectively have a data in the first buffer memory device 224 and the second buffer memory device 225, Even if the data in one of buffer memory device there is a problem, there are also the data in another buffer memory device can be used, from And greatly improve the reliability of data.
As shown in figure 3, in another embodiment, the first buffer memory device 224 and the second buffer memory device 225 can be arranged There are the first attributed region and the second attributed region.Wherein, the attribute of the first attributed region are as follows: the first controller 221 is to first Attributed region can be read and write operation, and second controller 222 can be read the first attributed region but not It can be carried out write operation.The attribute of second attributed region are as follows: second controller 222 second attributed region can be read and Write operation, the first controller 221 can be read the second attributed region but not can be carried out write operation.So above-mentioned After first controller 221 receives target data, target data is sent to 224 He of the first buffer memory device by the first controller 221 A buffer memory device in second buffer memory device 225 is stored to obtain the first mirror image data specifically: the first controller 221 Target data is sent to the first home zone of a buffer memory device in the first buffer memory device 224 and the second buffer memory device 225 Domain is stored to obtain the first mirror image data.If receive target data is second controller 222, second controller 222 can return the second of the buffer memory device that target data is sent in the first buffer memory device 224 and the second buffer memory device 225 Belong to region to be stored to obtain the first mirror image data.
In another embodiment, when the first controller 221 breaks down, the can be read by second controller 222 The data in the first attributed region in the first attributed region and the second buffer memory device 225 in one buffer memory device 224, and deposit It stores up in storage equipment 223;After second controller 222 receives the data of the transmission of host computer 210, host computer 210 can be sent out The data sent are sent to the first home zone in the first attributed region in the first buffer memory device 224 and the second buffer memory device 225 Domain is stored.
At this point, another controller can also take over the control broken down even if failure has occurred in one of controller Device processed, not will cause cannot proceed normally read-write operation between host computer 210 and storage equipment 223.
After the troubleshooting of the first controller 221 or after the first controller 221 is changed to new controller, The data that one controller 221 can store before read failure in the first buffer memory device 224 and/or the second buffer memory device 225, from And data service quick recovery.
In another embodiment, if the first controller 221 and second controller 222 all break down, work as third Controller replaces the first controller 221, and after the 4th controller replaces second controller 222, third controller is set from the first caching Standby 224 and/or second first attributed region of buffer memory device 225 read the data stored before 221 failure of the first controller, the 4th Controller reads 222 event of second controller from the second attributed region of the first buffer memory device 224 and/or the second buffer memory device 225 The data stored before barrier, to restore data service.
Refering to Fig. 4, in order to further increase the reliability of data, buffer memory device 400 can be made (to can be above-mentioned One buffer memory device is also possible to the second buffer memory device) there is power-down protection.It is slow that only a mirror image data is stored in first Deposit equipment perhaps the second buffer memory device when correspondingly can only enable the first buffer memory device or the second buffer memory device with power down protect Protective function.If the first buffer memory device and the second buffer memory device all have a mirror image data, need that the first caching is enabled to set Standby and the second buffer memory device all has power-down protection.
In order to make buffer memory device 400 that there is power-down protection, in a kind of specific embodiment, buffer memory device 400 Including control chip 410, nonvolatile storage 420 and random access memory 430, control chip 410 is separately connected non-easy Lose memory 420 and random access memory 430.Wherein, a portion memory space conduct of nonvolatile storage 420 First space, another part memory space is as second space.A part of memory space of random access memory 430 is as One attributed region, a part of space is as the second attributed region.
When 400 power down of buffer memory device, control chip 410 takes from the first attributed region of random access memory 420 Data out, and the data taken out from the first attributed region are stored to the first space of nonvolatile storage 430, and, from Take out data in second attributed region of random access memory 420, and by the data taken out from the second attributed region storage to The second space of nonvolatile storage 430.
After buffer memory device 400 re-powers, control chip 410 takes out number from the first space of nonvolatile storage 430 According to, and by from the data convert that the first space is taken out to the first attributed region of random access memory 420, and, Cong Feiyi The second space for losing memory 430 takes out data, and by the data convert taken out from second space to random access memory Second attributed region, to restore data service.
In another specific embodiment, when 400 power down of buffer memory device, control chip 410 is deposited from arbitrary access Data are taken out in first attributed region of reservoir 420, the data to take out from the first attributed region add the first label, and will Data after adding the first label are stored into nonvolatile storage 430, and, return from the second of random access memory 420 Belong in region and take out data, the data to take out from the second attributed region add the second label, and will be after the second label of addition Data store into nonvolatile storage 430.
After buffer memory device 400 re-powers, control chip 410 takes out data from nonvolatile storage 430, and will be from It is the data convert of the first label to the first of random access memory 420 that label in data is taken out in nonvolatile storage 430 It will be the data convert of the second label to arbitrary access from label in data is taken out in nonvolatile storage 430 in attributed region In second attributed region of memory 430.
Refering to Fig. 5, nonvolatile storage and random access memory in buffer memory device 400, can also by magnetism with Machine memory 450 replaces, the fast feature of the existing random access memory access speed of magnetic RAM 450, and has non- The characteristics of volatile memory power down saves.
It is understood that only being said by taking two controllers and two buffer memory devices as an example in above embodiment Bright, in other implementations, the quantity of controller can be three or more, at this point, the ownership in buffer memory device is led The quantity in domain should also be increase accordingly, so that the corresponding ownership field of a controller.And the quantity of buffer memory device may be 4 A or more, the present invention is not especially limited.
It is a kind of flow chart of possible embodiment of date storage method of the present invention refering to Fig. 6, Fig. 6.Present embodiment It is described from the angle of storage system as shown in Figure 2.Understood incorporated by reference to Fig. 2, in the present embodiment, number Include the following steps: according to storage method
510: target data is selectively sent the first controller 221 or second controller 222 by host computer 210.
Any one controller hair of 210 property of can choose of host computer into the first controller 221 and second controller 222 Send target data.Since a data cannot be handled by two controllers simultaneously, so, mesh is provided in target data The attaching information of data is marked, controller can judge whether target data is to one's name handled according to this attaching information.If Target data is sent to the first controller 221 by host computer 210, then enters step 520;If host computer 210 is by target data It is sent to second controller 222, then enters step 540.
520: the first controllers 221 judge whether target data belongs to the first control according to the attaching information in target data The processing of device 221.
First controller 221 obtains attaching information after receiving target data from target data, and according to number of targets It is believed that breath judges whether to belong to the processing of the first controller 221.If it is the processing of the first controller 221 is belonged to, 530 are entered step; If being not belonging to the processing of the first controller 221, it is transmitted to second controller 222, and enter step 540.
530: the first controllers 221 by target data be sent in the first buffer memory device 224 or the second buffer memory device 225 into Row storage is to obtain the first mirror image data.
First controller 221 can choose for target data to be sent in the first buffer memory device 224 and store to obtain First mirror image data, also can choose for target data to be sent in the second buffer memory device 225 and stores to obtain the first mirror As data.In a specific embodiment, the first buffer memory device 224 and the second buffer memory device 225 are both provided with the first ownership Region and the second attributed region.Wherein, the attribute of the first attributed region are as follows: the first controller 221 can to the first attributed region It is read and write operation, second controller 222, which can be read the first attributed region but not can be carried out, writes behaviour Make.The attribute of second attributed region are as follows: second controller 222 can be read to the second attributed region and write operation, the One controller 221 can be read the second attributed region but not can be carried out write operation.So the first controller 221 will Target data is sent to the first attributed region of a buffer memory device in the first buffer memory device 224 and the second buffer memory device 225 It is stored to obtain the first mirror image data.Then, return step 510, until needing to arrive the data storage in buffer memory device When storing equipment 223,560 are entered step.
540: second controller 222 judges whether target data belongs to the second control according to the attaching information in target data The processing of device 222.
Second controller 222 obtains attaching information after receiving target data from target data, and according to number of targets It is believed that breath judges whether to belong to the processing of second controller 222.It is handled if it is second controller 222 is belonged to, enters step 550; If being not belonging to the processing of second controller 222, forward target data to the first controller 221, and enter step 520.
550: second controller 222 by target data be sent in the first buffer memory device 224 or the second buffer memory device 225 into Row storage is to obtain the first mirror image data.
Second controller 222 can choose for target data to be sent in the first buffer memory device 224 and store to obtain First mirror image data, also can choose for target data to be sent in the second buffer memory device 225 and stores to obtain the first mirror As data.In a specific embodiment, target data is sent to the first buffer memory device 224 and by second controller 222 Second attributed region of a buffer memory device in two buffer memory devices 225 is stored to obtain the first mirror image data.Then, it returns Step 510 is returned, until needing the data storage in buffer memory device entering step 560 to when storing equipment 223.
560: the first controllers 221 and second controller 222 are by the first buffer memory device 224 and the second buffer memory device 225 In data storage to storage equipment 223 in.
Need by buffer memory device data storage to storage equipment 223 when, for example, the data in buffer memory device reach Threshold value or host computer 210 give an order by buffer memory device data storage to storage equipment 223 when, 221 meeting of the first controller By the data storage handled by the first controller 221 in the first buffer memory device 224 and the second buffer memory device 225 to storage In equipment 223.Second controller 222 also can by the first buffer memory device 224 and the second buffer memory device 225 by second controller In data storage to the storage equipment 223 of 222 processing.
It is appreciated that if non-catastrophic failure, the first controller 221 and second occur for the first buffer memory device 224 Data in first buffer memory device 224 can be transferred to the second buffer memory device 225 by controller 222, on the contrary, if the second caching Equipment 225 breaks down, then the first controller 221 and second controller 222 can be by the data in the second buffer memory device 225 It is transferred to the first buffer memory device 224, to improve the safety of data.
By implementing the embodiment of the present invention, can in addition buffer memory device be set and mirror image data is stored in buffer memory device In, then controller is not necessarily to provide memory space for mirror image data, to reduce the requirement to controller memory size.Moreover, mirror As data do not need to be transmitted by PCIe/IB (nfiniband) access, then it can mitigate PCIe/IB (nfiniband) access Data transmission pressure.Finally, the load of controller reduces, and even if one of controller is when something goes wrong, controller It will not be forced to write the data directly into storage equipment because of overload of power, to substantially increase the speed of reading and writing data Degree.
Moreover, the first controller, which cannot be write, belongs to the second attributed region that second controller can be write, second controller is not It can write and belong to the first attributed region that the first controller can be write, that is, the first controller and second controller can carry out writing behaviour The memory space of work is independent of each other, and can prevent two different controllers from carrying out write operation to same storage unit simultaneously Conflict caused by and.
It is the flow chart of the alternatively possible embodiment of date storage method of the present invention refering to Fig. 7, Fig. 7.This embodiment party Formula is described from the angle of storage system as shown in Figure 2.Understood incorporated by reference to Fig. 2, in the present embodiment, Date storage method includes the following steps:
610: target data is selectively sent the first controller 221 or second controller 222 by host computer 210.
Any one controller hair of 210 property of can choose of host computer into the first controller 221 and second controller 222 Send target data.Since a data cannot be handled by two controllers simultaneously, so, mesh is provided in target data The attaching information of data is marked, controller can judge whether target data is to one's name handled according to this attaching information.If Target data is sent to the first controller 221 by host computer 210, then enters step 620;If host computer 210 is by target data It is sent to second controller 222, then enters step 650.
620: the first controllers 221 judge whether target data belongs to the first control according to the attaching information in target data The processing of device 221.
First controller 221 obtains attaching information after receiving target data from target data, and according to number of targets It is believed that breath judges whether to belong to the processing of the first controller 221.If it is the processing of the first controller 221 is belonged to, 630 are entered step; If being not belonging to the processing of the first controller 221, it is transmitted to second controller 222, and enter step 640.
Target data is sent in the first buffer memory device 224 and stores to obtain first by 630: the first controllers 221 Mirror image data.
Target data is sent in the first buffer memory device 224 and stores to obtain the first mirror image by the first controller 221 Data.In a specific embodiment, the first buffer memory device 224 is provided with the first attributed region and the second attributed region. Wherein, the attribute of the first attributed region are as follows: the first controller 221 can be read to the first attributed region and write operation, Second controller 222 can be read the first attributed region but not can be carried out write operation.The attribute of second attributed region Are as follows: second controller 222 can be read to the second attributed region and write operation, and the first controller 221 belongs to second Region can be read but not can be carried out write operation.So target data is sent to the first caching by the first controller 221 First attributed region of equipment 224 is stored to obtain the first mirror image data.
Target data is sent in the second buffer memory device 225 and stores to obtain second by 640: the first controllers 221 Mirror image data.
Target data is sent in the second buffer memory device 225 and stores to obtain the second mirror image by the first controller 221 Data.In a specific embodiment, target data is sent to the first of the second buffer memory device 225 by the first controller 221 Attributed region is stored to obtain the second mirror image data.Then, return step 610, until needing the number in buffer memory device According to storage to when storing equipment 223,680 are entered step.
650: second controller 222 judges whether target data belongs to the second control according to the attaching information in target data The processing of device 222.
Second controller 222 obtains attaching information after receiving target data from target data, and according to number of targets It is believed that breath judges whether to belong to the processing of second controller 222.It is handled if it is second controller 222 is belonged to, enters step 660; If being not belonging to the processing of second controller 222, forward target data to the first controller 221, and enter step 620.
660: target data is sent in the first buffer memory device 224 and stores to obtain first by second controller 222 Mirror image data.
Target data is sent in the first buffer memory device 224 and stores to obtain the first mirror image by second controller 222 Data.In a specific embodiment, target data is sent to the second of the first buffer memory device 224 by second controller 222 Attributed region is stored to obtain the first mirror image data.
670: target data is sent in the second buffer memory device 225 and stores to obtain second by second controller 222 Mirror image data.
Target data is sent in the second buffer memory device 225 and stores to obtain the second mirror image by second controller 222 Data.In a specific embodiment, target data is sent to the second of the second buffer memory device 225 by second controller 222 Attributed region is stored to obtain the second mirror image data.Then, return step 610, until needing the number in buffer memory device According to storage to when storing equipment 223,680 are entered step.
680: the first controllers 221 and second controller 222 are by the first buffer memory device 224 and the second buffer memory device 225 In data storage to storage equipment 223 in.
Need by buffer memory device data storage to storage equipment 223 when, for example, the data in buffer memory device reach Threshold value or host computer 210 give an order by buffer memory device data storage to storage equipment 223 when, 221 meeting of the first controller By the data storage handled by the first controller 221 in the first buffer memory device 224 and the second buffer memory device 225 to storage In equipment 223.Second controller 222 also can by the first buffer memory device 224 and the second buffer memory device 225 by second controller In data storage to the storage equipment 223 of 222 processing.
In the present embodiment, after the first controller 221 receives target data transmitted by host computer 210, in addition to inciting somebody to action Target data is sent to the first buffer memory device 224 and is stored to obtain outside the first mirror image data, and the first controller 221 can be with Target data is sent in the second buffer memory device 225 and is stored, to obtain the second mirror image data.At this point, the first caching Respectively there are a data in equipment 224 and the second buffer memory device 225, even if asking occur in the data in one of buffer memory device Topic, there are also the data in another buffer memory device can be used, to greatly improve the reliability of data.
When the first controller 221 breaks down, the in the first buffer memory device 224 can be read by second controller 222 The data in the first attributed region in one attributed region and the second buffer memory device 225, and in storage to storage equipment 223; After second controller 222 receives the data of the transmission of host computer 210, first can be sent by the data that host computer 210 is sent First attributed region is stored in the first attributed region and the second buffer memory device 225 in buffer memory device 224.
At this point, another controller can also take over the control broken down even if failure has occurred in one of controller Device processed, not will cause cannot proceed normally read-write operation between host computer 210 and storage equipment 223.
After the troubleshooting of the first controller 221 or after the first controller 221 is changed to new controller, The data that one controller 221 can store before read failure in the first buffer memory device 224 and/or the second buffer memory device 225, from And data service quick recovery.
It is understood that if the first controller 221 and second controller 222 all break down, when third controller Replace the first controller 221, after the 4th controller replaces second controller 222, third controller is from the first buffer memory device 224 And/or second first attributed region of buffer memory device 225 read the data that store before 221 failure of the first controller, the 4th control Device is before the second attributed region of the first buffer memory device 224 and/or the second buffer memory device 225 reading 222 failure of second controller The data of storage, to restore data service.
Refering to Fig. 4, in order to further increase the reliability of data, buffer memory device 400 can be made (to can be above-mentioned One buffer memory device is also possible to the second buffer memory device) there is power-down protection.It is slow that only a mirror image data is stored in first Deposit equipment perhaps the second buffer memory device when correspondingly can only enable the first buffer memory device or the second buffer memory device with power down protect Protective function.If the first buffer memory device and the second buffer memory device all have a mirror image data, need that the first caching is enabled to set Standby and the second buffer memory device all has power-down protection.
In order to make buffer memory device 400 that there is power-down protection, in a kind of specific embodiment, buffer memory device 400 Including control chip 410, nonvolatile storage 420 and random access memory 430, control chip 410 is separately connected non-easy Lose memory 420 and random access memory 430.Wherein, a portion memory space conduct of nonvolatile storage 420 First space, another part memory space is as second space.A part of memory space of random access memory 430 is as One attributed region, a part of space is as the second attributed region.
When 400 power down of buffer memory device, control chip 410 takes from the first attributed region of random access memory 420 Data out, and the data taken out from the first attributed region are stored to the first space of nonvolatile storage 430, and, from Take out data in second attributed region of random access memory 420, and by the data taken out from the second attributed region storage to The second space of nonvolatile storage 430.
After buffer memory device 400 re-powers, control chip 410 takes out number from the first space of nonvolatile storage 430 According to, and by from the data convert that the first space is taken out to the first attributed region of random access memory 420, and, Cong Feiyi The second space for losing memory 430 takes out data, and by the data convert taken out from second space to random access memory Second attributed region, to restore data service.
In another specific embodiment, when 400 power down of buffer memory device, control chip 410 is deposited from arbitrary access Data are taken out in first attributed region of reservoir 420, the data to take out from the first attributed region add the first label, and will Data after adding the first label are stored into nonvolatile storage 430, and, return from the second of random access memory 420 Belong in region and take out data, the data to take out from the second attributed region add the second label, and will be after the second label of addition Data store into nonvolatile storage 430.
After buffer memory device 400 re-powers, control chip 410 takes out data from nonvolatile storage 430, and will be from It is the data convert of the first label to the first of random access memory 420 that label in data is taken out in nonvolatile storage 430 It will be the data convert of the second label to arbitrary access from label in data is taken out in nonvolatile storage 430 in attributed region In second attributed region of memory 430.
Refering to Fig. 5, nonvolatile storage and random access memory in buffer memory device 400, can also by magnetism with Machine memory 450 replaces, the fast feature of the existing random access memory access speed of magnetic RAM 450, and has non- The characteristics of volatile memory power down saves.
It is understood that only being said by taking two controllers and two buffer memory devices as an example in above embodiment Bright, in other implementations, the quantity of controller can be three or more, at this point, the ownership in buffer memory device is led The quantity in domain should also be increase accordingly, so that the corresponding ownership field of a controller.And the quantity of buffer memory device may be 4 A or more, the present invention is not especially limited.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with Relevant hardware is instructed to complete by computer program, the program can be stored in a computer-readable storage medium In, the program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, the storage medium can be magnetic Dish, CD, read-only memory (Read-Only Memory, ROM) or random access memory (Random Access Memory, RAM) etc..
Above disclosed is only a preferred embodiment of the present invention, cannot limit the power of the present invention with this certainly Sharp range, those skilled in the art can understand all or part of the processes for realizing the above embodiment, and weighs according to the present invention Benefit requires made equivalent variations, still belongs to the scope covered by the invention.

Claims (10)

1. a kind of date storage method, which is characterized in that the described method includes:
First controller receives target data, and the target data includes being used to indicate the control for needing to handle the target data The attaching information of device;
When the attaching information of the target data is first controller, first controller deposits the target data Storage to the first buffer memory device to obtain the first mirror image data, wherein first controller respectively with first buffer memory device It is connected with storage equipment, first buffer memory device is used to store the mirror image data of first controller;
When needing to store the data in the first buffer memory device to the storage equipment, first controller is by described first Being deposited comprising being stored by the data after first controller processing to described including the target data in buffer memory device Store up equipment.
2. method according to claim 1, which is characterized in that first buffer memory device includes the first attributed region, described First controller can be read to the first attributed region in first buffer memory device and write operation;Then described first Controller stores the target data to the first buffer memory device to obtain the first mirror image data, comprising:
First controller stores the target data to the first attributed region of the first buffer memory device.
3. method according to claim 1 or claim 2, which is characterized in that first controller is also connected with the second buffer memory device, institute The second buffer memory device is stated for memory image data, two buffer memory device includes the second attributed region, second home zone Domain is used to store the mirror image data of first controller, the method also includes:
First controller sends the target device to the second buffer memory device to obtain the second mirror image data, second mirror As data are stored to second attributed region of second buffer memory device.
4. according to claim 1 to method described in any claim in 3, which is characterized in that first controller also with Second controller is connected, and when first controller breaks down, the second controller modifies first buffer memory device In the first attributed region attribute are as follows: the second controller in first buffer memory device the first attributed region and The first attributed region in second buffer memory device can be read and write operation;
The second controller is read in the first attributed region and second buffer memory device in first buffer memory device The first attributed region in data, and store to the storage equipment;
After the second controller receives the data of host computer transmission, described the can be sent by the data that host computer is sent The first attributed region in one buffer memory device is stored.
5. according to claim 1 to method described in any claim in 3, which is characterized in that when first controller is sent out Raw failure, and when third controller replacement first controller, the third controller is from first buffer memory device First attributed region reads the data of the first controller storage to restore data service.
6. a kind of storage system, which is characterized in that including the first controller, storage equipment and the first buffer memory device, described first Controller is connected with first buffer memory device and storage equipment respectively, and first buffer memory device is for storing first control The mirror image data of device processed;
First controller, for receiving target data, the target data includes being used to indicate to need to handle the target The attaching information of the controller of data;When the attaching information of the target data is first controller, by the target Data are stored to first buffer memory device to obtain the first mirror image data, wherein first controller is respectively with described One buffer memory device is connected with storage equipment, and first buffer memory device is used to store the mirror image data of first controller;With And when needing to store the data in the first buffer memory device to the storage equipment, by the packet in first buffer memory device Containing being stored by the data after first controller processing to the storage equipment including the target data.
7. storage system according to claim 6, which is characterized in that first buffer memory device includes the first home zone Domain, first controller can be read to the first attributed region in first buffer memory device and write operation;
First controller is also used to store the target data to the first attributed region of the first buffer memory device.
8. storage system according to claim 6 or 7, which is characterized in that first controller is also connected with the second caching Equipment, second buffer memory device are also used for memory image data, and two buffer memory device includes the second attributed region, and described the Two attributed regions are used to store the mirror image data of first controller;
First controller is also used to send the target device to the second buffer memory device to obtain the second mirror image data, institute State second attributed region that the second mirror image data is stored in second buffer memory device.
9. according to the storage system any in claim 6 to 8, which is characterized in that the storage system further includes second Controller;
The second controller, for when first controller breaks down, the second controller to modify described first The attribute of the first attributed region in buffer memory device and the first attributed region in second buffer memory device are as follows: described second Controller is to the first attributed region in the first attributed region and second buffer memory device in first buffer memory device It can be read and write operation;It reads the first attributed region in first buffer memory device and second caching is set The data in the first attributed region in standby, and store to the storage equipment;It, can be with after the data for receiving host computer transmission The first attributed region that the data that host computer is sent are sent in first buffer memory device is stored.
10. the storage system according to any claim in claim 6 to 9, which is characterized in that the storage system is also Including third controller;
The third controller, for breaking down when first controller, and third controller replacement first control When device, the data of the first controller storage are read to restore data from the first attributed region in first buffer memory device Business.
CN201910108023.7A 2015-08-07 2015-08-07 Data storage method and storage system Active CN109783401B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910108023.7A CN109783401B (en) 2015-08-07 2015-08-07 Data storage method and storage system

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910108023.7A CN109783401B (en) 2015-08-07 2015-08-07 Data storage method and storage system
CN201510478475.6A CN106445840B (en) 2015-08-07 2015-08-07 Date storage method and storage system

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
CN201510478475.6A Division CN106445840B (en) 2015-08-07 2015-08-07 Date storage method and storage system

Publications (2)

Publication Number Publication Date
CN109783401A true CN109783401A (en) 2019-05-21
CN109783401B CN109783401B (en) 2023-11-10

Family

ID=57984058

Family Applications (2)

Application Number Title Priority Date Filing Date
CN201910108023.7A Active CN109783401B (en) 2015-08-07 2015-08-07 Data storage method and storage system
CN201510478475.6A Active CN106445840B (en) 2015-08-07 2015-08-07 Date storage method and storage system

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN201510478475.6A Active CN106445840B (en) 2015-08-07 2015-08-07 Date storage method and storage system

Country Status (2)

Country Link
CN (2) CN109783401B (en)
WO (1) WO2017024951A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11722436B2 (en) 2021-08-24 2023-08-08 International Business Machines Corporation Transport control word architecture for physical port mirroring

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110928495B (en) * 2019-11-12 2023-09-22 杭州宏杉科技股份有限公司 Data processing method and device on multi-control storage system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090132765A1 (en) * 2007-11-21 2009-05-21 Inventec Corporation Dual controller storage apparatus and cache memory mirror method thereof
CN102081584A (en) * 2009-11-30 2011-06-01 英业达股份有限公司 Cache mirror system and method of dual-controller storage system
CN102782661A (en) * 2012-05-18 2012-11-14 华为技术有限公司 Data storage system and method
CN103959253A (en) * 2011-12-01 2014-07-30 英特尔公司 Hardware based memory migration and resilvering
CN104461935A (en) * 2014-11-27 2015-03-25 华为技术有限公司 Method, device and system for data storage

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE602006020709D1 (en) * 2005-04-20 2011-04-28 Axxana Israel Ltd REMOTE DATA MIRROR SYSTEM
CN101354633B (en) * 2008-08-22 2010-09-22 杭州华三通信技术有限公司 Method for improving writing efficiency of virtual storage system and virtual storage system thereof
CN101840309B (en) * 2009-10-28 2011-10-26 创新科存储技术有限公司 Access control method and system of double control disk array in multipath environment
WO2015054897A1 (en) * 2013-10-18 2015-04-23 华为技术有限公司 Data storage method, data storage apparatus, and storage device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090132765A1 (en) * 2007-11-21 2009-05-21 Inventec Corporation Dual controller storage apparatus and cache memory mirror method thereof
CN102081584A (en) * 2009-11-30 2011-06-01 英业达股份有限公司 Cache mirror system and method of dual-controller storage system
CN103959253A (en) * 2011-12-01 2014-07-30 英特尔公司 Hardware based memory migration and resilvering
CN102782661A (en) * 2012-05-18 2012-11-14 华为技术有限公司 Data storage system and method
CN104461935A (en) * 2014-11-27 2015-03-25 华为技术有限公司 Method, device and system for data storage

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11722436B2 (en) 2021-08-24 2023-08-08 International Business Machines Corporation Transport control word architecture for physical port mirroring
TWI813383B (en) * 2021-08-24 2023-08-21 美商萬國商業機器公司 Transport control word architecture for physical port mirroring

Also Published As

Publication number Publication date
CN106445840B (en) 2019-03-01
WO2017024951A1 (en) 2017-02-16
CN109783401B (en) 2023-11-10
CN106445840A (en) 2017-02-22

Similar Documents

Publication Publication Date Title
CN100383749C (en) Remote copy method and remote copy system
US10142435B2 (en) Method, device and computer storage medium for implementing interface cache dynamic allocation
CN103092778B (en) A kind of buffer memory mirror method of storage system
CN106878164B (en) Message transmission method and device
CN106557446A (en) Bus system
CN104216805B (en) A kind of high-end disk array rear end disk chassis link failure protection system and method
CN107038075B (en) Message queue system and method for realizing message communication
US9424892B2 (en) Storage device to which memory device are connectable in multiple stages
CN106445840B (en) Date storage method and storage system
CN102999399B (en) The method and apparatus that a kind of JBOD array is automatically renewed
CN107329859A (en) A kind of data guard method and storage device
CN107766181A (en) A kind of dual controller storage High Availabitity subsystem based on PCIe non-transparent bridges
KR101912393B1 (en) Network device and interrupt management method of the network device
CN103197997A (en) Information processing apparatus and operation status monitoring method
CN100586101C (en) Switching between layer 2 switches as destination
CN104394012B (en) Cluster routers, MPU and its failure determination method, sensing controller
CN101330404A (en) Method, system and equipment for managing network appliance port state
CN106409337A (en) eMMC control method and FPGA-based eMMC controller
CN108234465A (en) Abnormal redundancy approach and device are coped in a kind of distributed file system
CN107678891A (en) The dual control method, apparatus and readable storage medium storing program for executing of a kind of storage system
JP6517474B2 (en) Programmable controller and arithmetic processing system
CN103049218B (en) Date storage method and controller
EP3392762B1 (en) Store merge device, information processing device, store control method, and recording medium for recording computer program
CN109274609A (en) A kind of port setting method, device, network board and readable storage medium storing program for executing
CN105721181A (en) Method of message transmission, backbone switch and access switch

Legal Events

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