CN106557385A - Data snapshot method and storage device - Google Patents

Data snapshot method and storage device Download PDF

Info

Publication number
CN106557385A
CN106557385A CN201510626065.1A CN201510626065A CN106557385A CN 106557385 A CN106557385 A CN 106557385A CN 201510626065 A CN201510626065 A CN 201510626065A CN 106557385 A CN106557385 A CN 106557385A
Authority
CN
China
Prior art keywords
lun
logical address
snapshot
address
source
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
CN201510626065.1A
Other languages
Chinese (zh)
Other versions
CN106557385B (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.)
Chengdu Huawei Technology Co Ltd
Original Assignee
Chengdu Huawei Technology 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 Chengdu Huawei Technology Co Ltd filed Critical Chengdu Huawei Technology Co Ltd
Priority to CN201510626065.1A priority Critical patent/CN106557385B/en
Priority to PCT/CN2016/087913 priority patent/WO2017054539A1/en
Publication of CN106557385A publication Critical patent/CN106557385A/en
Application granted granted Critical
Publication of CN106557385B publication Critical patent/CN106557385B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the present invention provides a kind of data snapshot method and storage device, and the method includes:The reading frequency of the first logical address in acquisition source LUN or snapshot LUN, the first logical address are the arbitrary logical address in source LUN and snapshot LUN;When the reading frequency of the first logical address in source LUN or snapshot LUN is more than predeterminated frequency, according to the first logical address, the corresponding physical address of the first logical address is inquired about in snapshot LUN;During physical address in the corresponding snapshot LUN of the first logical address is not inquired, the corresponding relation of the first physical address in the first logical address set up in snapshot LUN and snapshot LUN, and according to the first physical address, the data corresponding to the first logical address in backup source LUN are into snapshot LUN.When needing to read the first logical address in snapshot LUN, without the need for going again to read data in the LUN of source, it is to avoid unnecessarily signaling forwarding, data reading performance using redundancy is improve.

Description

