CN108664354A - A kind of data image method and storage system - Google Patents
A kind of data image method and storage system Download PDFInfo
- Publication number
- CN108664354A CN108664354A CN201710214894.8A CN201710214894A CN108664354A CN 108664354 A CN108664354 A CN 108664354A CN 201710214894 A CN201710214894 A CN 201710214894A CN 108664354 A CN108664354 A CN 108664354A
- Authority
- CN
- China
- Prior art keywords
- mirror
- controller
- cache
- local
- capacity
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1415—Saving, restoring, recovering or retrying at system level
- G06F11/142—Reconfiguring to eliminate the error
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1415—Saving, restoring, recovering or retrying at system level
- G06F11/1443—Transmit or communication errors
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Memory System Of A Hierarchy Structure (AREA)
Abstract
A kind of data image method of offer of the embodiment of the present invention and storage system, in data image method provided in an embodiment of the present invention and storage system, after local controller receives target data, when determining that the data volume of target data is more than the idle capacity of the mirror cache pre-saved, capacity adjust request is sent to mirror controller.Mirror controller adjusts the idle capacity of mirror cache according to capacity adjust request, and the idle capacity after adjustment is sent to local controller by mirror controller.After local controller receives the idle capacity after adjustment, target data is sent to mirror controller to store target data.The embodiment of the present invention is determining that the idle capacity of the mirror cache pre-saved is insufficient, the idle capacity that capacity adjust request adjusts mirror cache to mirror controller is sent, the idle capacity of the mirror cache after adjustment ensures that mirror controller can store the target data of local controller transmission in time.
Description
Technical field
The present embodiments relate to technical field of memory more particularly to a kind of data image methods and storage system.
Background technology
In mirror-image system, local controller is communicated to connect with host and mirror controller respectively, local controller and mirror
Picture controller all includes caching, each caching includes mirror cache and local cache, the mirror cache of each caching
Capacity ratio with the local cache is fixed.The flow of designed in mirror image is that local controller receives host transmission
After target data, application distributes the spatial cache in the local cache of its own, and sends the target data to mirror image and control
Device;After the mirror controller receives the target data, application distributes the spatial cache in the mirror cache of its own, will
The target data is stored to the spatial cache in the mirror cache of its own, is sent mirror image and is completed message to local control
Device, then local controller store in the target data to the spatial cache of the local cache of its own.Using above-mentioned image
Design, the local cache of local controller and the mirror cache of mirror controller store host and are sent to the local control respectively
The target data of device processed realizes mirror image of the target data in different controllers.
In practical application scene, the mirror controller may receive one or more parts target data simultaneously, per a
Target data is the target data that local controller is once sent.Mirror controller receive one or more parts target data it
Afterwards, in the mirror cache of the mirror controller, if idle capacity is less, the idle capacity of mirror controller application distribution
A part of data being simply possible to use in storage one or more parts target data.Based on the mirror cache in existing mirror controller
Configuration, mirror controller cannot be guaranteed that received all target datas can timely complete mirror image.
Invention content
The present invention provides a kind of data image method and storage systems, are received to avoid mirror controller all
Target data cannot timely complete mirror image.
In a first aspect, providing a kind of data image method, the method is applied in storage system, the storage system packet
Local controller and mirror controller are included, wherein local controller includes local cache, and the mirror controller includes that mirror image is slow
It deposits, the method includes:After the local controller receives target data, determine that the data volume of the target data is more than described
When the idle capacity of the mirror cache pre-saved, the local controller sends capacity adjustment to the mirror controller
Request;The mirror controller adjusts the idle capacity of the mirror cache according to the capacity adjust request;The mirror image control
Idle capacity after the adjustment is sent to the local controller by device processed;After the local controller receives the adjustment
After idle capacity, the target data is sent to the mirror controller to store the target data.
In this application, local controller determines the mirror image pre-saved before sending target data to mirror controller
The idle capacity of caching is adequately used with determining the not used mirror image resources of local controller ensuring that local controller has
After mirror image resources to store target data, target data is just sent to mirror controller, avoids mirror controller that from cannot storing
The target data that local controller is sent.If the data volume of the target data is more than that the mirror image pre-saved is slow
The idle capacity deposited then sends capacity adjust request according to the capacity adjust request, to adjust institute to the mirror controller
The idle capacity of mirror cache is stated, and then ensures that mirror controller provides for local controller and is adequately used for storing target data
Mirror image resources, in time store local controller send target data.
With reference to first aspect, in the first realization method, the method further includes:Described in the local controller judges
The data volume of target data whether be more than the adjustment after the mirror cache idle capacity;When the number of the target data
When according to the idle capacity for being less than the mirror cache after the adjustment, the local controller is sent out to the mirror controller
Send the target data;The mirror controller receives the target data, and the mirror image is written in the target data and is delayed
It deposits;The local controller writes the target data after receiving the mirror image that the mirror controller is sent and completing message
Enter in the local cache.Local controller described in present embodiment judges that the data of the target data are less than the tune
When the idle capacity of the mirror cache after whole, the target data is sent to the mirror controller, it is ensured that mirror image control
All target datas that device processed receives can store in time.After mirror controller stores target data in time, mirror image is sent
Message is completed to local controller to store in target data to the local cache of local controller, is reduced because of mirror controller
Cannot target data be stored in time and send out mirror image in time and complete message, cause local controller that cannot timely preserve number of targets
According to the problems in local cache, reduce the target data to be saved such as local controller to the stand-by period of local cache.
With reference to first aspect or the first realization method of first aspect, in second of realization method, the mirror image
Controller further includes host caches;The idle capacity of the adjustment mirror cache includes:The mirror controller will be described
Still not used free space distributes to the mirror cache in host caches, and the capacity of the remaining space of the host caches is still
The service request that can so support the host communicated with the mirror controller to send.It is slow by the host for distributing mirror controller
The free space deposited takes full advantage of the idle resource of host caches, the mirror of local controller is replenished in time to mirror cache
As resource, to ensure that mirror controller stores the target data of local controller transmission in time.
With reference to first aspect or the first realization method of first aspect, in the third realization method, the mirror image
Further include before the idle capacity that controller adjusts the mirror cache:The mirror controller counts the mirror controller
The idle capacity of caching, the idle capacity of the caching of the mirror controller include the mirror cache idle capacity and
The sum of the idle capacity of the host caches;The mirror controller is according to special ratios and the mirror image counted
The idle capacity of the caching of controller determines the idle capacity of the mirror cache after the adjustment.By distributing mirror image control
The free space of the caching of device takes full advantage of the idle resource of caching, local controller is replenished in time to mirror cache
Mirror image resources, to ensure that mirror controller stores the target data of local controller transmission in time.
With reference to first aspect or first aspect the first to any one of the third realization method realization method,
In 4th kind of realization method, the storage system further includes hard disk, and the local controller is sent to the mirror controller to be held
Further include before amount adjust request:The local controller judges whether to meet preset condition.
The 4th kind of realization method with reference to first aspect, in the 5th kind of realization method, the preset condition includes:It is described
Local controller is not received by the write-in success message that the hard disk is sent, said write success within the preset period
The data that message is used to indicate in the local cache are successfully written into the hard disk.
The 4th kind of realization method with reference to first aspect, in the 6th kind of realization method, the local cache includes
Wait for queue, the method further includes that the corresponding write instruction of the target data is stored in the waiting list, described etc.
It waits for also preserving other write instructions in queue, the preset condition includes:The waiting list within the preset period
In the numbers of all write instructions reach predetermined threshold value.
With reference to first aspect or first aspect the first to any one of the 6th kind of realization method realization method,
In seven kinds of realization methods, the method further includes:The local controller updates the idle capacity of the mirror cache, it is described more
The idle capacity of mirror cache after new is that the idle capacity of the mirror cache before update subtracts the number of the target data
According to amount.After the mirrored storage for completing target data, after target data is copied to hard disk by local controller, deleted by sending
The message of data, notice mirror controller delete the data in mirror cache, have then recycled occupied part in mirror cache
Memory space, sends the response message for deleting data, and notice local controller recycles mirror image resources, realizes the cycle of mirror image resources
It utilizes.
Second aspect, provides a kind of storage system, and the storage system includes local controller and mirror controller, described
Local controller and mirror controller communication connection, wherein local controller includes local cache, the mirror controller
Including mirror cache;The local controller determines that the data volume of the target data is more than institute after receiving target data
When stating the idle capacity of the mirror cache pre-saved, capacity adjust request is sent to the mirror controller;The mirror
As controller, for according to the capacity adjust request, adjusting the idle capacity of the mirror cache;The mirror controller,
It is additionally operable to the idle capacity after the adjustment being sent to the local controller;The local controller is additionally operable to receive institute
After stating the idle capacity after adjustment, the target data is sent to the mirror controller to store the target data.
In this application, local controller determines the mirror image pre-saved before sending target data to mirror controller
The idle capacity of caching is adequately used with determining the not used mirror image resources of local controller ensuring that local controller has
After mirror image resources to store target data, target data is just sent to mirror controller, avoids mirror controller that from cannot storing
The target data that local controller is sent.If the data volume of the target data is more than that the mirror image pre-saved is slow
The idle capacity deposited then sends capacity adjust request according to the capacity adjust request, to adjust institute to the mirror controller
The idle capacity of mirror cache is stated, and then ensures that mirror controller provides for local controller and is adequately used for storing target data
Mirror image resources, in time store local controller send target data.
In conjunction with second aspect, in the first realization method, the local controller is additionally operable to judge the target data
Data volume whether be more than the adjustment after the mirror cache idle capacity;When the data of the target data are less than
When the idle capacity of the mirror cache after the adjustment, the local controller is additionally operable to send out to the mirror controller
Send the target data;The mirror controller is additionally operable to receive the target data, and will be described in target data write-in
Mirror cache;The local controller is additionally operable to after receiving the mirror image that the mirror controller is sent and completing message, by institute
Target data is stated to be written in the local cache.Local controller described in present embodiment judges the data of the target data
When being less than the idle capacity of the mirror cache after the adjustment, the target data is sent to the mirror controller,
Ensure that all target datas that mirror controller receives can store in time.Mirror controller stores target data in time
Afterwards, it sends mirror image and completes message to local controller to store in target data to the local cache of local controller, reduce
Mirror image completion message is sent out in time because mirror controller cannot store target data in time, causes local controller timely
Preservation target data the problems in local cache, reduce the target data to be saved such as local controller to local cache
Stand-by period.
In conjunction with the first of second aspect or second aspect realization method, in second of realization method, the mirror image control
Device processed further includes host caches;The mirror controller is additionally operable to still not used free space in the host caches point
Mirror cache described in dispensing, the capacity of the remaining space of the host caches remain able to support to communicate with the mirror controller
Host send service request.By distribute mirror controller host caches free space to mirror cache, abundant profit
With the idle resource of host caches, the mirror image resources of local controller is replenished in time, to ensure that mirror controller is deposited in time
Store up the target data that local controller is sent.
In conjunction with the first of second aspect or second aspect realization method, in the third realization method, the mirror image control
Device processed is additionally operable to count the idle capacity of the caching of the mirror controller, the free time of the caching of the mirror controller
Capacity includes the idle capacity of the mirror cache and the sum of the idle capacity of the host caches;The mirror controller, also
After determining the adjustment according to the idle capacity of special ratios and the caching of the mirror controller counted
The mirror cache idle capacity.By distribute mirror controller caching free space to mirror cache, abundant profit
With the idle resource of caching, the mirror image resources of local controller is replenished in time, to ensure that mirror controller stores this in time
The target data that ground controller is sent.
In conjunction with the first of second aspect or second aspect to any one of the third realization method realization method,
In four kinds of realization methods, the storage system further includes hard disk, the local controller, is additionally operable to judge whether to meet default item
Part, after meeting preset condition, the local controller sends capacity adjust request to the mirror controller.
In conjunction with the 4th kind of realization method of second aspect, in the 5th kind of realization method, the local controller is additionally operable to
After being not received by the write-in success message that the hard disk is sent within the preset period, sent to the mirror controller
Capacity adjust request, the data that said write success message is used to indicate in the local cache are successfully written into the hard disk;
The preset condition includes:The local controller is not received by the write-in that the hard disk is sent within the preset period
Success message.
In conjunction with the 4th kind of realization method of second aspect, in the 6th kind of realization method, the local cache includes
Wait for that queue, the local controller are additionally operable to the corresponding write instruction of the target data being stored in the waiting list,
Other write instructions are also preserved in the waiting list;
The local controller is additionally operable within the preset period all write instructions in the waiting list
After number reaches predetermined threshold value, capacity adjust request is sent to the mirror controller, the preset condition includes:Advance
The number of all write instructions in the period of setting in the waiting list reaches predetermined threshold value.
In conjunction with the first of second aspect or second aspect to any one of the 6th kind of realization method realization method,
In seven kinds of realization methods, the local controller is additionally operable to update the idle capacity of the mirror cache, the updated mirror
The idle capacity of picture caching is that the idle capacity of the mirror cache before update subtracts the data volume of the target data.Complete
After the mirrored storage of target data, after target data is copied to hard disk by local controller, disappearing for data is deleted by transmission
Breath, notice mirror controller delete the data in mirror cache, have then recycled occupied part memory space in mirror cache,
The response message for deleting data is sent, notice local controller recycles mirror image resources, realizes recycling for mirror image resources.
In this application, local controller determines the mirror image pre-saved before sending target data to mirror controller
The idle capacity of caching is adequately used with determining the not used mirror image resources of local controller ensuring that local controller has
After mirror image resources to store target data, target data is just sent to mirror controller, avoids mirror controller that from cannot storing
All target datas that local controller is sent.If the data volume of the target data is more than the mirror pre-saved
As the idle capacity of caching, then capacity adjust request is sent according to the capacity adjust request, to adjust to the mirror controller
The idle capacity of the whole mirror cache, and then ensure that mirror controller provides for local controller and be adequately used for storing target
The mirror image resources of data stores the target data that local controller is sent in time.
Description of the drawings
In order to illustrate the technical solution of the embodiments of the present invention more clearly, required use in being described below to embodiment
Attached drawing be briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for this
For the those of ordinary skill of field, without creative efforts, others are can also be obtained according to these attached drawings
Attached drawing.
Fig. 1 is a kind of configuration diagram of mirror-image system provided in an embodiment of the present invention;
Fig. 2 is a kind of structural schematic diagram of local controller provided in an embodiment of the present invention;
Fig. 3 is a kind of structural schematic diagram of mirror controller provided in an embodiment of the present invention;
Fig. 4 is the configuration diagram of another mirror-image system provided in an embodiment of the present invention;
Fig. 5 is a kind of flow chart of data image method provided in an embodiment of the present invention;
Fig. 6 a are the structure chart of another storage system 600 provided in an embodiment of the present invention;
Fig. 6 b are the structure chart of another storage system 600 provided in an embodiment of the present invention;
Fig. 6 c are the structure chart of another storage system 600 provided in an embodiment of the present invention;
Fig. 6 d are the structure chart of another storage system 600 provided in an embodiment of the present invention.
Specific implementation mode
Below in conjunction with attached drawing, technical scheme in the embodiment of the invention is clearly and completely described.
Fig. 1 is referred to, Fig. 1 is a kind of configuration diagram of mirror-image system provided in an embodiment of the present invention.As shown in Figure 1,
Mirror-image system includes at least one host 110 and more than two controllers 120, each host 110 and each controller 120
Between can communicate, can also be communicated between each controller 120.Multiple main frames 110 can respectively be established with the same controller 120
Principal communication link, multiple main frames 110 also can establish principal communication link respectively from different controllers 120.Host 110 can be appointed
What computing device, such as server, desktop computer.Controller 120 can be any calculating device, as microcontroller, can
Programmable controller etc..
In mirror-image system, controller 120 divides for local controller and mirror controller, and principal communication is established with host 110
The controller of link be local controller, local controller select in addition to local controller, it is other any one or it is multiple
Controller is mirror controller.Principal communication link break down, either based on the considerations of load balancing or in user it is manual
In the case of selection, host 110 disconnects the principal communication link between local controller, and in addition to local controller, mirror
As other controllers in system establish principal communication link.Link between local controller and mirror controller breaks down,
Or local controller selects other controllers as new mirror controller based on the considerations of load balancing.It is more when existing
When a local controller, the mirror controller of each local controller selection, the mirror image with the selection of other local controllers
Controller differs.
The data storage method of mirror-image system is that local controller after the power is turned on, holds to mirror controller application is default in advance
The mirror image resources of amount, the mirror image resources of preset capacity are the idle capacity of the mirror cache pre-saved.Hold to default in application
After the mirror image resources of amount, if receiving the target data of the transmission of host 110, the data volume and local cache of target data are counted
In idle capacity, compare the data volume of the idle capacity and target data in local cache, if the free time in local cache
Capacity is more than the data volume of target data, and local controller compares the data volume of preset capacity and target data, if default hold
Amount shows that local controller has sufficient mirror image resources more than or equal to the data volume of target data.Then, local controller
Target data is sent to mirror controller, mirror controller receives and stores target data, and mirror controller stores target data
Later, mirror image can be fed back and complete message to local controller, then, local controller preserves target data to local controller
In local cache, and then realize mirror image of the target data in different controllers.Mirror image, which is received, in local controller completes message
Afterwards, preset capacity can be updated, updated preset capacity is the preset capacity before not updating, the target sent with host 110
The difference of the data volume of data.Therefore, preset capacity is variation, for indicating that the idle of mirror cache of mirror controller is held
Amount, and the mirror image resources for indicating local controller.
Local controller after the power is turned on, is in advance to the mode of the mirror image resources of mirror controller application preset capacity, local
Controller sends the request of application mirror image resources to mirror controller, applies for that the request of mirror image resources includes preset capacity;Mirror image
Controller compares the size of preset capacity and the idle capacity of the mirror cache of current mirror controller, when the free time of mirror cache
Capacity is more than or equal to preset capacity, the mirror controller feedback application successful response message of mirror image resources to local control
Device.Local controller receives the application successful response message of mirror image resources, show the mirror image resources application of local controller at
Work(.
Preset capacity is, the total capacity of the mirror cache of mirror controller or the mirror cache less than mirror controller
Total capacity.Preset capacity is all or part of of the idle capacity of the mirror cache of mirror controller.In mirror controller,
Be pre-configured with mirror cache total capacity account for mirror controller caching total amount half, the caching of mirror controller includes more
A capacity is standard-sized cache blocks, and the capacity product of quantity and standard size block by calculating cache blocks obtains mirror image
The total capacity of the caching of controller is the total capacity for multiple cache blocks that the caching of mirror controller includes.Therefore, can pass through
The quantity of cache blocks is counted, the total capacity of the corresponding multiple cache blocks of quantity is weighed.If necessary to count the slow of mirror controller
Deposit either mirror cache or local cache total capacity or idle capacity or occupy capacity, can count respectively caching or
The number of person's mirror cache total cache blocks that either local cache respectively includes or the number of the cache blocks of free time account for
The number of cache blocks, so weigh caching either the total capacity or idle capacity of mirror cache or local cache or
Occupy capacity.And preset capacity can be weighed by the predetermined number of cache blocks.
Fig. 2 is referred to, Fig. 2 is a kind of structural schematic diagram of local controller provided in an embodiment of the present invention.Such as Fig. 2 institutes
Show, the local controller 200 that present embodiment provides includes interface 210, processor 220 and caching 230, and caching 230 includes this
Ground caching 231 and mirror cache 232.Local cache 231 and mirror cache 232 respectively include multiple cache blocks.As shown in Fig. 2,
Interface 210, for being communicated with host 110.Processor 220 may be a central processing unit (English:central
Processingunit, CPU).Caching 230 may be memory bar either CD-ROM drive or hard disk, be realized for providing processor 220
The designed in mirror image code of designed in mirror image function is additionally operable to storage target data.
Specifically, interface 210, the target data sent for receiving host 110.
Processor 220, the data volume for counting the target data received from interface 210 are additionally operable to statistics local cache
231 and mirror cache 232 idle capacity.
Processor 220 is additionally operable to compare the sky of the data volume and local cache 231 of the target data received from interface 210
The size of not busy capacity.
Local cache 231, for storing the target data received from interface 210.
Processor 220 is additionally operable to send the request of application mirror image resources to mirror controller, is additionally operable to receive mirror image control
The successful response message of application mirror image resources of device feedback, applies for that the request of mirror image resources includes preset capacity.
Processor 220 is additionally operable to compare the size of the data volume and preset capacity of the target data of the reception of interface 210.When
The data volume for the target data that interface 210 receives is less than or equal to the size of preset capacity, sends the target received from interface 210
Data are to mirror controller.
Processor 220 is additionally operable in the case where local controller provides mirroring service for mirror controller, is received from mirror
The data sent as controller.
Mirror cache 232, in the case where local controller provides mirroring service for mirror controller, storing from mirror
The data sent as controller.
Fig. 3 is referred to, Fig. 3 is a kind of structural schematic diagram of mirror controller provided in an embodiment of the present invention.Such as Fig. 3 institutes
Show, the mirror controller 300 that present embodiment provides includes interface 310, processor 320 and caching 330, and caching 330 includes master
Machine caching 331 and mirror cache 332.Host caches 331 and mirror cache 332 respectively include multiple cache blocks.As shown in figure 3,
Interface 310, be used for and host 110 (can be same host with the host 110 in the embodiment that is described based on Fig. 2, can also
It is different hosts) communication.Processor 320 may be a central processing unit (English:Central processing unit,
CPU).Caching 330 may be memory bar either CD-ROM drive or hard disk, and designed in mirror image function is realized for providing processor 320
Designed in mirror image code is additionally operable to storage target data.
Specifically, interface 310, for receive with mirror controller 300 establish principal communication link host 110 (with based on
Fig. 2 description embodiment in host 110 can be same host, can also be different hosts) send data.
Interface 310 is additionally operable to receive the target data that local controller 200 is sent.
Host caches 331, for store with mirror controller 300 establish principal communication link host 110 (with based on Fig. 2
Host 110 in the embodiment of description can be same host, can also be different hosts) send data.
Processor 320 is established the host 110 of principal communication link with mirror controller 300 and (is retouched with based on Fig. 2 for preserving
Host 110 in the embodiment stated can be same host, can also be different hosts) send data.
Processor 320, the idle capacity for counting host caches 331 and mirror cache 332.
Processor 320 is additionally operable to receive the request for the application mirror image resources that local controller is sent, it is default to be additionally operable to comparison
The size of capacity and the idle capacity of mirror cache 332.When the idle capacity of mirror cache 332 is more than or equal to default hold
Amount, the feedback application successful response message of mirror image resources to local controller 200.
Processor 320, is additionally operable to preserve and is received from interface 310, the target data that is sent from local controller 200.
Mirror cache 332, the target data for storing the transmission of local controller 200.
Fig. 4 is referred to, Fig. 4 is the configuration diagram of another mirror-image system provided in an embodiment of the present invention.Such as Fig. 4 institutes
Show, in the present embodiment, by taking the mirror-image system comprising two hosts and two controllers as an example, illustrates in mirror-image system field
Data image method.The mirror-image system that present embodiment provides includes host 410, host 411, local controller 420, mirror image
Controller 430 and hard disk 440 establish principal communication link, host 411 and mirror image control between host 410 and local controller 420
Device 430 establishes principal communication link, is communicated between local controller 420 and hard disk 440, local controller 410 and mirror controller
It is communicated between 420, mirror controller 420 is that local controller 410 provides mirroring service.
User by host 410 send target data to before local controller 420 or local controller after the power is turned on,
Local controller 420 pre-saves the idle capacity of the mirror cache 332 of mirror controller 430.Data about mirror-image system
The other details of storage mode are referred to, based on the description of mirror-image system shown in FIG. 1, repeat no more herein.
Fig. 5 is referred to, Fig. 5 is a kind of flow chart of data image method provided in an embodiment of the present invention.As shown in figure 5,
In the present embodiment, emphasis describes the mirror image resources of local controller 420 insufficient (i.e. preset capacity, which is less than, stores host 410
The capacity of the target data of transmission) in the case of, the idle capacity of the mirror cache 332 how is adjusted, to realize that data are deposited
The method of storage.As shown in figure 5, present embodiments provide for when user sends target data to local controller by host 410
When 420, local controller 420 selects the method that mirror controller 430 carries out data storage, the local control in present embodiment
The function of the structure of device 420 and its internal each section, can refer to the description based on local controller 200 shown in Fig. 2.This
The function of the structure of mirror controller 430 in embodiment and its internal each section, can refer to based on mirror shown in Fig. 3
As the description of controller 300.Present embodiment provide data image method in, step S510 by host 410 processor
It executes, step S520, S521, S522, S523, S524, S540, S541, S560 are real by the processor 220 of local controller 200
Existing and step S530, S531, S550, S551 are realized by the processor 320 of mirror controller 300.What present embodiment provided
Data image method includes the following steps.
S510, host 410 send target data to local controller 420.
S520, local controller 420 calculate the data volume of target data.Specific implementation is that local controller 420 is logical
The number for calculating the cache blocks needed for target data to be stored is crossed, to weigh the data volume of target data.
S521, local controller 420 count the idle capacity of its local cache 231.Specific implementation is, local to control
Device 420 is by counting the numbers of the idle cache blocks of local cache 231, to weigh the idle capacity of local cache 231.At this
In embodiment, the execution sequence of step S521 and step S510 and S520 are in no particular order.
In the present embodiment, local controller 420 periodically or according to setting rule replicates its in local cache 231
To hard disk 440, setting rule is, for example, all data or certain types of all data in local cache 231 for his data
The threshold value or regulation local controller 420 that data volume reaches certain store the data of specific data type to local slow
After depositing 231, replicate and write disk etc..
When the local controller 420 confirms that other described data have been copied to the hard disk 440, to the mirror image control
Device 430 processed sends the message for deleting data, the message for deleting data be used to indicate the mirror controller 430 delete it is described
Other described data in mirror cache 332;The local controller 410 receives the described of the transmission of the mirror controller 430
The response message of data is deleted, the response message is for indicating that the mirror controller 430 has deleted the mirror cache 332
In other described data;The local controller 410 deletes other described data in the local cache 231;Described
Ground controller 410 updates the idle capacity of local cache 231, and the idle capacity of the updated local cache 231 is update
The idle capacity of the preceding local cache 231 adds the data volume of other data.Therefore, the sheet of local controller 420
The idle capacity of ground caching 231 is dynamic change.Hard disk 440 in present embodiment be located locally in controller 420 or
It is communicated to connect with local controller 420.
S522, local controller 420 compare the big of the idle capacity of its local cache 231 and the data volume of target data
It is small.The number of cache blocks needed for 420 target data more to be stored of local controller and the free buffer block of local cache
Number size.If the number of the cache blocks needed for target data to be stored is less than or equal to the free buffer block of local cache
Number then judges that the idle capacity of local cache 231 is more than or equal to the data volume of target data.
S523, when local controller 420 local cache 231 idle capacity be more than or equal to target data data
Amount, local controller 420 compare the size of the data volume of preset capacity and target data.If preset capacity is less than target data
Data volume, execute step S524.Preset capacity is that the idle of the mirror cache 332 of the mirror controller 430 pre-saved is held
Amount.Specific implementation is to weigh preset capacity by the number of preset buffer memory block, local controller 420 compares preset buffer memory
The number size of the number of block and the cache blocks needed for target data to be stored, if the number of preset buffer memory block is more than or waits
The number of cache blocks needed for target data to be stored, then it represents that mirror controller 430 has sufficient mirror image resources, is used for
The target data that mirrored storage is sent from local controller 420.If the number of preset buffer memory block is less than target data to be stored
The number of required cache blocks, then it represents that mirror controller 430 cannot provide sufficient mirror image resources mirrored storage from local control
The target data that device 420 processed is sent.
S524, the local controller 420 send capacity adjust request to the mirror controller 430.If default hold
Amount is less than the data volume of target data, and the corresponding write instruction of the target data is added to waiting team local controller 420
It arranges, other write instructions is also preserved in waiting list.The meter that local controller 420 passes through the write instruction of setting waiting list
Number, to identify the quantity that do not apply to the corresponding write instruction of the target data of mirror image resources, the counting of waiting list it is initial
Value can be 0, show do not have write instruction in waiting list.Show that preset capacity is less than target when local controller 420 compares
The data volume of data, local controller 420 carry out the initial value of the counting of the write instruction of waiting list, from add-one operation, to add 1
After operation, the value of the counting of waiting list is revised as 1, in other cases, adds every time to the value of the counting of waiting list
The granularity of operation can be the numerical value that other are more than zero.
If preset capacity is more than the data volume of the target data, i.e., the data volume of target data is more than the advance guarantor
The idle capacity for the mirror cache deposited, after meeting preset condition, the local controller is sent out to the mirror controller
Send capacity adjust request.The preset condition includes:The local controller is not received by firmly within the preset period
The write-in success message that disk 440 is sent, the data that said write success message is used to indicate in the local cache are successfully write
Enter the hard disk.Alternatively, within the period, the number of all write instructions in the waiting list reaches pre-determined threshold
Value, i.e. local controller 420 receive in more parts of target datas, or the follow-up period and receive more parts of new targets simultaneously
Data etc. do not have in local controller 420 application to have more parts to the target data of mirror image resources, and the value of the counting of waiting list is big
In 0.Alternatively, after the end cycle, the local controller counts the preset capacity, and the preset capacity is less than described
The data volume of target data.It is obtained when local controller 420 compares, preset capacity is less than the data volume of target data, shows this
Ground controller 420 is without application to the mirror image resources for storing target data.
S530, the mirror controller 430 adjust the free time of the mirror cache 332 according to the capacity adjust request
Capacity.The mirror controller further includes host caches 331.The mirror controller 430 is adjusted according to the capacity adjust request
After the idle capacity of the whole mirror cache 332, the capacity of the remaining space of the host caches 331 remains able to support institute
State the service request of the transmission of host 411.A kind of realization method be the mirror controller 430 by the host caches 331 still
Not used free space distributes to the mirror cache 332.Another realization method is that the statistics of the mirror controller 430 is worked as
The idle capacity of the caching 330 of the preceding mirror controller 430, the sky of the caching 330 of the presently described mirror controller 430
Not busy capacity includes the idle capacity of the mirror cache 332 and the sum of the idle capacity of the host caches 331;The mirror image control
Device 430 processed counts the idle capacity of the caching 330 of the presently described mirror controller 430 of special ratios, after adjustment
The mirror cache 332 idle capacity.To avoid mirror controller 430 from frequently adjusting the sky of the mirror cache 332
Not busy capacity, the mirror controller 430 count the sky of the caching 330 of the presently described mirror controller 430 of special ratios
After not busy capacity, the mirror controller 430 judges the caching of the presently described mirror controller 430 of the special ratios
Whether 330 idle capacity reaches threshold capacity;If the presently described mirror controller 430 of the special ratios is slow
The idle capacity for depositing 330 reaches the threshold capacity, and the mirror controller 430, which adjusts the idle of the mirror cache 332, to be held
Amount is the idle capacity of the caching 330 of the presently described mirror controller 430 of the special ratios.
Specifically, the mirror controller 430 counts the idle capacity of its caching 330, the sky in caching 330 can be counted
The number of not busy cache blocks, to weigh the idle capacity of caching 330;The host caches 331 in caching 330 can also be counted respectively
With the number of the free buffer block in mirror cache 332, by weighing the sky in host caches 331 and mirror cache 332 respectively
Not busy capacity weighs the idle capacity of caching 330.Specifically, the caching of the presently described mirror controller 430 of special ratios
330 idle capacity, using the idle capacity of the caching 330 of current mirror controller 430 as radix, to obtain the spy of caching 330
The idle capacity of certainty ratio.For example, mirror controller 430 is with the idle caching in the caching 330 of current mirror controller 430
The number of block is radix, obtains the idle cache blocks number of the special ratios in caching 330.
Idle capacity after the adjustment is sent to the local controller 420 by S531, the mirror controller 430.
Whether S540, the local controller 420 judge the data volume of the target data more than the institute after the adjustment
State the idle capacity of mirror cache 332.Specifically, the number of the preset buffer memory block by adjusting after weighs the mirror after adjustment
As the idle capacity of caching 332, local controller 420 compares the number of the preset buffer memory block after adjustment and target data to be stored
The number size of required cache blocks, if the number of the preset buffer memory block after adjustment is more than or equal to target data to be stored
The number of required cache blocks, then it represents that mirror controller 430 has sufficient mirror image resources, is used for mirrored storage from local control
The target data that device 420 processed is sent.
The idle capacity of S541, the mirror cache 332 after the data of the target data are less than the adjustment
When, the local controller 420 sends the target data to the mirror controller 430.Local controller 420 is according to waiting
The sequence of the corresponding write instruction of target data in queue sorts, and sends the write instruction to sort in waiting list successively and corresponds to
Target data to mirror controller 430, mirror controller 430 receive and store local controller 420 transmission target data
Into the mirror cache 332 of mirror controller 430.After sending target data to mirror controller 430 every time, local controller
420 carry out the counting of waiting list, from the operation that subtracts 1, to show that the target data sent has been applied to mirror image resources.At other
In situation, the granularity for carrying out subtracting operation to the counting of waiting list every time can be other numerical value more than zero.
S550, the mirror controller 430 receive the target data, and the mirror image is written in the target data and is delayed
Deposit 332.
S551, mirror controller 430 feed back mirror image and complete message to local controller 420.
After the mirror image that S560, the local controller 420 are sent in the reception mirror controller 430 completes message,
The target data is written in the local cache 231.Local controller 420 is selected from local cache 231, and to be stored
The cache blocks of number identical multiple free time of cache blocks needed for target data, the number of targets for storing the transmission of host 410
According to.The local controller writes the target data after receiving the mirror image that the mirror controller is sent and completing message
Enter in the local cache.
Based on Fig. 5 realize data image method, the idle capacity of the mirror cache 332 after adjustment be more than or
Equal to the data volume of target data, then show that local controller 420 has enough mirror image resources (i.e. mirror controller 430
Mirror cache 332 has enough idle spatial caches, to store target data), to cache the target of the transmission of host 410
Data.After ensureing that follow-up local controller 420 receives new target data, it can judge whether local controller 420 has
Enough mirror image resources store new target data, and after step S531, storage method further includes:Local controller 420 is more
New preset capacity, updated preset capacity are the preset capacity before not updating, the target data sent with host 410
The difference of data volume.Concrete implementation mode is that local controller 420 updates the value of the number of preset buffer memory block, updated pre-
If the value of the number of cache blocks is, the number of the preset buffer memory block before not updating subtracts slow needed for target data to be stored
The number of counterfoil.
Based on the data image method that Fig. 5 is realized, after step S550, the method further includes:
The target data in the local cache 231 is copied to the hard disk 440 by the local controller 410;
When the local controller 410 confirms that the target data has been copied to the hard disk 440, to the mirror image control
Device 430 processed sends the message for deleting data, the message for deleting data be used to indicate the mirror controller 430 delete it is described
The target data in mirror cache 332;
Local controller 410 receives the response message of the deletion data of the transmission of the mirror controller 430, the sound
Answer message for indicating that the mirror controller 430 has deleted the target data in the mirror cache 332;
The local controller 410 deletes the target data in the local cache 231;
The local controller 410 updates preset capacity, and the updated preset capacity is pre-saving before updating
The mirror cache idle capacity, that is, update before preset capacity add the target data data volume.
It is based on the preset capacity that the data image method that Fig. 5 is realized, local controller 420 preserve, i.e., described to pre-save
The mirror cache 332 idle capacity, there are two types of realization method, description separately below pre-saves the mirror cache
Two kinds of realization methods of 332 idle capacity.
One kind being achieved in that local controller 420 is by applying for what the mirror image resources of mirror controller 430 was realized, tool
The application process of body is:Local controller 420 sends the request of application mirror image resources to mirror controller 430, and application mirror image provides
The request in source includes preset capacity;Mirror controller 430 compares the big of preset capacity and the idle capacity of current mirror cache 332
It is small;When the idle capacity of mirror cache 332 is more than or equal to preset capacity, the feedback application mirror image resources of mirror controller 430
Successful response message is to local controller 420.
Another realization method is that the idle capacity of the mirror cache pre-saved is slow according to the mirror image
The data volume for the data that the host 410 is sent to the local controller 420 in the total capacity and predetermined amount of time deposited is true
Fixed.The predetermined amount of time is period of the local controller before at the time of receiving the target data.This reality
It applies in mode, the local control is sent to according to the host 410 in the total capacity of the mirror cache and predetermined amount of time
The data volume of the data of device 420 processed determines preset capacity, specifically includes:
The local controller 420 counts, described in the predetermined amount of time before at the time of receiving the target data
First data volume x of all data that local controller receiving host 410 is sent.The predetermined amount of time can pass through timer
Carry out period timing.Or local controller 420 inquires the sky of the mirror cache 332 of the mirror controller 430 pre-saved
When not busy capacity is less than predetermined threshold value, the local controller 420 counts, predetermined before at the time of receiving the target data
In period, the first data volume x of all data that the local controller receiving host 410 is sent, the predetermined amount of time
When ending in the idle capacity for the mirror cache 332 for inquiring the mirror controller 430 pre-saved less than predetermined threshold value.It is described
The case where business datum that local controller 420 is sent according to the receiving host 410 that the local controller 420 pre-saves,
When the idle capacity that statistics ends in the mirror cache 332 for inquiring the mirror controller 430 pre-saved is less than predetermined threshold value,
In the predetermined amount of time before, the first data of all data that 420 receiving host 410 of the local controller is sent
Measure x.
The local controller 420 sends the request of allotment mirror image resources to the mirror controller 430, so that the mirror
In the predetermined amount of time before obtaining the moment as controller 430,430 receiving host 411 of mirror controller hair
Second data volume y of all data sent.How mirror controller 430 determines that predetermined amount of time is determined with local controller 420
The mode of predetermined amount of time is identical, repeats no more herein.The mirror controller 430 obtains the first data volume x and accounts for institute
The the first mirror image accounting for stating the sum of the first data volume and second data volume (x+y), if in the mirror controller 430
In caching 330, mirrored capacity is less than or equal to current, that is, the idle capacity of the caching 330 of the mirror controller 430 before adjusting
Or the part idle capacity in idle capacity, the feedback of the mirror controller 430 allocate successful response message to described
Ground controller 420.The mirrored capacity is the caching 330 according to the first mirror image accounting and the mirror controller 430
Total capacity determine, the total capacity that the mirrored capacity is specially the first mirror image accounting with the caching 330 of mirror controller 430
Product.The total capacity of the caching of the mirror controller 430 includes the total capacity of the mirror cache 332 of mirror controller 430
With the total capacity of host caches 331.
The local controller 420 receives the successful response message of allotment of the feedback of the mirror controller 430, the tune
Include the mirrored capacity with successful response message.
The local controller 420 preserves the idle capacity of the mirror cache 332, the free time of the mirror cache 332
Capacity is the mirrored capacity.
Based on data image method shown in fig. 5, two kinds of realizations of the idle capacity of the mirror cache are pre-saved
Second of realization method of mode, if local controller 420, which is mirror controller 430, provides mirroring service, i.e., local control
Other side provides mirroring service to device 420 each other with 430 phase of mirror controller, while local controller 420 applies for mirror image resources,
Mirror controller 430 can also be preserved the idle of the mirror cache 232 and held by the first data volume x and the second data volume y
Amount, to apply for that local controller 420 is mirror image resources when mirror controller 430 provides mirroring service.The mirror controller
The idle capacity of 430 mirror caches 232 preserved is that the second data volume y accounts for the first data volume x and second number
According to the product of the second mirror image accounting and the caching 230 of local controller 420 of the sum of amount y (x+y).The second mirror image accounting with
The first mirror image accounting can be the same or different.Then, mirror controller 430 feeds back the sky of the mirror cache 232
For not busy capacity to local controller 420, local controller 420 compares the idle capacity of the caching 230 of local controller 420 either
Whether part idle capacity in idle capacity is greater than or equal to the idle capacity of the mirror cache 232, if it is greater than or wait
In the idle capacity of the mirror cache 232, then the successful response message of allotment is fed back to mirror controller 430.
With reference to data image method shown in fig. 5, storage system provided in an embodiment of the present invention is carried out specific
Description.Fig. 6 a are referred to, Fig. 6 a are the structure chart of another storage system 600 provided in an embodiment of the present invention.As shown in Figure 6 a,
Storage system 600 provided in this embodiment includes local controller 610 and mirror controller 620,610 He of the local controller
The mirror controller 620 communicates, wherein the local controller 610 includes local cache 611, the mirror controller 620
Including mirror cache 621.The function of the local controller 610 and the mirror controller 620 is described below.
The local controller 610 determines that the data volume of the target data is more than described after receiving target data
When the idle capacity of the mirror cache 621 pre-saved, capacity adjust request is sent to the mirror controller 620.
The mirror controller 620, for according to the capacity adjust request, adjusting the free time of the mirror cache 621
Capacity.
The mirror controller 620 is additionally operable to the idle capacity after the adjustment being sent to the local controller
610。
The local controller 610 sends out the target data after being additionally operable to receive the idle capacity after the adjustment
It send to the mirror controller 620 to store the target data.
In the present embodiment, the function of local controller 610 and realization details are referred to be based on Fig. 2 or Fig. 4 or Fig. 5
Shown in local controller 420 function and description, the details of specific implementation no longer repeat herein.Similarly, in this implementation
In mode, the function and realization details of mirror controller 620 can refer to based on Fig. 3 or Fig. 4 or shown in fig. 5 mirror controllers
430 function and realization details, the details of specific implementation no longer repeats herein.
As an alternative embodiment, the local controller 610, is additionally operable to judge the data of the target data
Amount whether be more than the adjustment after the mirror cache 621 idle capacity.
When the idle capacity of the mirror cache 621 after the data of the target data are less than the adjustment, institute
Local controller 610 is stated, is additionally operable to send the target data to the mirror controller 620.
The mirror controller 620 is additionally operable to receive the target data, and the mirror image is written in the target data
Caching 621.
The local controller 610, be additionally operable to receive the mirror image that the mirror controller 620 is sent complete message it
Afterwards, the target data is written in the local cache 611.
In the present embodiment, the function of local controller 610 and realization details are referred to be based on shown in Fig. 5 originally
The details of the function of ground controller 420, specific implementation no longer repeats herein.Similarly, in the present embodiment, mirror controller
620 function and realization details can refer to the function based on mirror controller 430 shown in fig. 5 and realize details, specific implementation
Details no longer repeat herein.
As an alternative embodiment, referring to Fig. 6 b, Fig. 6 b are another storage provided in an embodiment of the present invention
The structure chart of system 600, as shown in Figure 6 b, based on storage system shown in Fig. 6 a, in storage system 600 provided in this embodiment
The mirror controller 620 further include host caches 622.
The mirror controller 620 is additionally operable to still not used free space in the host caches 622 distributing to institute
Mirror cache 621 is stated, the capacity of the remaining space of the host caches 622 remains able to support and the mirror controller 620
The service request that the host of communication is sent.
In the present embodiment, the function of mirror controller 620 and realization details can refer to based on mirror image control shown in fig. 5
The function and realization details, the details of specific implementation of device 430 processed no longer repeat herein.
As an alternative embodiment, the mirror controller 620, is additionally operable to count the mirror controller 620
Caching idle capacity, the idle capacity of the caching of the mirror controller 620 includes the sky of the mirror cache 621
The sum of the idle capacity of not busy capacity and the host caches 622.
The mirror controller 620 is additionally operable to according to special ratios and the mirror controller 620 counted
The idle capacity of caching determine the idle capacity of the mirror cache 621 after the adjustment.
In the present embodiment, the function of mirror controller 620 and realization details can refer to based on mirror image control shown in fig. 5
The function and realization details, the details of specific implementation of device 430 processed no longer repeat herein.
As an alternative embodiment, referring to Fig. 6 c, Fig. 6 c are another storage provided in an embodiment of the present invention
The structure chart of system 600, as fig. 6 c, based on storage system 600 shown in Fig. 6 b, the storage system provided in this embodiment
System 600 further includes hard disk 630, and the local controller 610 is additionally operable to judge whether to meet preset condition, and item is preset meeting
After part, the local controller 610 sends capacity adjust request to the mirror controller 620.In the present embodiment, local
The function and realization details of controller 610 are referred to the function based on local controller shown in Fig. 5 420, implement
Details no longer repeat herein.
As an alternative embodiment, the local controller 610, is additionally operable to not have within the preset period
After the write-in success message for receiving the transmission of the hard disk 630, capacity adjust request, institute are sent to the mirror controller 620
It states the data that write-in success message is used to indicate in the local cache 611 and is successfully written into the hard disk 630.
The preset condition includes:The local controller 610 is not received by described hard within the preset period
The write-in success message that disk 630 is sent.
In the present embodiment, the function of local controller 610 and realization details are referred to be based on shown in Fig. 5 originally
The details of the function of ground controller 420, specific implementation no longer repeats herein.
As an alternative embodiment, please be that another kind provided in an embodiment of the present invention is deposited referring to Fig. 6 d, Fig. 6 d
The structure chart of storage system 600, as shown in fig 6d, based on storage system, storage system 600 provided in this embodiment shown in Fig. 6 c
In, the local cache 611 includes waiting list 612, and the local controller 610 is additionally operable to the target data pair
The write instruction answered is stored in the waiting list 612, other write instructions are also preserved in the waiting list 612.
The local controller 610, all write-ins being additionally operable within the preset period in the waiting list 612
After the number of instruction reaches predetermined threshold value, capacity adjust request, the preset condition packet are sent to the mirror controller 620
It includes:The number of all write instructions within the preset period in the waiting list 612 reaches predetermined threshold value.
In the present embodiment, the function of local controller 610 and realization details are referred to be based on shown in Fig. 5 originally
The details of the function of ground controller 420, specific implementation no longer repeats herein.
As an alternative embodiment, the local controller 610, is additionally operable to update the mirror cache 621
Idle capacity, the idle capacity of the updated mirror cache 621 are the idle capacity of the mirror cache 621 before update
Subtract the data volume of the target data.
In the present embodiment, the function of local controller 610 and realization details are referred to be based on shown in Fig. 5 originally
The details of the function of ground controller 420, specific implementation no longer repeats herein.
Local controller 610 determines the mirror cache pre-saved before sending target data to mirror controller 620
621 idle capacity is ensuring that it is abundant that local controller 610 has to determine 610 not used mirror image resources of local controller
Be used for storing the mirror image resources of target data after, just transmission target data avoids mirror controller to mirror controller 620
620 cannot store all target datas of the transmission of local controller 610.If the data volume of the target data is more than described pre-
The idle capacity of the mirror cache 621 first preserved then sends capacity adjust request with basis to the mirror controller 620
The capacity adjust request, adjusts the idle capacity of the mirror cache 621, and then ensures that mirror controller 620 is local controls
Device 610 processed provides the mirror image resources for adequately being used for storing target data, stores the number of targets that local controller 610 is sent in time
According to.
In several embodiments provided herein, it should be understood that disclosed system, device and method can be with
It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, the division of module,
Only a kind of division of logic function, there may be another division manner when realization, such as multiple module or components can combine
Or it is desirably integrated into another system, or some features can be ignored or not executed.Another point, shown or discussed phase
Coupling, direct-coupling or communication connection between mutually can be by some interfaces, the INDIRECT COUPLING or communication of device or module
Connection can be electrical, machinery or other forms.
The module illustrated as separating component may or may not be physically separated, and be shown as module
Component may or may not be physical module, you can be located at a place, or may be distributed over multiple networks
In module.Some or all of module therein can be selected according to the actual needs to achieve the purpose of the solution of this embodiment.
In addition, each function module in each embodiment of the present invention can be integrated in a processing module, it can also
That modules physically exist alone, can also two or more modules be integrated in a module.Above-mentioned integrated mould
The form that hardware had both may be used in block is realized, can also be realized in the form of hardware adds software function module.
The above-mentioned integrated module realized in the form of software function module, can be stored in one and computer-readable deposit
In storage media.Above-mentioned software function module is stored in a storage medium, including some instructions are used so that a computer
Equipment (can be personal computer, server or the network equipment etc.) executes the part step of each embodiment method of the present invention
Suddenly.And storage medium above-mentioned includes:Mobile hard disk, read-only memory, random access memory, magnetic disc or CD etc. are various
It can be with the medium of storage function code.
Finally it should be noted that:The above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although
Present invention has been described in detail with reference to the aforementioned embodiments, it will be understood by those of ordinary skill in the art that:It still may be used
With technical scheme described in the above embodiments is modified or equivalent replacement of some of the technical features;
And these modifications or replacements, the protection model for various embodiments of the present invention technical solution that it does not separate the essence of the corresponding technical solution
It encloses.
Claims (16)
1. a kind of data image method, which is characterized in that the method is applied in storage system, and the storage system includes this
Ground controller and mirror controller, wherein local controller include local cache, and the mirror controller includes mirror cache, institute
The method of stating includes:
After the local controller receives target data, determine that the data volume of the target data is more than the institute pre-saved
When stating the idle capacity of mirror cache, the local controller sends capacity adjust request to the mirror controller;
The mirror controller adjusts the idle capacity of the mirror cache according to the capacity adjust request;
Idle capacity after the adjustment is sent to the local controller by the mirror controller;
After the local controller receives the idle capacity after the adjustment, the target data is sent to the mirror image control
Device processed is to store the target data.
2. the method as described in claim 1, which is characterized in that the method further includes:
Whether the local controller judges the data volume of the target data more than the mirror cache after the adjustment
Idle capacity;
When the idle capacity of the mirror cache after the data of the target data are less than the adjustment, the local control
Device processed sends the target data to the mirror controller;
The mirror controller receives the target data, and the mirror cache is written in the target data;
The local controller writes the target data after receiving the mirror image that the mirror controller is sent and completing message
Enter in the local cache.
3. method as claimed in claim 1 or 2, which is characterized in that the mirror controller further includes host caches;
The idle capacity of the adjustment mirror cache includes:The mirror controller will not yet use in the host caches
Free space distribute to the mirror cache, the capacity of the remaining space of the host caches remains able to support and the mirror
The service request that the host communicated as controller is sent.
4. method as claimed in claim 1 or 2, which is characterized in that the mirror controller adjusts the sky of the mirror cache
Further include before not busy capacity:
The mirror controller counts the idle capacity of the caching of the mirror controller, the caching of the mirror controller
Idle capacity include the idle capacity of the mirror cache and the sum of the idle capacity of the host caches;
The mirror controller is according to special ratios and the idle capacity of the caching of the mirror controller counted
Determine the idle capacity of the mirror cache after the adjustment.
5. the method as described in claim 1-4 is any, which is characterized in that the storage system further includes hard disk, the local
Controller sends capacity adjust request before to the mirror controller:
The local controller judges whether to meet preset condition.
6. method as claimed in claim 5, which is characterized in that the preset condition includes:
The local controller is not received by the write-in success message that the hard disk is sent within the preset period, described
The data that write-in success message is used to indicate in the local cache are successfully written into the hard disk.
7. method as claimed in claim 5, which is characterized in that the local cache includes waiting list, and the method is also
Including the corresponding write instruction of the target data to be stored in the waiting list, it is also preserved in the waiting list
His write instruction, the preset condition include:All write instructions within the preset period in the waiting list
Number reaches predetermined threshold value.
8. the method as described in claim 1-7 is any, which is characterized in that further include:
The local controller updates the idle capacity of the mirror cache, and the idle capacity of the updated mirror cache is
The idle capacity of the mirror cache before update subtracts the data volume of the target data.
9. a kind of storage system, which is characterized in that the storage system includes local controller and mirror controller, the local
Controller and mirror controller communication connection, wherein local controller includes local cache, and the mirror controller includes
Mirror cache;
The local controller determines that the data volume of the target data is more than the advance guarantor after receiving target data
When the idle capacity for the mirror cache deposited, capacity adjust request is sent to the mirror controller;
The mirror controller, for according to the capacity adjust request, adjusting the idle capacity of the mirror cache;
The mirror controller is additionally operable to the idle capacity after the adjustment being sent to the local controller;
The target data is sent to institute by the local controller after being additionally operable to receive the idle capacity after the adjustment
Mirror controller is stated to store the target data.
10. system as claimed in claim 9, which is characterized in that
Whether the local controller is additionally operable to judge the data volume of the target data more than the mirror image after the adjustment
The idle capacity of caching;
When the idle capacity of the mirror cache after the data of the target data are less than the adjustment, the local control
Device processed is additionally operable to send the target data to the mirror controller;
The mirror controller is additionally operable to receive the target data, and the mirror cache is written in the target data;
The local controller is additionally operable to after receiving the mirror image that the mirror controller is sent and completing message, by the mesh
Data are marked to be written in the local cache.
11. the system as described in claim 9 or 10, which is characterized in that the mirror controller further includes host caches;
The mirror controller is additionally operable to still not used free space in the host caches distributing to the mirror image and delay
It deposits, the capacity of the remaining space of the host caches remains able to the industry that the host for supporting to communicate with the mirror controller is sent
Business request.
12. the system as described in claim 9 or 10, which is characterized in that
The mirror controller is additionally operable to count the idle capacity of the caching of the mirror controller, the mirror image control
The idle capacity of the caching of device includes the idle capacity of the mirror cache and the sum of the idle capacity of the host caches;
The mirror controller is additionally operable to the sky of the caching according to special ratios and the mirror controller counted
Not busy capacity determines the idle capacity of the mirror cache after the adjustment.
13. the system as described in claim 9-12 is any, which is characterized in that the storage system further includes hard disk, described
Ground controller is additionally operable to judge whether to meet preset condition, and after meeting preset condition, the local controller is to the mirror image
Controller sends capacity adjust request.
14. system as claimed in claim 13, which is characterized in that
The local controller, the write-in for being additionally operable to be not received by the hard disk transmission within the preset period successfully disappear
After breath, capacity adjust request is sent to the mirror controller, said write success message is used to indicate in the local cache
Data be successfully written into the hard disk;
The preset condition includes:The local controller is not received by what the hard disk was sent within the preset period
Success message is written.
15. system as claimed in claim 13, which is characterized in that the local cache includes waiting list, the local
Controller is additionally operable to the corresponding write instruction of the target data being stored in the waiting list, in the waiting list
Also preserve other write instructions;
The local controller is additionally operable within the preset period number of all write instructions in the waiting list
After reaching predetermined threshold value, capacity adjust request is sent to the mirror controller, the preset condition includes:It is presetting
Period in the numbers of all write instructions in the waiting list reach predetermined threshold value.
16. the system as described in claim 9-15 is any, which is characterized in that
The local controller is additionally operable to update the idle capacity of the mirror cache, the sky of the updated mirror cache
Not busy capacity is that the idle capacity of the mirror cache before update subtracts the data volume of the target data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710214894.8A CN108664354A (en) | 2017-04-01 | 2017-04-01 | A kind of data image method and storage system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710214894.8A CN108664354A (en) | 2017-04-01 | 2017-04-01 | A kind of data image method and storage system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108664354A true CN108664354A (en) | 2018-10-16 |
Family
ID=63783777
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710214894.8A Pending CN108664354A (en) | 2017-04-01 | 2017-04-01 | A kind of data image method and storage system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108664354A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110502453A (en) * | 2019-08-16 | 2019-11-26 | 北京浪潮数据技术有限公司 | A kind of memory space recovery method and device |
WO2021012169A1 (en) * | 2019-07-22 | 2021-01-28 | 华为技术有限公司 | Method of improving reliability of storage system, and related apparatus |
CN112437124A (en) * | 2020-11-09 | 2021-03-02 | 北京金山云网络技术有限公司 | Method and device for processing flow mirror image request and load balancing server |
CN114095513A (en) * | 2021-11-26 | 2022-02-25 | 苏州盛科科技有限公司 | Method for scheduling forwarding traffic and mirror traffic under limited bandwidth scene and application |
RU2810634C2 (en) * | 2019-07-22 | 2023-12-28 | Хуавей Текнолоджиз Ко., Лтд. | Method for increasing reliability of data storage systems and corresponding device |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1495612A (en) * | 2002-08-07 | 2004-05-12 | �Ҵ���˾ | Method for updating timing information of retaining buffer stored data object and system |
CN101460931A (en) * | 2006-05-29 | 2009-06-17 | 微软公司 | Retaining shadow copy data during replication |
CN101840309A (en) * | 2009-10-28 | 2010-09-22 | 创新科存储技术有限公司 | Access control method and system of double control disk array in multipath environment |
CN102681794A (en) * | 2012-04-23 | 2012-09-19 | 浪潮(北京)电子信息产业有限公司 | Method and system for realizing redundant array protection of a disk based on double controllers |
-
2017
- 2017-04-01 CN CN201710214894.8A patent/CN108664354A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1495612A (en) * | 2002-08-07 | 2004-05-12 | �Ҵ���˾ | Method for updating timing information of retaining buffer stored data object and system |
CN101460931A (en) * | 2006-05-29 | 2009-06-17 | 微软公司 | Retaining shadow copy data during replication |
CN101840309A (en) * | 2009-10-28 | 2010-09-22 | 创新科存储技术有限公司 | Access control method and system of double control disk array in multipath environment |
CN102681794A (en) * | 2012-04-23 | 2012-09-19 | 浪潮(北京)电子信息产业有限公司 | Method and system for realizing redundant array protection of a disk based on double controllers |
Non-Patent Citations (2)
Title |
---|
KARANJIT SIYAN: "《NetWare高级使用技术》", 31 August 1995 * |
黄文胜: "《VMware vSphere虚拟化数据中心的实现与管理》", 30 June 2016 * |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2021012169A1 (en) * | 2019-07-22 | 2021-01-28 | 华为技术有限公司 | Method of improving reliability of storage system, and related apparatus |
CN112543922A (en) * | 2019-07-22 | 2021-03-23 | 华为技术有限公司 | Method and related device for improving reliability of storage system |
RU2810634C2 (en) * | 2019-07-22 | 2023-12-28 | Хуавей Текнолоджиз Ко., Лтд. | Method for increasing reliability of data storage systems and corresponding device |
CN110502453A (en) * | 2019-08-16 | 2019-11-26 | 北京浪潮数据技术有限公司 | A kind of memory space recovery method and device |
CN112437124A (en) * | 2020-11-09 | 2021-03-02 | 北京金山云网络技术有限公司 | Method and device for processing flow mirror image request and load balancing server |
CN114095513A (en) * | 2021-11-26 | 2022-02-25 | 苏州盛科科技有限公司 | Method for scheduling forwarding traffic and mirror traffic under limited bandwidth scene and application |
CN114095513B (en) * | 2021-11-26 | 2024-03-29 | 苏州盛科科技有限公司 | Method for forwarding traffic and mirror image traffic scheduling under limited bandwidth scene and application |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108664354A (en) | A kind of data image method and storage system | |
CN102137133B (en) | Method and system for distributing contents and scheduling server | |
CN106095572A (en) | The Dispatching System of a kind of big data process and method | |
CN105338078B (en) | Date storage method and device for storage system | |
US20120297056A1 (en) | Extensible centralized dynamic resource distribution in a clustered data grid | |
US9774676B2 (en) | Storing and moving data in a distributed storage system | |
CN108139941A (en) | Dynamic resource allocation based on network flow control | |
CN108804465B (en) | Method and system for data migration of distributed cache database | |
CN105072182A (en) | Load balancing method, load balancer and user terminal | |
CN110383764A (en) | The system and method for usage history data processing event in serverless backup system | |
CN104092756A (en) | Cloud storage system resource dynamic allocation method based on DHT mechanism | |
CN114861911B (en) | Deep learning model training method, device, system, equipment and medium | |
CN107451853A (en) | Method, apparatus, system and the storage medium that a kind of red packet distributes in real time | |
CN106777311A (en) | Flight freight space state cache method and system | |
CN109981702A (en) | A kind of file memory method and system | |
CN108055701A (en) | A kind of resource regulating method and base station | |
Chang et al. | Adaptive replication for mobile edge computing | |
CN114827180A (en) | Distribution method of cloud data distributed storage | |
CN109388655A (en) | A kind of method and apparatus of dynamic control of data access | |
CN106970827A (en) | Information processing method, information processor, electronic equipment | |
CN117118742B (en) | Government affair data operation method and system based on access frequency monitoring | |
CN107168820A (en) | A kind of data image method and storage system | |
CN109815204A (en) | A kind of metadata request distribution method and equipment based on congestion aware | |
US10540217B2 (en) | Message cache sizing | |
KR20120009800A (en) | Distributed file management apparatus and method |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20181016 |