CN109388347A - A kind of data migration method and device - Google Patents
A kind of data migration method and device Download PDFInfo
- Publication number
- CN109388347A CN109388347A CN201811198305.2A CN201811198305A CN109388347A CN 109388347 A CN109388347 A CN 109388347A CN 201811198305 A CN201811198305 A CN 201811198305A CN 109388347 A CN109388347 A CN 109388347A
- Authority
- CN
- China
- Prior art keywords
- memory block
- data
- transition state
- storage region
- state
- 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
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0638—Organizing or formatting or addressing of data
- G06F3/064—Management of blocks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0646—Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
- G06F3/0647—Migration mechanisms
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/067—Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]
Abstract
The embodiment of the present application discloses in a kind of data migration method and device, first storage region is split, obtain multiple memory blocks, memory block is corresponding with data mode, the data mode of memory block may include original state or dbjective state, wherein the data mode of memory block is rewritten as dbjective state from original state when data are written to memory block.The migration to the data in the first storage region is obtained to instruct, if the corresponding data mode of memory block is dbjective state, then explanation carried out data write operation to memory block, therefore there are valid data in memory block, it can be instructed according to migration, data in memory block are migrated from the first storage region to the second storage region, if the corresponding data mode of memory block is original state, illustrate not carry out data write operation to memory block, therefore valid data are not present in memory block, the then migration without the data in memory block, to reduce the time of user's waiting, improve user experience.
Description
Technical field
This application involves computer field more particularly to a kind of data migration methods and device.
Background technique
With the development of information technology, information storage means is also gradually diversified, and Network storage technology is come into being.Its
In, Network storage technology can be divided into three kinds: Direct Attached Storage (Direct Attached Storage, DAS), memory block
Domain network (Storage AreaNetwork, SAN), network connection storage (NetworkAttached Storage, NAS).
In SAN storage equipment, there can be multiple resource pools (Pool), it, can be hard by adding in each resource pool
Disk creates disk array (Redundant Arrays of Independent Disks, RAID), and wherein hard disk can be string
Row advanced techniques interface (Serial Advanced Technology Attachment, SATA) hard disk, Serial Attached SCSI (SAS)
(Serial Attached SCSI, SAS) and solid state hard disk (Solid State Drive, SSD) etc..It, can in disk array
It to there is memory space for users to use, is indicated with logical unit number (Logical Unit Number, LUN), LUN again can be with
It referred to as rolls up, can store data in LUN.
In the prior art, the case where being stored in data in LUN there may be migrations, for example, from a resource pool migrate to
Another resource pool.While being migrated to data, if (Input) operation is written to the LUN of migration in host system
And/or (Output) operation is read, the data after data and migration before may cause migration are inconsistent, even result in data mistake
Accidentally.
Therefore, it will usually stop the operation of application relevant to the LUN of migration, to stop host system to migrating data
Read and write operation.Applications some in this way are not normally functioning, and user is needed to wait long period, the time of Data Migration
Longer, the time that user waits is also longer, and therefore, the mode of this Data Migration will lead to poor user experience.
Summary of the invention
In order to solve the above technical problems, the embodiment of the present application provides a kind of data migration method and device, by data
The migration for carrying out selectivity, to reduce period of reservation of number, provides user's body to reduce the time consumed by Data Migration
It tests.
The embodiment of the present application provides a kind of data migration method, which comprises
First storage region is split, multiple memory blocks are obtained;The memory block is corresponding with data mode, described to deposit
The data mode for storing up block includes original state or dbjective state;Number is being written to the memory block in the data mode of the memory block
According to when, be rewritten as dbjective state from original state;
The migration to the data in first storage region is obtained to instruct;
If the corresponding data mode of the memory block is the dbjective state, according to migration instruction, deposited described
Data in storage block are migrated from first storage region to the second storage region;
If the corresponding data mode of the memory block is the original state, without the data in the memory block
Migration.
Optionally, the preset transition state of the memory block be non-transition state, then the method also includes:
If the corresponding data mode of the memory block is the dbjective state, by the data in the memory block from institute
When stating the first storage region and being migrated to second storage region, by the transition state of the memory block from the non-transition state
It is adjusted to just in transition state;By the data in the memory block from first storage region to second storage region
After migration, the transition state of the memory block is just adjusted to complete transition state in transition state from described;
If the corresponding data mode of the memory block is the original state, by the transition state of the memory block from institute
It states non-transition state and is adjusted to the completion transition state.
Optionally, the method also includes:
If the transition state of the memory block is the non-transition state, data write-in behaviour is executed to the memory block
Make;
If the transition state of the memory block is described just in transition state, grasped the data of the memory block are written
It stores in the buffer;
If the transition state of the memory block is the completion transition state, to the memory block in second storage
Corresponding memory block executes data write operation in region.
Optionally, the method also includes:
If the transition state of the memory block is the non-transition state or described just in transition state, to the storage
Block executes data read operation;
If the transition state of the memory block is the completion transition state, to the memory block in second storage
Corresponding memory block executes data read operation in region.
Optionally, described that first storage region is split, obtain multiple memory blocks, comprising:
First storage region is split, multiple memory blocks are obtained;
Multiple memory blocks are split, multiple memory blocks are obtained.
Optionally, the method also includes:
According to the corresponding transition state in the memory block, the migration progress of the data in first storage region is generated.
The embodiment of the present application provides a kind of data migration device, and described device includes:
Region split cells obtains multiple memory blocks for splitting to the first storage region;The memory block is corresponding
There is data mode, the data mode of the memory block includes original state or dbjective state;The data mode of the memory block exists
When data are written to the memory block, dbjective state is rewritten as from original state;
Instruction acquisition unit is migrated, for obtaining the instruction of the migration to the data in first storage region;
Migration units, if being the dbjective state for the corresponding data mode of the memory block, according to the migration
Instruction, the data in the memory block are migrated from first storage region to the second storage region;If the memory block pair
The data mode answered is the original state, the then migration without the data in the memory block.
Optionally, the preset transition state of the memory block is non-transition state, then described device further includes transition state
Adjustment unit is used for:
If the corresponding data mode of the memory block is the dbjective state, by the data in the memory block from institute
When stating the first storage region and being migrated to second storage region, by the transition state of the memory block from the non-transition state
It is adjusted to just in transition state;By the data in the memory block from first storage region to second storage region
After migration, the transition state of the memory block is just adjusted to complete transition state in transition state from described;
If the corresponding data mode of the memory block is the original state, by the transition state of the memory block from institute
It states non-transition state and is adjusted to the completion transition state.
Optionally, described device further includes data write unit, is used for:
If the transition state of the memory block is the non-transition state, data write-in behaviour is executed to the memory block
Make;
If the transition state of the memory block is described just in transition state, grasped the data of the memory block are written
It stores in the buffer;
If the transition state of the memory block is the completion transition state, to the memory block in second storage
Corresponding memory block executes data write operation in region.
Optionally, described device further includes data-reading unit, is used for:
If the transition state of the memory block is the non-transition state or described just in transition state, to the storage
Block executes data read operation;
If the transition state of the memory block is the completion transition state, to the memory block in second storage
Corresponding memory block executes data read operation in region.
Optionally, the region split cells, comprising:
First split cells obtains multiple memory blocks for splitting to first storage region;
Second split cells obtains multiple memory blocks for splitting to multiple memory blocks.
Optionally, described device further includes migration progress generation unit, is used for:
According to the corresponding transition state in the memory block, the migration progress of the data in first storage region is generated.
In data migration method provided by the embodiments of the present application and device, the first storage region is split, is obtained
Multiple memory blocks, memory block are corresponding with data mode, and the data mode of memory block may include original state or dbjective state,
The data mode of middle memory block is rewritten as dbjective state from original state when data are written to memory block.Acquisition is deposited to first
The migration of data in storage area domain instructs, if the corresponding data mode of memory block is dbjective state, illustrates to carry out memory block
Data write operation is crossed, therefore there are valid data in memory block, can be instructed according to migration, by the data in memory block from the
One storage region is migrated to the second storage region, if the corresponding data mode of memory block is original state, is illustrated not to storage
Block carried out data write operation, therefore valid data, the then migration without the data in memory block are not present in memory block.
That is, in the embodiment of the present application, can be identified to whether there is valid data in memory block, it if it does not exist, can be with
Without the migration of the data in the memory block, to save the time of Data Migration, to reduce the time of user's waiting, improve
User experience.
Detailed description of the invention
In order to more clearly explain the technical solutions in the embodiments of the present application, make required in being described below to embodiment
Attached drawing is briefly described, it should be apparent that, the accompanying drawings in the following description is only some implementations as described in this application
Example, for those of ordinary skill in the art, is also possible to obtain other drawings based on these drawings.
Fig. 1 is a kind of flow chart of data migration method provided by the embodiments of the present application;
Fig. 2 is a kind of fractionation schematic diagram of illustrative pending data provided by the embodiments of the present application;
Fig. 3 is a kind of illustrative data handling procedure schematic diagram provided by the embodiments of the present application;
Fig. 4 is a kind of schematic diagram of illustrative migration mark provided by the embodiments of the present application;
Fig. 5 is a kind of structural block diagram of data migration device provided by the embodiments of the present application.
Specific embodiment
In order to make those skilled in the art more fully understand application scheme, below in conjunction in the embodiment of the present application
Attached drawing, the technical scheme in the embodiment of the application is clearly and completely described, it is clear that described embodiment is only this
Apply for a part of the embodiment, instead of all the embodiments.Based on the embodiment in the application, those of ordinary skill in the art exist
Every other embodiment obtained under the premise of creative work is not made, shall fall in the protection scope of this application.
In the prior art, data can store in SAN storage equipment, in the use process of data, it may be desirable to
Data in SAN storage equipment are migrated, such as data are migrated from the first storage region to the second storage region.And it is right
Data are migrated, it will usually influence with the operation of the relevant application program of data migrated, such as in data migration process,
If the data in the first storage region are written and/or read with (IO) operation, the data in the first storage region are passed through
Modification, but in the second storage region data corresponding with the data are not modified, and the number in the second storage region
According to being data as subsequent processing, that is to say, that use unmodified data as subsequent, be equivalent to writing for data
Enter failure.
Therefore, the operation that application program relevant to migrating data can be stopped, to avoid host system to migrating data
Write-in and read operation need user to wait longer time in this way, some application programs are not normally functioning, data are moved
The time of shifting is longer, and the time that user waits is also longer, and therefore, the mode of this Data Migration causes user experience poor.
Based on this, in the embodiment of the present application, provide a kind of data migration method and device, to the first storage region into
Row is split, and obtains multiple memory blocks, and memory block is corresponding with data mode, the data mode of memory block may include original state or
Dbjective state, wherein the data mode of memory block is rewritten as dbjective state from original state when data are written to memory block.It obtains
It takes the migration to the data in the first storage region to instruct, if the corresponding data mode of memory block is dbjective state, illustrates pair
Memory block carried out data write operation, therefore there are valid data in memory block, can be by the data in memory block from first
Storage region is migrated to the second storage region, if the corresponding data mode of memory block is original state, is illustrated not to memory block
Data write operation was carried out, therefore valid data, the then migration without the data in memory block are not present in memory block.?
That is can be identified to whether there is valid data in memory block in the embodiment of the present application, it if it does not exist, can not
The migration of the data in the memory block is carried out, to save the time of Data Migration, to reduce the time of user's waiting, improves and uses
Family experience.
With reference to the accompanying drawing, a kind of data migration method and device in the embodiment of the present application are described in detail by embodiment
Specific implementation.
A kind of flow chart of data migration method provided by the embodiments of the present application is shown with reference to Fig. 1, specifically, this method
It may comprise steps of:
S101 splits the first storage region, obtains multiple memory blocks.
In the embodiment of the present application, the first storage region is the storage region in SAN equipment, such as can be LUN, to
One storage region is split, and multiple memory blocks are obtained, can be specifically, LUN is split as multiple memory block Extent, each
Memory block can be split as multiple memory block Chunk.Refering to what is shown in Fig. 2, to be provided by the embodiments of the present application a kind of illustrative
The fractionation schematic diagram of pending data, wherein logical unit number is split, multiple memory blocks are obtained, the 4th is stored
Area is split, and multiple memory blocks are obtained, certainly, although it is not shown in the diagrams, but still it is appreciated that carrying out to other memory blocks
It splits, is similarly obtained multiple memory blocks.
In actual operation, the size of memory block can be determined by the resource pool of the memory block, it is generally the case that same
The size of memory block in resource pool is identical.The size of memory block can be determined by predefining, such as can be 16MB,
It can be other sizes, the size of the memory block of same memory block can be identical.It is understood that the size of memory block can be with
It is the integral multiple of the size of memory block, becomes integer memory block uniformly to split memory block, for example, memory block is big
Small when being 16MB, the size of memory block is the integral multiple of 16MB, such as can be 160MB, therefore the memory block can be split
As 10 memory blocks.
In the embodiment of the present application, memory block is corresponding with data mode, and data mode may include original state or target
State, when not carrying out data write operation to memory block, the corresponding data mode of memory block is original state, to memory block
When carrying out data write-in, the data mode of memory block can be rewritten as dbjective state from original state.In order to improve data shape
The mark of data mode can be arranged in the convenience of state for memory block, such as the mark of original state can be a, dbjective state
Mark can be b.Certainly, the mark of the data mode of memory block is also possible to other identifier, it is not limited here.
That is, according to the status indicator of the corresponding data mode of memory block, it can be determined that whether to the memory block into
Data write operation was gone, if carrying out data write operation, it is believed that there are valid data in the data block, if not carrying out
Data write operation is crossed, then it is believed that valid data are not present in the data block.
S102 obtains the migration to the data in the first storage region and instructs.
Migration instruction to the data in the first storage region, for being migrated to the data in the first storage region.
It may include the mark of the first storage region where data to be migrated and the destination address of data to be migrated in migration instruction
Mark, the i.e. mark of the second storage region, to instruct the migration for carrying out data according to migration.
When it is implemented, the first storage region and the second storage region can be located in different resource pools, such as first
Storage region is located in first resource pond, and the second storage region is located in Secondary resource pond;First storage region and the second storage
Region can also be located at the different disk array in same resource pool, such as the first storage region can be in first resource pond
First RAID, the second storage region can be the 2nd RAID in first resource pond.
It should be noted that the size phase of the memory block in the second storage region and the memory block in the first storage region
Together, so as in the memory block in the first storage region data can migrate into the memory block of the second storage region.
It wherein, may include valid data in the first storage region, wherein valid data refer to the data of user's write-in,
Other data in first storage region in addition to valid data can be regarded as invalid data, and invalid data refers to the first memory block
Initial data in domain, usually data of full 0.In the prior art, referred to according to the migration to the data in the first storage region
Enable, in the first storage region valid data and invalid data migrate.
S103 is instructed, by the number in the memory block if the corresponding data mode of memory block is dbjective state according to migration
It is migrated according to from the first storage region to the second storage region.
If the corresponding data mode of memory block is dbjective state, illustrate to carry out the data write operation to the memory block,
I.e. there are valid data in the memory block, can be instructed at this time according to migration, by the data in the memory block from the first memory block
Domain is migrated to the second storage region.
It, can be by the storage after the completion of data in the memory block are migrated from the first storage region to the second storage region
Data in block are deleted.When specific implementation, the data in the memory block and the corresponding relationship of the memory block can be changed.
If memory block has transition state, the initial migration state of memory block can be non-transition state.It will store
When data in block are migrated from the first storage region to the second storage region, the transition state of memory block can also never be migrated
State is adjusted to just in transition state;After by the data in memory block from the first storage region to the migration of the second storage region,
It can also be by the transition state of memory block from being just adjusted to complete transition state in transition state.
In order to improve the efficiency of data processing, the mark of transition state, citing can be set for the transition state of memory block
For, the mark of non-transition state can be 0, just can be 1 in the mark of transition state, and the mark for completing transition state can be with
It is 2, certainly, the mark of the transition state of memory block is also possible to other identifier, it is not limited here.
S104, if the corresponding data of memory block are original state, the migration without the data in the memory block.
If the corresponding data mode of memory block is original state, illustrate not carry out the data write operation to the memory block
Valid data are not present i.e. in the memory block, it at this time can be without the migration of the data in the memory block, to save data
The time of migration.This is because if valid data are not present in the memory block, then it is assumed that the data in the first storage region are usual
For the intrinsic initial data of storage equipment, such as it can be the data of full 0, at this point, even if without the data in the memory block
Migration can still have these initial data, that is to say, that not to this in the correspondence memory block in the second storage region
A little initial data are migrated, and while not influencing the accuracy of data, can save the time of Data Migration.
If memory block has transition state, if the corresponding data of memory block are original state, although without storage
The transition state of memory block never transition state can also be adjusted to complete transition state, no longer by the migration of the data in block
Carry out the migration of the data in the memory block.
It is understood that the corresponding data mode of same memory block includes one of dbjective state and original state,
Therefore, one of them only also can be executed for same memory block, above-mentioned S103 and S104, will not be performed simultaneously.
In data migration method provided by the embodiments of the present application, the first storage region is split, obtains multiple deposit
Block is stored up, memory block is corresponding with data mode, and the data mode of memory block may include original state or dbjective state, wherein storing
The data mode of block is rewritten as dbjective state from original state when data are written to memory block.It obtains to the first storage region
In data migration instruction, if the corresponding data mode of memory block be dbjective state, illustrate to carry out data to memory block
Write operation, therefore there are valid data in memory block, can be instructed according to migration, and the data in memory block are stored from first
Region is migrated to the second storage region, if the corresponding data mode of memory block is original state, illustrates not carry out memory block
Data write operation is crossed, therefore valid data, the then migration without the data in memory block are not present in memory block.Namely
It saying, in the embodiment of the present application, can be identified to whether there is valid data in memory block, it if it does not exist, can be without
The migration of data in the memory block, to reduce the time of user's waiting, improves user's body to save the time of Data Migration
It tests.
It, in the embodiment of the present application, can also be right according to the transition state of memory block in order to improve the efficiency of data processing
Data in corresponding second storage region of data or the memory block in the memory block in corresponding memory block are handled, example
Such as carry out write operation and/or the read operation of data.
When carrying out the write operation of data, following three kinds of situations can be divided into:
In the first case, if the transition state of memory block is non-transition state, which can be counted
According to write operation, since the data in memory block are only stored in the first storage region, data write-in behaviour is carried out to the memory block
After work, subsequent migration movement can be by the Data Migration in the memory block of write-in into the second storage region, therefore will not make
At error in data or write-in failure.Refering to what is shown in Fig. 3, being a kind of illustrative data handling procedure provided by the embodiments of the present application
Schematic diagram, the transition state of the memory block in the region C in the first storage region are non-transition state, then can be right when needed
Memory block in the region C carries out data write operation.
In second situation, if the transition state of memory block is just in transition state, if to the data in the memory block
The problem of carrying out data write operation, often will cause error in data or write-in failure, then can be by the data to the memory block
Write operation stores in the buffer, and after the data in the memory block complete migration, the transition state of the memory block has been changed to
When at transition state, then carry out data write operation.Refering to what is shown in Fig. 3, memory block in B area in the first storage region
Transition state is that can will then store in the buffer to the data write operation of the memory block in B area just in transition state.
In the third situation, if the transition state of memory block is to complete transition state, illustrate the data in the memory block
It is stored in the second storage region, then it can corresponding memory block executes data write-in behaviour in the second storage region to memory block
Make, at this point, the data of the write-in in the second storage region can be used for subsequent use.Certainly, the data in the memory block can also
It can be stored in simultaneously in the first storage region and the second storage region, it, can also be to the first memory block in order to realize that data are consistent
The memory block in domain executes data write operation.Refering to what is shown in Fig. 3, memory block in a-quadrant in the first storage region
Transition state is to complete transition state, then can execute data to the memory block in a-quadrant corresponding in the second storage region and write
Enter operation, it is of course also possible to execute data write operation to the memory block in the a-quadrant in the first storage region simultaneously.
When carrying out the read operation of data, following two situation can be divided into:
It in the first case, can be right if the transition state of memory block is for non-transition state or just in transition state
The memory block executes data read operation.Such as reading data can be executed to the memory block in the B area and the region C in Fig. 3
Operation.
If the transition state of memory block be complete transition state, can according to corresponding data write operation situation and
It is fixed.Specifically, if the transition state of memory block is when completing transition state, only to hold to corresponding memory block in the second storage region
Row data write operation then only can execute data read operation to the memory block in the second storage region at this time;If memory block
When transition state is completion transition state, while data are performed to the memory block in the first storage region and the second storage region
Write operation illustrates that the first storage region is consistent with the data in the memory block in the second storage region, then at this time can also be with
Data read operation is executed to the memory block in the memory block and/or the second storage region in the first storage region.
It in the embodiment of the present application, can also be more before carrying out Data Migration in order to improve the efficiency of data processing
Corresponding bitmap is arranged in a memory block, may include the migration mark of each memory block in the bitmap, for embodying each storage
The transition state in area.The migration mark of memory block can be determined by the transition state of memory block, for example, if in the memory block
The transition states of all memory blocks be to complete transition state, then the transition state of the memory block is to complete transition state, right
The migration mark answered can be 1, if there are memory blocks and/or migration that transition state is unfinished transition state in the memory block
State is just in the memory block of transition state, then the transition state of the memory block is not complete transition state, corresponding migration mark
Knowing can be 0.Refering to what is shown in Fig. 4, for a kind of schematic diagram of illustrative migration mark provided by the embodiments of the present application, wherein the
One storage region is logical unit number, and in logical unit number, the migration of first three memory block is identified as 1, indicates that it migrates shape
State is to complete transition state, and the 4th and later migration are identified as 0, indicates that its transition state is not complete transition state, the
In 4 memory blocks, the migration of first three memory block is identified as 2, indicates its transition state to complete transition state, the 4th storage
The migration of block is identified as 1, indicates that its transition state is just in transition state, and from the 5th storage BOB(beginning of block), migration mark is 0,
Indicate that its transition state is non-transition state.
In the embodiment of the present application, in order to improve user experience, first can also be generated according to the transition state of memory block
The migration progress of storage region, so that user checks.Specifically, can identify according to the migration of memory block, the first storage is generated
The migration progress in region, such as the quantity of the memory block of transition state and the total quantity of memory block can be completed by calculating
Ratio, to obtain the migration progress of the first storage region.If the first storage region includes n memory block, from fig. 4, it can be seen that
Logical unit number includes n memory block, is identified according to the migration of memory block, and the number of the available memory block for completing migration is
3, then the migration progress of the first storage region is 3/n.
In the embodiment of the present application, data processing can be carried out to memory block according to the transition state of memory block, such as into
Row data write operation and/or data read operation, since the transition state of multiple memory blocks is different, according to the migration of memory block
State to memory block carry out data processing, can to avoid in the prior art simultaneously the data in the first storage region are migrated
The problem of operating and handling error in data caused by operation, therefore it can be further reduced the dwell time of related application, it reduces
Period of reservation of number, to further increase user experience.
Based on a kind of data migration method that above embodiments provide, the embodiment of the present application also provides a kind of Data Migrations
Its working principle is described in detail with reference to the accompanying drawing in device.
It is a kind of structural block diagram of the device of data processing provided by the embodiments of the present application with reference to Fig. 5, which includes:
Region split cells 110 obtains multiple memory blocks for splitting to the first storage region;The memory block
It is corresponding with data mode, the data mode of the memory block includes original state or dbjective state;The data shape of the memory block
State is rewritten as dbjective state from original state when data are written to the memory block;
Instruction acquisition unit 120 is migrated, for obtaining the instruction of the migration to the data in first storage region;
Migration units 130 are moved according to if being the dbjective state for the corresponding data mode of the memory block
Instruction is moved, the data in the memory block are migrated from first storage region to the second storage region;If the memory block
Corresponding data mode is the original state, the then migration without the data in the memory block.
Optionally, the preset transition state of the memory block is non-transition state, then described device further includes transition state
Adjustment unit is used for:
If the corresponding data mode of the memory block is the dbjective state, by the data in the memory block from institute
When stating the first storage region and being migrated to second storage region, by the transition state of the memory block from the non-transition state
It is adjusted to just in transition state;By the data in the memory block from first storage region to second storage region
After migration, the transition state of the memory block is just adjusted to complete transition state in transition state from described;
If the corresponding data mode of the memory block is the original state, by the transition state of the memory block from institute
It states non-transition state and is adjusted to the completion transition state.
Optionally, described device further includes data write unit, is used for:
If the transition state of the memory block is the non-transition state, data write-in behaviour is executed to the memory block
Make;
If the transition state of the memory block is described just in transition state, grasped the data of the memory block are written
It stores in the buffer;
If the transition state of the memory block is the completion transition state, to the memory block in second storage
Corresponding memory block executes data write operation in region.
Optionally, described device further includes data-reading unit, is used for:
If the transition state of the memory block is the non-transition state or described just in transition state, to the storage
Block executes data read operation;
If the transition state of the memory block is the completion transition state, to the memory block in second storage
Corresponding memory block executes data read operation in region.
Optionally, the region split cells, comprising:
First split cells obtains multiple memory blocks for splitting to first storage region;
Second split cells obtains multiple memory blocks for splitting to multiple memory blocks.
Optionally, described device further includes migration progress generation unit, is used for:
According to the corresponding transition state in the memory block, the migration progress of the data in first storage region is generated.
In data migration device provided by the embodiments of the present application, the first storage region is split, obtains multiple deposit
Block is stored up, memory block is corresponding with data mode, and the data mode of memory block may include original state or dbjective state, wherein storing
The data mode of block is rewritten as dbjective state from original state when data are written to memory block.It obtains to the first storage region
In data migration instruction, if the corresponding data mode of memory block be dbjective state, illustrate to carry out data to memory block
Write operation, therefore there are valid data in memory block, can be instructed according to migration, and the data in memory block are stored from first
Region is migrated to the second storage region, if the corresponding data mode of memory block is original state, illustrates not carry out memory block
Data write operation is crossed, therefore valid data, the then migration without the data in memory block are not present in memory block.Namely
It saying, in the embodiment of the present application, can be identified to whether there is valid data in memory block, it if it does not exist, can be without
The migration of data in the memory block, to reduce the time of user's waiting, improves user's body to save the time of Data Migration
It tests.
" first " in the titles such as " first ... " mentioned in the embodiment of the present application, " first ... " is used only to do name
Word mark, does not represent first sequentially.The rule is equally applicable to " second " etc..
As seen through the above description of the embodiments, those skilled in the art can be understood that above-mentioned implementation
All or part of the steps in example method can add the mode of general hardware platform to realize by software.Based on this understanding,
The technical solution of the application can be embodied in the form of software products, which can store is situated between in storage
In matter, such as read-only memory (English: read-onlymemory, ROM)/RAM, magnetic disk, CD etc., including some instructions to
So that a computer equipment (can be the network communication equipments such as personal computer, server, or router) executes
Method described in certain parts of each embodiment of the application or embodiment.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodiment
Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for method reality
For applying example and apparatus embodiments, since it is substantially similar to system embodiment, so describe fairly simple, related place ginseng
See the part explanation of system embodiment.Equipment and system embodiment described above is only schematical, wherein making
It may or may not be physically separated for the module of separate part description, the component shown as module can be
Or it may not be physical module, it can it is in one place, or may be distributed over multiple network units.It can be with
Some or all of the modules therein is selected to achieve the purpose of the solution of this embodiment according to the actual needs.The common skill in this field
Art personnel can understand and implement without creative efforts.
The above is only the preferred embodiment of the application, is not intended to limit the protection scope of the application.It should refer to
Out, for those skilled in the art, it under the premise of not departing from the application, can also make several improvements
And retouching, these improvements and modifications also should be regarded as the protection scope of the application.
Claims (12)
1. a kind of data migration method, which is characterized in that the described method includes:
First storage region is split, multiple memory blocks are obtained;The memory block is corresponding with data mode, the memory block
Data mode include original state or dbjective state;Data are being written to the memory block in the data mode of the memory block
When, dbjective state is rewritten as from original state;
The migration to the data in first storage region is obtained to instruct;
If the corresponding data mode of the memory block is the dbjective state, according to migration instruction, by the memory block
In data migrated from first storage region to the second storage region;
If the corresponding data mode of the memory block is the original state, without moving for the data in the memory block
It moves.
2. the method according to claim 1, wherein the preset transition state of the memory block is not migrate shape
State, then the method also includes:
If the corresponding data mode of the memory block is the dbjective state, by the data in the memory block from described the
When one storage region is migrated to second storage region, the transition state of the memory block is adjusted from the non-transition state
For just in transition state;Data in the memory block are being migrated from first storage region to second storage region
Afterwards, the transition state of the memory block is just adjusted to complete transition state in transition state from described;
If the corresponding data mode of the memory block is the original state, by the transition state of the memory block from it is described not
Transition state is adjusted to the completion transition state.
3. according to the method described in claim 2, it is characterized in that, the method also includes:
If the transition state of the memory block is the non-transition state, data write operation is executed to the memory block;
If the transition state of the memory block be it is described just in transition state, the data write operation of the memory block will be deposited
Storage is in the buffer;
If the transition state of the memory block is the completion transition state, to the memory block in second storage region
In corresponding memory block execute data write operation.
4. according to the method described in claim 2, it is characterized in that, the method also includes:
If the transition state of the memory block is the non-transition state or described just in transition state, the memory block is held
Row data read operation;
If the transition state of the memory block is the completion transition state, to the memory block in second storage region
In corresponding memory block execute data read operation.
5. the method according to claim 1, which is characterized in that described to be torn open to the first storage region
Point, obtain multiple memory blocks, comprising:
First storage region is split, multiple memory blocks are obtained;
Multiple memory blocks are split, multiple memory blocks are obtained.
6. the method according to claim 1, which is characterized in that the method also includes:
According to the corresponding transition state in the memory block, the migration progress of the data in first storage region is generated.
7. a kind of data migration device, which is characterized in that described device includes:
Region split cells obtains multiple memory blocks for splitting to the first storage region;The memory block is corresponding with number
According to state, the data mode of the memory block includes original state or dbjective state;The data mode of the memory block is to institute
When stating memory block write-in data, dbjective state is rewritten as from original state;
Instruction acquisition unit is migrated, for obtaining the instruction of the migration to the data in first storage region;
Migration units instruct if being the dbjective state for the corresponding data mode of the memory block according to the migration,
Data in the memory block are migrated from first storage region to the second storage region;If the corresponding number of the memory block
It is the original state, the then migration without the data in the memory block according to state.
8. device according to claim 7, which is characterized in that the preset transition state of memory block is not migrate shape
State, then described device further includes transition state adjustment unit, is used for:
If the corresponding data mode of the memory block is the dbjective state, by the data in the memory block from described the
When one storage region is migrated to second storage region, the transition state of the memory block is adjusted from the non-transition state
For just in transition state;Data in the memory block are being migrated from first storage region to second storage region
Afterwards, the transition state of the memory block is just adjusted to complete transition state in transition state from described;
If the corresponding data mode of the memory block is the original state, by the transition state of the memory block from it is described not
Transition state is adjusted to the completion transition state.
9. device according to claim 8, which is characterized in that described device further includes data write unit, is used for:
If the transition state of the memory block is the non-transition state, data write operation is executed to the memory block;
If the transition state of the memory block be it is described just in transition state, the data write operation of the memory block will be deposited
Storage is in the buffer;
If the transition state of the memory block is the completion transition state, to the memory block in second storage region
In corresponding memory block execute data write operation.
10. device according to claim 8, which is characterized in that described device further includes data-reading unit, is used for:
If the transition state of the memory block is the non-transition state or described just in transition state, the memory block is held
Row data read operation;
If the transition state of the memory block is the completion transition state, to the memory block in second storage region
In corresponding memory block execute data read operation.
11. according to device described in claim 7 to 10 any one, which is characterized in that the region split cells, comprising:
First split cells obtains multiple memory blocks for splitting to first storage region;
Second split cells obtains multiple memory blocks for splitting to multiple memory blocks.
12. according to device described in claim 7 to 10 any one, which is characterized in that described device further includes migration progress
Generation unit is used for:
According to the corresponding transition state in the memory block, the migration progress of the data in first storage region is generated.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811198305.2A CN109388347A (en) | 2018-10-15 | 2018-10-15 | A kind of data migration method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811198305.2A CN109388347A (en) | 2018-10-15 | 2018-10-15 | A kind of data migration method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109388347A true CN109388347A (en) | 2019-02-26 |
Family
ID=65427454
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811198305.2A Pending CN109388347A (en) | 2018-10-15 | 2018-10-15 | A kind of data migration method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109388347A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111007985A (en) * | 2019-10-31 | 2020-04-14 | 苏州浪潮智能科技有限公司 | Compatible processing method, system and equipment for space recovery of storage system |
CN112306408A (en) * | 2020-10-27 | 2021-02-02 | 苏州浪潮智能科技有限公司 | Storage block processing method, device, equipment and storage medium |
CN112559448A (en) * | 2021-02-19 | 2021-03-26 | 腾讯科技(深圳)有限公司 | Data state migration method and device, computer equipment and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106445421A (en) * | 2016-10-14 | 2017-02-22 | 郑州云海信息技术有限公司 | Storage system data migration method and system |
CN106469120A (en) * | 2016-08-30 | 2017-03-01 | 华为技术有限公司 | Scrap cleaning method, device and equipment |
CN106648468A (en) * | 2016-12-29 | 2017-05-10 | 郑州云海信息技术有限公司 | Control method and system for IO request during data migration process |
CN108268501A (en) * | 2016-12-30 | 2018-07-10 | 中国移动通信集团北京有限公司 | Method for processing business and device in a kind of online data transition process |
-
2018
- 2018-10-15 CN CN201811198305.2A patent/CN109388347A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106469120A (en) * | 2016-08-30 | 2017-03-01 | 华为技术有限公司 | Scrap cleaning method, device and equipment |
CN106445421A (en) * | 2016-10-14 | 2017-02-22 | 郑州云海信息技术有限公司 | Storage system data migration method and system |
CN106648468A (en) * | 2016-12-29 | 2017-05-10 | 郑州云海信息技术有限公司 | Control method and system for IO request during data migration process |
CN108268501A (en) * | 2016-12-30 | 2018-07-10 | 中国移动通信集团北京有限公司 | Method for processing business and device in a kind of online data transition process |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111007985A (en) * | 2019-10-31 | 2020-04-14 | 苏州浪潮智能科技有限公司 | Compatible processing method, system and equipment for space recovery of storage system |
CN111007985B (en) * | 2019-10-31 | 2021-10-22 | 苏州浪潮智能科技有限公司 | Compatible processing method, system and equipment for space recovery of storage system |
CN112306408A (en) * | 2020-10-27 | 2021-02-02 | 苏州浪潮智能科技有限公司 | Storage block processing method, device, equipment and storage medium |
CN112559448A (en) * | 2021-02-19 | 2021-03-26 | 腾讯科技(深圳)有限公司 | Data state migration method and device, computer equipment and storage medium |
CN112559448B (en) * | 2021-02-19 | 2021-05-18 | 腾讯科技(深圳)有限公司 | Data state migration method and device, computer equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP2300921B1 (en) | Flashcopy handling | |
US9400611B1 (en) | Data migration in cluster environment using host copy and changed block tracking | |
US9965216B1 (en) | Targetless snapshots | |
US20120144110A1 (en) | Methods and structure for storage migration using storage array managed server agents | |
US10719274B2 (en) | Consistent replication of virtual computing instance data | |
US7831792B2 (en) | Computer system, data migration method and storage management server | |
US9116852B2 (en) | Processing a copy command directed to a first storage architecture for data that is stored in a second storage architecture | |
US10852966B1 (en) | System and method for creating mapped RAID group during expansion of extent pool | |
US9575684B2 (en) | Logically partitioning remote virtual library extensions for use in disaster recovery of production data | |
CN109388347A (en) | A kind of data migration method and device | |
US20210232458A1 (en) | Logical backup using a storage system | |
US20160378365A1 (en) | Efficient data deployment for a parallel data processing system | |
US8990528B2 (en) | Method for fast format of a fully allocated volume when copied from a space efficient volume | |
US9213497B2 (en) | Storage apparatus and storage apparatus migration method | |
US10430121B2 (en) | Efficient asynchronous mirror copy of fully provisioned volumes to thin-provisioned volumes | |
US11119682B2 (en) | Compressed extent versions | |
US11099751B2 (en) | Determining tracks to release in a source volume being copied to a target volume | |
US10394455B2 (en) | Determining tracks to release in a target volume mirrored from a source volume | |
US8433868B2 (en) | Concurrent copy of system configuration global metadata | |
US20180321858A1 (en) | Maintaining correct i/o statistics in a tiered storage environment | |
US10162531B2 (en) | Physical allocation unit optimization | |
US10592154B1 (en) | Accessing data previously migrated to a cloud | |
US10579481B1 (en) | Restoring data from a storage device to a cloud | |
CN109086005A (en) | A kind of method and device of data processing | |
US10437497B1 (en) | Active-active host environment |
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 |
Application publication date: 20190226 |
|
RJ01 | Rejection of invention patent application after publication |