Data snapshot method and storage device
Technical field
The present embodiments relate to technical field of memory, more particularly to a kind of data snapshot method and storage set It is standby.
Background technology
With the continuous improvement of centralized stores application demand, user needs to protect data with online mode Shield, to shorten backup window, snapping technique be exactly take precautions against loss of data to Online storage device have efficacious prescriptions One of method, increasing storage device all start to support this functionality.Wherein, virtual snapshot is to realize A kind of technology of snapshot functions, and Copy on write (English:Copy on write, referred to as:COW) it is A kind of implementation of virtual snapshot, detailed process is:Source LUN (English:Logical Unit Number, referred to as:LUN be stored with) mapping table, and this mapping table is have recorded on the LUN of source The logical address of each data and the mapping relations of physical address, (activate when virtual snapshot is activated The snapshot of source LUN), a mapping table is also stored on snapshot LUN, this mapping table have recorded snapshot The logical address of upper each data of LUN and the mapping relations of physical address, wherein, it is each on snapshot LUN The logical address of individual data is identical with the logical address of each data on the LUN of source, it should be noted that When virtual snapshot is activated, now on also no data Cun Chudao snapshot LUN, therefore, snapshot LUN On mapping table for sky;Only when there is new data write source LUN, just can be by the logical address of new data Source data in the LUN of source is moved in snapshot LUN correspondingly, is then remembered in snapshot LUN Record the mapping relations of the logical address of the source data and the physical address in snapshot LUN, and by new data Write into the LUN of source.
However, in prior art, only when source LUN is write, data Cun Chudao snapshot LUN is just had, If certain the block logical address in the LUN of source does not write new data, this block logic in snapshot LUN Address will not data storage, when need read snapshot LUN in this block logical address when, need to be redirected to Go to read data in the LUN of source, so cause unnecessarily information forwarding, reduce data reading performance using redundancy.
The content of the invention
The embodiment of the present invention provides a kind of data snapshot method and storage device, for avoiding unnecessarily believing Breath forwarding, improves data reading performance using redundancy.
In a first aspect, the embodiment of the present invention provides a kind of data snapshot method, including:
The reading frequency of the first logical address in the first logical address or snapshot LUN in the LUN of acquisition source, Wherein, the source LUN and snapshot LUN has identical logical address, and described first logically Location is the arbitrary logical address in the source LUN and snapshot LUN;
When described first in first logical address or the snapshot LUN in the source LUN is patrolled When collecting the reading frequency of address more than predeterminated frequency, according to first logical address, in the snapshot LUN It is middle to inquire about the corresponding physical address of first logical address;
During physical address in the corresponding snapshot LUN of first logical address is not inquired, build Stand the right of the first physical address in the first logical address and the snapshot LUN in the snapshot LUN Should be related to, and according to first physical address, back up first logical address in the source LUN Corresponding data are into the snapshot LUN.
In the first possible implementation of first aspect, be stored with the snapshot LUN source The corresponding relation of the physical address in the logical address in LUN and the source LUN;
The first physics in the first logical address in the snapshot LUN is set up and the snapshot LUN Before the corresponding relation of address, also include:
When getting read command and described not inquired in the snapshot LUN according to the read command During the corresponding physical address of one logical address, according in the source LUN stored in the snapshot LUN Logical address and the source LUN in physical address corresponding relation, determine first logical address Physical address in the corresponding source LUN;Wherein, the read command is used to read the snapshot LUN In the corresponding data of first logical address;
According to the physical address in the corresponding source LUN of first logical address, the source is read The data that the data stored in LUN are read for needed for the read command.
With reference to the first possible implementation of first aspect, in second possible reality of first aspect In existing mode, also include:
When the snapshot LUN is activated, the logical address and the source LUN in the source LUN is backed up In physical address corresponding relation into the snapshot LUN.
With reference to second of the first possible implementation or first aspect of first aspect or first aspect Possible implementation, it is in the third possible implementation of first aspect, described to set up described fast The corresponding relation of the first physical address in the first logical address according to LUN and the snapshot LUN it Afterwards, also include:
When write order is got, the write order for according to first logical address be written into number According to the write source LUN, and inquired in the snapshot LUN according to first logical address During corresponding first physical address of first logical address, according in the source LUN logically The corresponding relation of the physical address in location and the source LUN, determines the corresponding institute of first logical address State the physical address in the LUN of source;
According to the physical address in the corresponding source LUN of first logical address, will be described to be written Data are write in the source LUN.
With reference to second of the first possible implementation or first aspect of first aspect or first aspect Possible implementation, it is in the 4th kind of possible implementation of first aspect, described to set up described fast The corresponding relation of the first physical address in the first logical address according to LUN and the snapshot LUN it Afterwards, also include:
When write order is got, the write order for according to first logical address be written into number According to writing in the snapshot LUN, according to first logical address in the snapshot LUN with it is described The corresponding relation of the first physical address, determines first physical address for first logical address correspondence The snapshot LUN in physical address;
According to first physical address, the data to be written are write in the snapshot LUN.
Second aspect, the embodiment of the present invention provide a kind of storage device, including:
Acquiring unit, patrols for obtaining the first logical address in the LUN of source or first in snapshot LUN The reading frequency of address is collected, wherein, the source LUN has identical logical address with the snapshot LUN, First logical address is the arbitrary logical address in the source LUN and snapshot LUN;
Determining unit, for determining first logical address in the source LUN or the snapshot LUN In the reading frequency of first logical address whether be more than predeterminated frequency;
Processing unit, for determining first logical address in the source LUN when the determining unit Or the reading frequency of first logical address in the snapshot LUN be more than predeterminated frequency when, according to described First logical address, inquires about the corresponding physical address of first logical address in the snapshot LUN; During physical address in the corresponding snapshot LUN of first logical address is not inquired, institute is set up State the first logical address pass corresponding with the first physical address in the snapshot LUN in snapshot LUN System;And according to first physical address, the first logical address institute backed up in the source LUN is right The data answered are into the snapshot LUN.
In the first possible implementation of second aspect, be stored with the snapshot LUN source The corresponding relation of the physical address in the logical address in LUN and the source LUN;
The acquiring unit, is additionally operable to obtain read command;
The processing unit, the first logical address being additionally operable in the snapshot LUN is set up are fast with described Before the corresponding relation of the first physical address according to LUN, when the acquiring unit gets read command, And the corresponding thing of first logical address is not inquired in the snapshot LUN according to the read command During reason address, according to the logical address in the source LUN stored in the snapshot LUN and the source The corresponding relation of the physical address in LUN, determines the corresponding source LUN of first logical address In physical address;Wherein, the read command is used to read first logic in the snapshot LUN The corresponding data in address;And according in the corresponding source LUN of first logical address physically Location, the data that the data stored in reading the source LUN are read for needed for the read command.
With reference to the first possible implementation of second aspect, in second possible reality of second aspect In existing mode, the processing unit is additionally operable to, when the snapshot LUN is activated, back up the source LUN In logical address and the source LUN in physical address corresponding relation into the snapshot LUN.
With reference to second of the first possible implementation or second aspect of second aspect or second aspect Possible implementation, in the third possible implementation of second aspect, the acquiring unit, It is additionally operable to obtain write order;
The processing unit, the first logical address being additionally operable in the snapshot LUN is set up are fast with described After the corresponding relation of the first physical address according to LUN, when the acquiring unit gets write order When, the write order writes the source LUN for being written into data according to first logical address In, and first logical address pair is inquired in the snapshot LUN according to first logical address During first physical address answered, according in the logical address in the source LUN and the source LUN Physical address corresponding relation, determine the physics in the corresponding source LUN of first logical address Address;And according to the physical address in the corresponding source LUN of first logical address, will be described Data to be written are write in the source LUN.
With reference to second of the first possible implementation or second aspect of second aspect or second aspect Possible implementation, in the 4th kind of possible implementation of second aspect, the acquiring unit, It is additionally operable to obtain write order;
The processing unit, the first logical address being additionally operable in the snapshot LUN is set up are fast with described After the corresponding relation of the first physical address according to LUN, when the acquiring unit gets write order When, the write order writes the snapshot LUN for being written into data according to first logical address In, according to the pass corresponding with first physical address of first logical address in the snapshot LUN System, determines that first physical address is the thing in the corresponding snapshot LUN of first logical address Reason address;And according to first physical address, the data to be written are write into the snapshot LUN In.
The embodiment of the present invention provides a kind of data snapshot method and storage device, by obtaining in the LUN of source The reading frequency of the first logical address in the first logical address or snapshot LUN, first in the LUN of source When the reading frequency of the first logical address in logical address or snapshot LUN is more than predeterminated frequency, and according to When first logical address does not inquire about the corresponding physical address of the first logical address in snapshot LUN, build The corresponding relation of the first physical address in the first logical address and snapshot LUN in vertical snapshot LUN, And according to the first physical address, the data corresponding to the first logical address in backup source LUN are to snapshot In LUN;Without the need for until writing the first logical address just by the data backup to snapshot LUN, when need When the first logical address in snapshot LUN is read, can be from direct access data in snapshot LUN, need not Go again to read data in the LUN of source, it is to avoid unnecessarily signaling forwarding, improve data reading performance using redundancy.
Description of the drawings
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below will be to reality Apply accompanying drawing to be used needed for example or description of the prior art to be briefly described, it should be apparent that, under Accompanying drawing in the description of face is some embodiments of the present invention, for those of ordinary skill in the art, On the premise of not paying creative work, can be with according to these other accompanying drawings of accompanying drawings acquisition.
Fig. 1 is the flow chart of data snapshot method embodiment of the present invention;
Fig. 2 is the flow chart of data snapshot method embodiment of the present invention two;
Fig. 3 is the flow chart of data snapshot method embodiment of the present invention three;
Fig. 4 is the flow chart of data snapshot method example IV of the present invention;
Fig. 5 is the structural representation of storage device embodiment of the present invention;
Fig. 6 is the structural representation of storage device embodiment of the present invention two.
Specific embodiment
To make purpose, technical scheme and the advantage of the embodiment of the present invention clearer, below in conjunction with this Accompanying drawing in bright embodiment, is clearly and completely described to the technical scheme in the embodiment of the present invention, Obviously, described embodiment is a part of embodiment of the invention, rather than the embodiment of whole.It is based on Embodiment in the present invention, those of ordinary skill in the art are obtained under the premise of creative work is not made The every other embodiment for obtaining, belongs to the scope of protection of the invention.
Fig. 1 is the flow chart of data snapshot method embodiment of the present invention, as shown in figure 1, the present embodiment Method can include:
The first logical address or the first logical address in snapshot LUN in S101, acquisition source LUN Read frequency, wherein, the source LUN and snapshot LUN has an identical logical address, and described the One logical address is the arbitrary logical address in the source LUN and snapshot LUN.
Snapshot LUN in the present embodiment is the snapshot LUN of source LUN, and source LUN is fast with this There is identical logical address according to LUN, for example:Source LUN has logical address:0、1、2、3、4、 5th, 6,7, then snapshot LUN is also with logical address:0、1、2、3、4、5、6、7.This enforcement Example can be with the reading frequency of the arbitrary logical address in Statistic Source LUN or snapshot LUN, such that it is able to this Read frequency, read reading number of times of the frequency representation in Preset Time, wherein, arbitrary logical address is referred to as the One logical address, such as the first logical address are 3, then the present embodiment can obtain the logic in the LUN of source Address is 3 reading frequency, or, obtain the reading frequency that the logical address in snapshot LUN is 3.
S102, described in first logical address or the snapshot LUN in the source LUN When the reading frequency of the first logical address is more than predeterminated frequency, according to first logical address, described fast According to the corresponding physical address of first logical address is inquired about in LUN.
In the present embodiment, in the first logical address or snapshot LUN in source LUN is got After the reading frequency of one logical address, by the reading frequency or snapshot LUN of the first logical address in the LUN of source In the reading frequency of the first logical address contrasted with predeterminated frequency, when it is determined that in the LUN of source first patrols The reading frequency of address is collected more than during predeterminated frequency or when the first logical address in determination snapshot LUN Read frequency be more than predeterminated frequency when, can according to first logical address inquire about in snapshot LUN this first Logical address whether there is corresponding physical address, if this is inquired in snapshot LUN first logically The corresponding physical address in location, then terminate flow process, if this is not inquired in snapshot LUN first logically The corresponding physical address in location, then perform S103.
S103, the physical address in the corresponding snapshot LUN of first logical address is not inquired When, first in the first logical address set up in the snapshot LUN and the snapshot LUN is physically The corresponding relation of location, and according to first physical address, described first backed up in the source LUN is patrolled Data corresponding to volume address are into the snapshot LUN.
In the present embodiment, when the corresponding snapshot of first logical address is not inquired in snapshot LUN During physical address in LUN, that is, the mapping relations of the first logical address are in snapshot LUN Sky, does not store the corresponding data of the first logical address in active LUN in representing snapshot LUN, Therefore the backup of the corresponding data of the first logical address in the LUN of the source can be triggered, that is, backs up the source The data corresponding to the first logical address in LUN are into snapshot LUN so that in snapshot LUN Be stored with the corresponding data of the first logical address, specifically, first distributes in snapshot LUN for storing The physical address of the memory area of the data corresponding to the first logical address in the LUN of the source, this is physically Location is referred to herein as the first physical address, and it is corresponding with first physical address to set up first logical address Relation, and according to first physical address, back up corresponding to the first logical address in the LUN of the source Data into snapshot LUN (the corresponding memory area of the first physical address i.e. into snapshot LUN); Without the need for the ability until writing the first logical address by the data backup to snapshot LUN.
In the present embodiment according to the reading frequency of the first logical address by the first logical address institute in the LUN of source After corresponding data backup is into snapshot LUN, if subsequently needing read in snapshot LUN first to patrol Address is collected, according to the first logical address and first physical address of the first logical address and above-mentioned foundation Corresponding relation, it may be determined that the first logical address corresponding physical address in snapshot LUN is the first physics Address, then reads the data in the corresponding memory area of the first physical address, without the need for being gone in the LUN of source again Read data, it is to avoid unnecessarily signaling forwarding, improve data reading performance using redundancy.
The data snapshot method that the present embodiment is provided, by obtaining the first logical address in the LUN of source or fast The reading frequency of the first logical address according to LUN, when the first logical address or snapshot in the LUN of source When the reading frequency of the first logical address in LUN is more than predeterminated frequency, and according to described first logically When location does not inquire about the corresponding physical address of the first logical address in snapshot LUN, set up in snapshot LUN The first logical address and snapshot LUN in the first physical address corresponding relation, and according to the first physics Address, the data corresponding to the first logical address in backup source LUN are into snapshot LUN;Without the need for etc. Just by the data backup to snapshot LUN when the first logical address is write, when needing to read in snapshot LUN The first logical address when, can from direct access data in snapshot LUN, without the need for go again in the LUN of source read Data, it is to avoid unnecessarily signaling forwarding, improve data reading performance using redundancy.
Fig. 2 is the flow chart of data snapshot method embodiment of the present invention two, as shown in Fig. 2 the present embodiment Method on the basis of embodiment of the method shown in Fig. 1, alternatively, the present embodiment perform Fig. 1 shown in Before S103, can also include:
S201, when getting read command and not inquiring institute according to the read command in the snapshot LUN When stating the corresponding physical address of the first logical address, according to the source LUN stored in the snapshot LUN In logical address and the source LUN in physical address corresponding relation, determine described first logically Physical address in the corresponding source LUN in location;Wherein, the read command is used to read the snapshot The corresponding data of first logical address in LUN.
S202, according to the physical address in the corresponding source LUN of first logical address, read institute The data that the data stored in stating source LUN are read for needed for the read command.
In the present embodiment, the logical address being stored with the snapshot LUN in the source LUN with it is described The corresponding relation of the physical address in the LUN of source;Alternatively, it is stored with the LUN of source in the LUN of the source The corresponding relation of the physical address in logical address and source LUN, for example:In the LUN of source logically Location:0th, 1,2,3,4,5,6,7, with the physical address in the LUN of source:20、21、22、23、 24th, 25,26,27 have an one-to-one relationship, thus can be when snapshot LUN is activated, it is standby The pass corresponding with the physical address in the LUN of the source of the logical address in the LUN of the source in part source LUN Be into snapshot LUN so that the logical address in a steady stream in LUN that is stored with snapshot LUN with should The corresponding relation of the physical address in the LUN of source, it should be noted that needing before activation snapshot LUN Create snapshot LUN.
Therefore, when read command is got, the read command is used to read in the snapshot LUN the present embodiment The corresponding data of first logical address, according to the read command inquire about in snapshot LUN with the presence or absence of this The corresponding physical address of one logical address.If the first logical address correspondence is inquired in snapshot LUN Physical address, then data are read according to the corresponding physical address of first logical address, itself and existing skill Art is similar to, and here is omitted.If it is corresponding that first logical address is not inquired in snapshot LUN Physical address, that is, the mapping relations of the first logical address are empty in snapshot LUN, represent that this is fast According to the corresponding data of the first logical address that are not stored with LUN, then need to obtain from the LUN of source and be somebody's turn to do Data, then according in the logical address in the source LUN stored in snapshot LUN and source LUN Physical address corresponding relation, determine in the corresponding source LUN of first logical address physically Location.When it is determined that after physical address in the corresponding source LUN of the first logical address, according to source LUN In physical address, the data that the data stored in reading source LUN are read for needed for the read command.
In the present embodiment, in the logical address in active LUN and source LUN are stored in snapshot LUN Physical address corresponding relation, therefore, when do not read in snapshot LUN the first logical address correspondence Data when, directly according in the logical address in the source LUN stored in snapshot LUN and source LUN The corresponding relation of physical address, determines the physical address in the corresponding source LUN of the first logical address, and nothing Logical address and the thing stored in query source LUN need to be removed in being redirected to source LUN as prior art The corresponding relation of reason address, especially in the case where source LUN has multiple snapshot LUN, it is to avoid Substantial amounts of concurrent inquiry request and unnecessary information forwarding.
Fig. 3 is the flow chart of data snapshot method embodiment of the present invention three, as shown in figure 3, the present embodiment Method on the basis of the inventive method embodiment one or two, alternatively, the present embodiment is setting up described The corresponding relation of the first physical address in the first logical address in snapshot LUN and the snapshot LUN Afterwards, can also include:
S301, when write order is got, the write order will be for will treat according to first logical address Write data are write in the source LUN, and according to first logical address in the snapshot LUN When inquiring corresponding first physical address of first logical address, according in the source LUN The corresponding relation of the physical address in logical address and the source LUN, determines first logical address pair Physical address in the source LUN for answering.
S302, according to the physical address in the corresponding source LUN of first logical address, will be described Data to be written are write in the source LUN.
, when write order is got, the write order is for being written into according to the first logical address for the present embodiment Data are write in the LUN of the source, are inquired about in snapshot LUN according to the write order and first are patrolled with the presence or absence of this Collect the corresponding physical address in address.As the first logical address has been set up in snapshot LUN with first physically The corresponding relation of location, therefore physical address of the first logical address correspondence in snapshot LUN can be inquired For the first physical address, the corresponding data of first logical address that has been stored with representing snapshot LUN, Before being written into data write source LUN, without the need for as prior art again by first in the LUN of source The corresponding data of logical address are backed up in snapshot LUN again.Then the present embodiment is according in the LUN of source Physical address in logical address and source LUN corresponding relation (can store in the LUN of source, Can store in snapshot LUN), determine the thing in the corresponding source LUN of first logical address Reason address.When it is determined that after physical address in the corresponding source LUN of the first logical address, according to the source Physical address in LUN, the data to be written are write in the LUN of the source.
Fig. 4 is the flow chart of data snapshot method example IV of the present invention, as shown in figure 4, the present embodiment Method on the basis of the inventive method embodiment one or two, alternatively, the present embodiment is setting up described The corresponding relation of the first physical address in the first logical address in snapshot LUN and the snapshot LUN Afterwards, can also include:
S401, when write order is got, the write order will be for will treat according to first logical address Write data are write in the snapshot LUN, according to first logical address in the snapshot LUN With the corresponding relation of first physical address, first physical address is determined for described first logically Physical address in the corresponding snapshot LUN in location.
S402, according to first physical address, the data to be written are write in the snapshot LUN.
, when write order is got, the write order is for being written into according to the first logical address for the present embodiment Data are write in snapshot LUN, according to the write order inquire about in snapshot LUN with the presence or absence of this first The corresponding physical address of logical address.As the first logical address and the first physics have been set up in snapshot LUN The corresponding relation of address, therefore can inquire in the corresponding snapshot LUN of the first logical address physically Location be the first physical address, the corresponding data of first logical address that has been stored with representing snapshot LUN, Before data write source LUN is written into, without the need for as prior art again by the in the LUN of source The corresponding data of one logical address are backed up in snapshot LUN again.Then the present embodiment is according to first physics Address, the data to be written are write in snapshot LUN.
Fig. 5 is the structural representation of storage device embodiment of the present invention, as shown in figure 5, the present embodiment Storage device can include:Acquiring unit 11, determining unit 12, processing unit 13;Wherein, obtain Unit 11 is taken, for obtaining the first logical address in the LUN of source or first in snapshot LUN logically The reading frequency of location, wherein, the source LUN has identical logical address, institute with the snapshot LUN It is the arbitrary logical address in the source LUN and snapshot LUN to state the first logical address;It is determined that single Unit 12, for determining that in the first logical address or snapshot LUN in the source LUN described first patrols Whether the reading frequency for collecting address is more than predeterminated frequency;Processing unit 13, for determining when determining unit 12 The reading frequency of first logical address in the first logical address or snapshot LUN in the source LUN During more than predeterminated frequency, according to first logical address, described first is inquired about in the snapshot LUN The corresponding physical address of logical address;When not inquiring the corresponding snapshot of first logical address During physical address in LUN, the first logical address set up in the snapshot LUN and the snapshot LUN In the first physical address corresponding relation;And according to first physical address, back up the source LUN In first logical address corresponding to data into the snapshot LUN.
Alternatively, the logical address being stored with the source LUN in the snapshot LUN and the source The corresponding relation of the physical address in LUN;Acquiring unit 11, is additionally operable to obtain read command;Processing unit 13, be additionally operable in the first logical address in the snapshot LUN is set up and the snapshot LUN Before the corresponding relation of one physical address, when acquiring unit 11 gets read command, and read life according to described When order does not inquire the corresponding physical address of first logical address in the snapshot LUN, according to institute Physical address in logical address in the source LUN stored in stating snapshot LUN and the source LUN Corresponding relation, determine the physical address in the corresponding source LUN of first logical address;Wherein, The read command is used to read the corresponding data of first logical address in the snapshot LUN;And According to the physical address in the corresponding source LUN of first logical address, the source LUN is read The data that the data of middle storage are read for needed for the read command.
Alternatively, processing unit 13, are additionally operable to, when creating and activate the snapshot LUN, back up institute The corresponding relation of physical address in logical address in the LUN of source and the source LUN is stated to the snapshot In LUN.
Alternatively, acquiring unit 11, are additionally operable to obtain write order;Processing unit 13, is additionally operable to setting up The first logical address in the snapshot LUN is corresponding with the first physical address in the snapshot LUN After relation, when acquiring unit 11 gets write order, the write order is for patrolling according to described first Collect address to be written in the data write source LUN, and according to first logical address described fast During according to corresponding first physical address of first logical address is inquired in LUN, according to the source The corresponding relation of the physical address in the logical address in LUN and the source LUN, determines described first Physical address in the corresponding source LUN of logical address;And according to first logical address correspondence The source LUN in physical address, the data to be written are write in the source LUN.
Alternatively, acquiring unit 11, are additionally operable to obtain write order;Processing unit 13, is additionally operable to setting up The first logical address in the snapshot LUN is corresponding with the first physical address in the snapshot LUN After relation, when acquiring unit 11 gets write order, the write order is for patrolling according to described first Volume address is written into data and writes in the snapshot LUN, according to described the in the snapshot LUN One logical address and the corresponding relation of first physical address, determine that first physical address is described Physical address in the corresponding snapshot LUN of first logical address;And according to described first physically Location, the data to be written are write in the snapshot LUN.
The storage device of the present embodiment, can be used for performing the technical side of above-mentioned each method embodiment of the invention Case, which realizes that principle is similar with technique effect, and here is omitted.
Fig. 6 is the structural representation of storage device embodiment of the present invention two, as shown in fig. 6, the present embodiment Storage device can include:Processor 21, memorizer 22 and communication interface 23, wherein, above-mentioned group Communicate to connect between part, such as can be attached with bus between said modules and be communicated, and the communication Interface 23 is connected with external equipment and is communicated;Memorizer 22 is used for storage for performing data snapshot method Code.Processor 21 and communication interface 23 are used to call the code to perform following operation:
Processor 21 is used to obtain the first logic in the first logical address or snapshot LUN in the LUN of source The reading frequency of address, wherein, the source LUN has identical logical address with the snapshot LUN, First logical address is the arbitrary logical address in the source LUN and snapshot LUN;Work as institute State first logical address in first logical address or the snapshot LUN in the LUN of source When reading frequency more than predeterminated frequency, according to first logical address, institute is inquired about in the snapshot LUN State the corresponding physical address of the first logical address;It is corresponding described when first logical address is not inquired During physical address in snapshot LUN, the first logical address set up in the snapshot LUN is fast with described The corresponding relation of the first physical address according to LUN, and according to first physical address, backup is described The data corresponding to first logical address in the LUN of source are into the snapshot LUN.
Alternatively, the logical address being stored with the source LUN in the snapshot LUN and the source The corresponding relation of the physical address in LUN;
Communication interface 23, for obtaining read command;
Processor 21, the first logical address being additionally operable in the snapshot LUN is set up and the snapshot Before the corresponding relation of the first physical address in LUN, when communication interface 23 gets read command and root First logical address is not inquired in the snapshot LUN according to the read command corresponding physically During location, according to the logical address in the source LUN stored in the snapshot LUN and the source LUN In physical address corresponding relation, determine the thing in the corresponding source LUN of first logical address Reason address;Wherein, the read command is used to read first logical address pair in the snapshot LUN The data answered;According to the physical address in the corresponding source LUN of first logical address, institute is read The data that the data stored in stating source LUN are read for needed for the read command.
Alternatively, processor 21, are additionally operable to when creating and activate the snapshot LUN, and backup is described The corresponding relation of the physical address in the logical address in the LUN of source and the source LUN is to the snapshot In LUN.
Alternatively, communication interface 23, are additionally operable to obtain write order;
Processor 21, the first logical address being additionally operable in the snapshot LUN is set up and the snapshot After the corresponding relation of the first physical address in LUN, when communication interface 23 gets write order, The write order is write in the source LUN for being written into data according to first logical address, and First logical address is inquired in the snapshot LUN according to first logical address corresponding During first physical address, according to the thing in the logical address in the source LUN and the source LUN The corresponding relation of reason address, determines in the corresponding source LUN of first logical address physically Location;According to the physical address in the corresponding source LUN of first logical address, will be described to be written Data are write in the source LUN.
Alternatively, communication interface 23, are additionally operable to obtain write order;
Processor 21, the first logical address being additionally operable in the snapshot LUN is set up and the snapshot After the corresponding relation of the first physical address in LUN, when communication interface 23 gets write order, The write order is write in the snapshot LUN for being written into data according to first logical address, According to the corresponding relation of first logical address in the snapshot LUN and first physical address, Determine that first physical address is the physics in the corresponding snapshot LUN of first logical address Address;According to first physical address, the data to be written are write in the snapshot LUN.
The storage device of the present embodiment, can be used for performing the technical side of above-mentioned each method embodiment of the invention Case, which realizes that principle is similar with technique effect, and here is omitted.
One of ordinary skill in the art will appreciate that:Realize all or part of step of above-mentioned each method embodiment Suddenly can be completed by the related hardware of programmed instruction.Aforesaid program can be stored in a computer can Read in storage medium.The program upon execution, performs the step of including above-mentioned each method embodiment;And Aforesaid storage medium includes:Read-only memory (English:Read-Only Memory, referred to as:ROM)、 Random access memory (English:Random Access Memory, referred to as:RAM), magnetic disc or CD etc. is various can be with the medium of store program codes.
Finally it should be noted that:Various embodiments above is only illustrating technical scheme rather than right Its restriction;Although being described in detail to the present invention with reference to foregoing embodiments, this area it is common Technical staff should be understood:Which still can be modified to the technical scheme described in foregoing embodiments, Or equivalent is carried out to which part or all technical characteristic;And these modifications or replacement, and The scope of the essence disengaging various embodiments of the present invention technical scheme of appropriate technical solution is not made.

Claims (10)

1. a kind of data snapshot method, it is characterised in that include:
In LUN LUN of acquisition source in the first logical address or snapshot LUN first is logically The reading frequency of location, wherein, the source LUN has identical logical address, institute with the snapshot LUN It is the arbitrary logical address in the source LUN and snapshot LUN to state the first logical address;
When described first in first logical address or the snapshot LUN in the source LUN is patrolled When collecting the reading frequency of address more than predeterminated frequency, according to first logical address, in the snapshot LUN It is middle to inquire about the corresponding physical address of first logical address;
During physical address in the corresponding snapshot LUN of first logical address is not inquired, build Stand the right of the first physical address in the first logical address and the snapshot LUN in the snapshot LUN Should be related to, and according to first physical address, back up first logical address in the source LUN Corresponding data are into the snapshot LUN.
2. method according to claim 1, it is characterised in that be stored with the snapshot LUN The corresponding relation of the physical address in the logical address in the source LUN and the source LUN;
The first physics in the first logical address in the snapshot LUN is set up and the snapshot LUN Before the corresponding relation of address, also include:
When getting read command and described not inquired in the snapshot LUN according to the read command During the corresponding physical address of one logical address, according in the source LUN stored in the snapshot LUN Logical address and the source LUN in physical address corresponding relation, determine first logical address Physical address in the corresponding source LUN;Wherein, the read command is used to read the snapshot LUN In the corresponding data of first logical address;
According to the physical address in the corresponding source LUN of first logical address, the source is read The data that the data stored in LUN are read for needed for the read command.
3. method according to claim 2, it is characterised in that also include:
When the snapshot LUN is activated, the logical address and the source LUN in the source LUN is backed up In physical address corresponding relation into the snapshot LUN.
4. the method according to claim 1-3 any one, it is characterised in that described in the foundation The corresponding relation of the first physical address in the first logical address in snapshot LUN and the snapshot LUN Afterwards, also include:
When write order is got, the write order for according to first logical address be written into number According to the write source LUN, and inquired in the snapshot LUN according to first logical address During corresponding first physical address of first logical address, according in the source LUN logically The corresponding relation of the physical address in location and the source LUN, determines the corresponding institute of first logical address State the physical address in the LUN of source;
According to the physical address in the corresponding source LUN of first logical address, will be described to be written Data are write in the source LUN.
5. the method according to claim 1-3 any one, it is characterised in that described in the foundation The corresponding relation of the first physical address in the first logical address in snapshot LUN and the snapshot LUN Afterwards, also include:
When write order is got, the write order for according to first logical address be written into number According to writing in the snapshot LUN, according to first logical address in the snapshot LUN with it is described The corresponding relation of the first physical address, determines first physical address for first logical address correspondence The snapshot LUN in physical address;
According to first physical address, the data to be written are write in the snapshot LUN.
6. a kind of storage device, it is characterised in that include:
Acquiring unit, for obtaining the first logical address in LUN LUN of source or snapshot LUN In the first logical address reading frequency, wherein, the source LUN and snapshot LUN has identical Logical address, first logical address is that arbitrary in the source LUN and snapshot LUN patrols Collect address;
Determining unit, for determining first logical address in the source LUN or the snapshot LUN In the reading frequency of first logical address whether be more than predeterminated frequency;
Processing unit, for determining first logical address in the source LUN when the determining unit Or the reading frequency of first logical address in the snapshot LUN be more than predeterminated frequency when, according to described First logical address, inquires about the corresponding physical address of first logical address in the snapshot LUN; During physical address in the corresponding snapshot LUN of first logical address is not inquired, institute is set up State the first logical address pass corresponding with the first physical address in the snapshot LUN in snapshot LUN System;And according to first physical address, the first logical address institute backed up in the source LUN is right The data answered are into the snapshot LUN.
7. storage device according to claim 6, it is characterised in that deposit in the snapshot LUN Contain the corresponding relation of the physical address in logical address in the source LUN and the source LUN;
The acquiring unit, is additionally operable to obtain read command;
The processing unit, the first logical address being additionally operable in the snapshot LUN is set up are fast with described Before the corresponding relation of the first physical address according to LUN, when the acquiring unit gets read command, And the corresponding thing of first logical address is not inquired in the snapshot LUN according to the read command During reason address, according to the logical address in the source LUN stored in the snapshot LUN and the source The corresponding relation of the physical address in LUN, determines the corresponding source LUN of first logical address In physical address;Wherein, the read command is used to read first logic in the snapshot LUN The corresponding data in address;And according in the corresponding source LUN of first logical address physically Location, the data that the data stored in reading the source LUN are read for needed for the read command.
8. storage device according to claim 7, it is characterised in that the processing unit, also uses In the logical address in the source LUN and the source LUN when the snapshot LUN is activated, is backed up Physical address corresponding relation into the snapshot LUN.
9. the storage device according to claim 6-8 any one, it is characterised in that
The acquiring unit, is additionally operable to obtain write order;
The processing unit, the first logical address being additionally operable in the snapshot LUN is set up are fast with described After the corresponding relation of the first physical address according to LUN, when the acquiring unit gets write order When, the write order writes the source LUN for being written into data according to first logical address In, and first logical address pair is inquired in the snapshot LUN according to first logical address During first physical address answered, according in the logical address in the source LUN and the source LUN Physical address corresponding relation, determine the physics in the corresponding source LUN of first logical address Address;And according to the physical address in the corresponding source LUN of first logical address, will be described Data to be written are write in the source LUN.
10. the storage device according to claim 6-8 any one, it is characterised in that
The acquiring unit, is additionally operable to obtain write order;
The processing unit, the first logical address being additionally operable in the snapshot LUN is set up are fast with described After the corresponding relation of the first physical address according to LUN, when the acquiring unit gets write order, The write order is write in the snapshot LUN for being written into data according to first logical address, According to the corresponding relation of first logical address in the snapshot LUN and first physical address, Determine first physical address be in the corresponding snapshot LUN of first logical address physically Location;And according to first physical address, the data to be written are write in the snapshot LUN.
CN201510626065.1A 2015-09-28 2015-09-28 Data snapshot method and storage device Active CN106557385B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201510626065.1A CN106557385B (en) 2015-09-28 2015-09-28 Data snapshot method and storage device
PCT/CN2016/087913 WO2017054539A1 (en) 2015-09-28 2016-06-30 Data snapshot method and storage device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510626065.1A CN106557385B (en) 2015-09-28 2015-09-28 Data snapshot method and storage device

Publications (2)

Publication Number Publication Date
CN106557385A true CN106557385A (en) 2017-04-05
CN106557385B CN106557385B (en) 2020-01-21

Family

ID=58416464

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510626065.1A Active CN106557385B (en) 2015-09-28 2015-09-28 Data snapshot method and storage device

Country Status (2)

Country Link
CN (1) CN106557385B (en)
WO (1) WO2017054539A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109165120A (en) * 2018-08-08 2019-01-08 华为技术有限公司 Snapshot and difference bitmap generation method and product are managed in distributed memory system

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113986128A (en) * 2021-10-26 2022-01-28 杭州宏杉科技股份有限公司 LUN data copying method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101359301A (en) * 2008-08-19 2009-02-04 成都市华为赛门铁克科技有限公司 Auto snapshot method and device
CN102929748A (en) * 2012-11-08 2013-02-13 华为技术有限公司 Method and device for data backup
US8959388B1 (en) * 2012-12-28 2015-02-17 Emc Corporation Managing TLU recovery using pre-allocated LUN slices
CN104407935A (en) * 2014-11-07 2015-03-11 华为数字技术(成都)有限公司 Snapshot rollback method and storage equipment
CN104572478A (en) * 2013-10-14 2015-04-29 联想(北京)有限公司 Data access method and data access device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100439675B1 (en) * 2002-10-24 2004-07-14 한국전자통신연구원 An efficient snapshot technique for shated large storage
US8028136B2 (en) * 2007-03-09 2011-09-27 International Business Machines Corporation Retaining disk identification in operating system environment after a hardware-driven snapshot restore from a snapshot-LUN created using software-driven snapshot architecture
CN102591790B (en) * 2011-12-30 2015-11-25 记忆科技(深圳)有限公司 Data based on solid state hard disc store snapshot implementing method and solid state hard disc
CN104331344A (en) * 2014-11-11 2015-02-04 浪潮(北京)电子信息产业有限公司 Data backup method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101359301A (en) * 2008-08-19 2009-02-04 成都市华为赛门铁克科技有限公司 Auto snapshot method and device
CN102929748A (en) * 2012-11-08 2013-02-13 华为技术有限公司 Method and device for data backup
US8959388B1 (en) * 2012-12-28 2015-02-17 Emc Corporation Managing TLU recovery using pre-allocated LUN slices
CN104572478A (en) * 2013-10-14 2015-04-29 联想(北京)有限公司 Data access method and data access device
CN104407935A (en) * 2014-11-07 2015-03-11 华为数字技术(成都)有限公司 Snapshot rollback method and storage equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109165120A (en) * 2018-08-08 2019-01-08 华为技术有限公司 Snapshot and difference bitmap generation method and product are managed in distributed memory system
CN109165120B (en) * 2018-08-08 2022-04-05 华为技术有限公司 Method and product for generating management snapshot and difference bitmap in distributed storage system

Also Published As

Publication number Publication date
WO2017054539A1 (en) 2017-04-06
CN106557385B (en) 2020-01-21

Similar Documents

Publication Publication Date Title
CN102209952B (en) Storage system and method for operating storage system
US8819338B2 (en) Storage system and storage apparatus
CN102096561B (en) Hierarchical data storage processing method, device and storage equipment
KR20120140652A (en) Buffer disk in flashcopy cascade
CN104407933A (en) Data backup method and device
CN106462492A (en) Solid state drive operations
US20140215127A1 (en) Apparatus, system, and method for adaptive intent logging
CN107111531A (en) Use the data recovery of distribution diagram
CN103092765B (en) Solid-state memory system, device and method for writing data
CN104166601A (en) Storage data backup method and device
CN104063284B (en) The method and apparatus running application program
CN102136274A (en) Mobile hard disk with two storage media
US8954668B2 (en) Writing of data of a first block size in a raid array that stores and mirrors data in a second block size
CN106610788B (en) Hard disk array control method and device
CN106557385A (en) Data snapshot method and storage device
CN104407806B (en) The amending method and device of RAID group hard disc information
CN102508743A (en) Multi-point backup and real-time protection method for Linux file system
CN104572374A (en) Storage processing method, storage processing device and storage equipment
CN103713860A (en) Method and system for building virtual disk base on basis of backup architecture
CN102830941B (en) The driving method of solid state hard disc and storage system thereof
CN205862287U (en) A kind of solid state hard disc realizing the control of many disks
CN109753222A (en) Data-erasure method, server and computer-readable medium
CN104360959B (en) The method and controller of data storage
CN105260132B (en) A kind of method and apparatus of heat load disk filter driving
CN103780634B (en) Data interaction method and data interaction device

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