CN114442943A - Data migration method, system and equipment - Google Patents

Data migration method, system and equipment Download PDF

Info

Publication number
CN114442943A
CN114442943A CN202210006811.7A CN202210006811A CN114442943A CN 114442943 A CN114442943 A CN 114442943A CN 202210006811 A CN202210006811 A CN 202210006811A CN 114442943 A CN114442943 A CN 114442943A
Authority
CN
China
Prior art keywords
lun
data
target
storage device
record
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
CN202210006811.7A
Other languages
Chinese (zh)
Other versions
CN114442943B (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.)
Macrosan Technologies Co Ltd
Original Assignee
Macrosan Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Macrosan Technologies Co Ltd filed Critical Macrosan Technologies Co Ltd
Priority to CN202210006811.7A priority Critical patent/CN114442943B/en
Publication of CN114442943A publication Critical patent/CN114442943A/en
Application granted granted Critical
Publication of CN114442943B publication Critical patent/CN114442943B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/0647Migration mechanisms
    • 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
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0614Improving the reliability of storage systems
    • G06F3/0619Improving the reliability of storage systems in relation to data integrity, e.g. data losses, bit errors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0683Plurality of storage devices
    • G06F3/0689Disk arrays, e.g. RAID, JBOD

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Quality & Reliability (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides a data migration method, a system and a device, wherein a data plane record list of a first storage device aiming at a first LUN comprises a data plane record of a second LUN, a data plane record aiming at the second LUN corresponding to an earliest timestamp T is obtained from the data plane record, and a data increment of the first LUN is synchronized to the second LUN according to a difference bitmap aiming at T, a difference bitmap corresponding to the T after the T and a data change bitmap of the second LUN; when the second LUN is imported into the second storage device, after detecting that the second LUN has been configured with data synchronization services belonging to other storage devices, creating a data change bitmap for the second LUN, so that when the second LUN is processing a write command, the data change bitmap is updated. According to the method and the device, data synchronous processing operation is not performed on the second storage device, only simple disk exchange is performed, the complexity of migration operation is simplified, and the migration efficiency is improved.

Description

Data migration method, system and equipment
Technical Field
The present application relates to the field of data storage technologies, and in particular, to a data migration method, system, and device.
Background
With the advent of the big data era, the data volume is larger and more important, and the migration and backup of data across devices also become a common requirement. In a common implementation scheme, data is frequently migrated between the data center S1 and the data center S2 through a network, but for security reasons and other reasons, if the network is not available between the data center S1 and the data center S2, the existing data synchronization service (such as replication, mirroring, copying and other technologies) cannot be borrowed to complete data migration, and based on this, in a situation where network communication is not available, how to frequently migrate data across devices becomes an important research content.
At present, an alternative proposed solution is to use a disk as a usb disk, and assume that data in LUN1(Logical Unit Number) of data center S1 needs to be migrated to LUN2 of data center S2, and the specific implementation is as follows: and creating a LUN3 in the data center S1, configuring data synchronization services, synchronizing the whole data in the LUN1 to the LUN3, and after the data synchronization is completed, disabling the related services and exporting the LUN 3. When LUN3 is imported into data center S2, data synchronization services need to be configured, and after the entire data in LUN3 is synchronized to LUN2, related services need to be disabled, and LUN3 needs to be exported. After LUN3 is imported into data center S1, the step of configuring data synchronization services is executed and full synchronization is executed at the next data migration. It can be seen that, no matter the data of LUN1 is synchronized into LUN3 in data center S1 or the data of LUN3 is synchronized into LUN2 in data center S2, data synchronization services need to be repeatedly configured and disabled in data center S1 and data center S2, and full synchronization is performed in both data center S1 and data center S2 to synchronize all data, which makes the migration process cumbersome, long in migration time, and low in migration efficiency.
Disclosure of Invention
The application provides a data migration method, a data migration system and data migration equipment, so that the data migration efficiency is improved.
The technical scheme provided by the application comprises the following steps:
in a first aspect, an embodiment of the present application provides a data migration method, where the method includes:
the first storage device has configured a data synchronization service from the first LUN to the second LUN, and when the target LUN is imported, determining the target LUN as a second LUN according to the LUN identification P which is used for identifying the unique identity of the LUN and is currently imported into the target LUN, after detecting that the target LUN records data synchronization traffic of the first LUN to the second LUN belonging to the first storage device, if the data-plane record of the target LUN is included in the list of data-plane records of the first LUN, a data-plane record for the target LUN corresponding to the earliest timestamp T is obtained from the data-plane records of the first LUN, synchronizing data increment of the first LUN to the target LUN according to the difference bitmap, which is recorded by the first LUN and corresponds to the T, the difference bitmap which corresponds to the T and the data change bitmap of the target LUN; wherein,
the first LUN is designated for producing a data volume, the second LUN is designated for storing a data copy of the produced data volume, the data plane record list is a data plane record recorded according to an execution sequence of a data synchronization service, and one data plane record at least includes a LUN identifier Q for identifying a unique identity of a target LUN and a timestamp corresponding to the data plane record; the difference bitmap is used for recording data change conditions of the first LUN in time periods corresponding to different timestamps; the data change bitmap is used for recording the data change condition of the target LUN; the LUN identifier Q is different from the LUN identifier P;
and when the target LUN is imported, the second storage device creates the data change bitmap for the target LUN after detecting that the target LUN records data synchronization services belonging to other storage devices, so that when the target LUN processes a write command, the data change bitmap is updated.
In a second aspect, an embodiment of the present application provides a data migration system, including at least: a first storage device and a second storage device;
a first storage device for data synchronization traffic for which the first LUN has been configured to the second LUN, when the target LUN is imported, determining the target LUN as a second LUN according to the LUN identifier P which is used for identifying the unique identity of the currently imported target LUN, after detecting that the target LUN records data synchronization traffic of the first LUN to the second LUN belonging to the first storage device, if the data-plane record of the target LUN is included in the list of data-plane records of the first LUN, a data plane record for the target LUN corresponding to the earliest timestamp T is obtained from the data plane records of the first LUN, synchronizing the data increment of the first LUN to the target LUN according to the difference bitmap recorded by the first LUN and corresponding to the T, the difference bitmap recorded after the T and the data change bitmap of the target LUN; wherein,
the first LUN is designated for producing a data volume, the second LUN is designated for storing a data copy of the produced data volume, the data plane record list is a data plane record recorded according to an execution sequence of a data synchronization service, and one data plane record at least includes a LUN identifier Q for identifying a unique identity of a target LUN and a timestamp corresponding to the data plane record; the difference bitmap is used for recording data change conditions of the first LUN in time periods corresponding to different timestamps; the data change bitmap is used for recording the data change condition of the target LUN; the LUN identifier Q is different from the LUN identifier P;
and the second storage device is used for creating the data change bitmap for the target LUN after the target LUN is detected to record data synchronization services belonging to other storage devices when the target LUN is imported, so that the data change bitmap is updated when the target LUN processes a write command.
As can be seen from the foregoing technical solutions, in the first storage device, if the data plane record list of the first LUN includes the data plane record of the second LUN, a data plane record for the second LUN corresponding to the earliest timestamp T is acquired from the data plane record of the first LUN, and a data increment of the first LUN is synchronized to the second LUN according to the difference bitmap recorded for the T in the first LUN, the difference bitmap corresponding after T, and the data change bitmap of the second LUN; in the second storage device, when the second LUN is imported, after detecting that the second LUN has been configured with data synchronization services belonging to other storage devices, creating a data change bitmap for the second LUN, so as to update the data change bitmap when the second LUN is processing a write command. Therefore, according to the embodiment of the application, incremental synchronization can be realized in the first storage device according to the data plane of the currently imported target LUN, data synchronization processing operation is not performed in the second storage device any more, only the disk corresponding to the target LUN storing the data of the old data plane needs to be pulled away, and then the disk corresponding to the target LUN storing the data of the new data plane is inserted, so that the data of the new data plane is obtained through simple disk exchange, the complexity of migration operation is simplified, and meanwhile, when the migration data is executed for multiple times, the data synchronization service does not need to be repeatedly enabled or disabled, and the operation complexity is reduced. By applying the migration method provided by the embodiment of the application, the data migration time can be shortened, the migration efficiency can be improved, meanwhile, the operation complexity can be reduced, and the usability can be improved.
Drawings
FIG. 1 is a flow chart of a data migration method provided herein;
FIG. 2 is a flow chart of another data migration method provided herein;
FIG. 3 is a schematic structural diagram of a data migration system provided in the present application;
fig. 4 is a schematic structural diagram of an electronic device provided in the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the application, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
Referring to fig. 1, fig. 1 is a flowchart of a data migration method provided in the present application, where the flow of the method implementation may include the following steps:
in step 101, the first storage device has configured data synchronization service from the first LUN to the second LUN, when the target LUN is imported, determining the target LUN as a second LUN according to the LUN identification P for identifying the unique identity of the currently imported target LUN, after detecting that the target LUN records data synchronization traffic of the first LUN to the second LUN belonging to the first storage device, if the data-plane record of the target LUN is included in the list of data-plane records of the first LUN, a data-plane record for the target LUN corresponding to the earliest timestamp T is obtained from the data-plane records of the first LUN, and synchronizing the data increment of the first LUN to the target LUN according to the difference bitmap recorded by the first LUN and corresponding to the T, the difference bitmap recorded after the T and the data change bitmap of the target LUN.
The first storage device is only named for convenience of distinguishing from the following devices, and is not intended to limit a certain device.
The LUN refers to an independently available storage space created based on RAID (Redundant Arrays of Independent Disks, disk Arrays) and is generally used for writing data of a front-end application server.
In this embodiment, a first LUN is created in a first storage device, designated for production data volumes, and a second LUN is designated for maintaining a data copy of the production data volumes. Each LUN in the first storage device and the second storage device has a LUN Identifier P, such as a Universally Unique Identifier UUID (Universally Unique Identifier), for identifying a Unique identity of the LUN. The first storage device has configured thereon a data synchronization service from the first LUN to the second LUN, where the first LUN and the second LUN both record the data synchronization service belonging to the first storage device, the storage device Identifier to which the data synchronization service belongs is a Unique Identifier of the first storage device, such as a universal Unique Identifier UUID (universal Unique Identifier) or a device serial number, and a source LUN of the data synchronization service is the Identifier P for identifying a Unique identity of the first LUN, and a target LUN is the Identifier P for identifying a Unique identity of the second LUN. The data synchronization service may include technologies such as a copy service, or a mirror service, which is not limited in this embodiment.
In this embodiment, the number of target LUNs imported into the first storage device and determined as the second LUN may be multiple, in order to distinguish the LUNs, each LUN in the first storage device and the second storage device further has a LUN identifier Q for identifying a unique identity of the LUN, and the currently imported target LUN may be identified by the LUN identifier Q for performing subsequent processing on the target LUN, where LUN identifiers Q corresponding to different target LUNs are different from each other, and the LUN identifier Q may be allocated when the target LUN is created.
In some embodiments, the LUN identification Q may be an IDT identification that is generated using a random number with a specified number of bits and is used to uniquely identify the target LUN, and the specified number of bits may be specified in the code by a developer. When a LUN is created, the identity Q may be automatically assigned to the currently created LUN.
In other embodiments, when the storage device creates a LUN, if there is a specified identity P for the created LUN, the specified identity P is obtained, where the identity P of the created LUN is different from the identity P existing in the current storage device; if the specified identity P does not exist for the created LUN, the identity P is automatically configured for the created LUN, so that the configured identity P is different from the identity P existing in the current storage device. In this embodiment, regardless of the designated identifier P or the automatically configured identifier P, when determining whether the identifier P is available as a unique identity for identifying the target LUN, the LUN configuration file for storing the identifier P, which is determined in advance, may be checked first to ensure that there is no LUN that has already used the identifier P in the current storage device. The technical scheme provided by the embodiment can determine the identifier P with the unique identity for identifying each LUN in the current storage device. The embodiment can also support the creation of a plurality of target LUNs with the same UUID in a plurality of storage devices, so that the target LUNs can be replaced with each other on the same storage device.
In this embodiment, since the identities P of the plurality of LUNs are the same, when a LUN is imported by the first storage device or the second storage device, it needs to be determined, and if a LUN using the identity P of the currently imported LUN already exists in the current device, the import is not allowed.
In this embodiment, the data plane record list is a data plane record recorded according to an execution sequence of the data synchronization service, and one data plane record at least includes a LUN identifier Q for identifying a unique identity of a target LUN and a timestamp corresponding to the data plane record. In this way, data plane records corresponding to a plurality of target LUNs are recorded in the data plane record list. By the technical scheme provided by this embodiment, under the condition that the identifiers P of the plurality of target LUNs are the same, a LUN identifier Q having a unique identity for identifying each target LUN can be determined for each target LUN, and a data plane record corresponding to the LUN is found in the data plane record list according to the LUN identifier Q.
Illustratively, when the first storage device creates the first LUN, the first LUN is automatically assigned with an identifier P as UUIDA and an identifier Q as IDTA for identifying the unique identity of the first LUN. For ease of description, this first LUN is referred to hereinafter using LUNA.
And when the first storage device creates the second LUN, automatically allocating an identifier P as a UUIDB and an identifier Q as an IDTB for identifying the unique identity of the second LUN for the second LUN. For ease of description, the LUNB is used hereinafter to refer to this second LUN.
When the second storage device creates the third LUN, the identifier P may be automatically allocated to the third LUN, or the identifier P of the third LUN may be specified, and the identifier Q of the third LUN is automatically allocated to the IDTC. In this embodiment, the identity P of the third LUN and the identity P of the second LUN both use UUIDB, so that the third LUN can be recognized as the second LUN by the storage device, and for convenience of description, the third LUN is referred to as LUNB-C hereinafter.
It should be noted that the above embodiment is only an example, and in practical applications, the creation positions and the creation order of the LUNB and the LUNB-C are not limited as long as it is ensured that the identifiers P of the LUNB and the LUNB-C are the same and are located on different disks.
In this embodiment, for a data synchronization service from a first LUN to a second LUN that have been configured, the first LUN and the second LUN both record the data synchronization service belonging to the first storage device, where the storage device belonging to the data synchronization service is the first storage device, the source LUN is a UUIDA, and the target LUN is a UUIDB. After the full-volume synchronization from the LUNA to the LUNB is completed, adding a data plane record aiming at the LUNB to a data plane record list of the LUNA, wherein the data plane record list at least comprises a LUN identification Q used for identifying the LUNB and a time stamp corresponding to the data plane record. In this example, LUN identification Q corresponds to the IDT identification of the LUN, and as shown in table 1 below, the LUNA creates a data plane record of record LUNB that contains the IDTB identification of the LUNB and records a timestamp 20211221100000 corresponding to the data plane record.
Table 1 data plane record
Figure BDA0003457243990000081
Figure BDA0003457243990000091
In this embodiment, the UUID identifiers of the LUNB-C and the LUNB are the same, which means that the LUNB-C can take over the data synchronization service corresponding to the LUNB, and therefore, after the first storage device exports the LUNB and imports the LUNB-C, the first storage device can also synchronize data from the LUNA to the LUNB-C based on the configured data synchronization service from the LUNA to the LUNB.
As an embodiment, the method further comprises: if the first storage device detects that the target LUN does not record the data synchronization service from the first LUN to the second LUN belonging to the first storage device, the first storage device configures the data synchronization service from the first LUN to the second LUN for the target LUN, and synchronizes the full data of the first LUN to the target LUN. Wherein, the device to which the data synchronization service belongs is the first storage device, the source LUN is the identifier P of the first LUN, and the target LUN is the identifier P of the second LUN.
For example, when the LUN-C is imported after the LUNB is exported by the first storage device, the LUN whose LUN identifier P is UUIDB does not exist in the first storage device, and therefore the LUNB-C is imported into the first storage device. The identifier P of the LUNB-C is UUIDB which is identified as a target LUN of the data synchronization service from the LUNA to the LUNB by the LUNA, but the data synchronization service from the LUNA to the LUNB is not recorded in the LUNB-C, so that the data synchronization service from the LUNA to the LUNB is configured for the LUNB-C, the storage device to which the data synchronization service belongs is a first storage device, the source LUN is UUIDA, and the target LUN is UUIDB; the full amount of LUNA data is synchronized to LUNB-C, so that LUNB-C also stores LUNA data. After the full quantum synchronization of the LUNA to the LUNB-C is completed, the LUNA adds a new data plane record that records the data plane timestamp of the LUNB-C, which may be the current time, such as 20211222100000, as shown in table 2 below, the data plane record containing the IDTC identification of the LUNB-C and the timestamp 20211222100000 corresponding to the data plane record.
Table 2 data plane record table
Target LUN Time stamp
IDTB 20211221100000
IDTC 20211222100000
In this step, the difference bitmap is used to record the data change condition of the first LUN. The first storage device creates a difference bitmap for recording the data change condition of the first LUN after completing full synchronization or new synchronization for the data synchronization service from the configured first LUN to the second LUN, so that the first LUN can sense the data change condition of the first LUN through the difference bitmap when starting the next synchronization, thereby realizing incremental synchronization. As shown in Table 3 below, after completing the full-scale synchronization from the LUNA to the LUNB, the LUNA creates a difference bitmap with a timestamp of 20211221100000 for recording data changes for the first LUN after 20211221100000 timestamps.
Table 3 differential bitmap
Differential bitmap Time stamp
diffmap_20211221100000 20211221100000
As shown in Table 4 below, after completing the LUNA-to-LUNB-C full volume synchronization, the LUNA creates a new difference bitmap with a timestamp of 20211222100000 for recording data changes for the first LUN 20211222100000 after the timestamp. The LunA always records the data change condition through the latest difference bitmap, and the last difference bitmap is not updated any more.
Table 4 differential bitmap
Differential bitmap Time stamp
diffmap_20211221100000 20211221100000
diffmap_20211222100000 20211222100000
After the full LUNA-to-LUNB-C synchronization is complete, the LUNB-C has stored therein data for a new one of the time planes (20211222100000) for the LUNA, upon which the LUNB-C is derived on the first storage device and the disk to which the LUNB-C corresponds is pulled.
In one example, when the first storage device imports the LUNB again, according to a LUN identifier P of the currently imported LUNB, such as UUIDB, it is determined that the LUNB is a target LUN of data synchronization traffic from the LUNA to the LUNB, where the data synchronization traffic from the LUNA to the LUNB has already been recorded in the LUNB, the first storage device finds an earliest record corresponding to the IDTB identifier of the LUNB in a data plane record list for the configured data synchronization traffic from the LUNA to the LUNB, where a timestamp of the earliest record is 20211221100000, further finds a difference bitmap corresponding to the timestamp of the earliest record list as diffmap _20211221100000, and then incrementally synchronizes data to the LUNB according to the difference bitmap, a difference bitmap (diffmap _20211222100000) after the difference bitmap, and a data change bitmap of the LUNB itself.
The data change bitmap in this embodiment is used to record data change. The storage space of the LUN is divided into a plurality of storage blocks according to the preset size, each storage block corresponds to 1 bit in the data change bitmap, and on the basis, if a certain bit value is 0, the storage block corresponding to the bit value is not written with data, and if the bit value is 1, the storage block corresponding to the bit value is written with data.
Step 102, when the target LUN is imported, the second storage device creates the data change bitmap for the target LUN after detecting that the target LUN records data synchronization services belonging to other storage devices, so as to update the data change bitmap when the target LUN processes a write command.
Here, the second storage device is named only for convenience of description and is not intended to limit a certain device.
In this embodiment, it is described by taking an example that the second storage device has a third LUN, such as LUN-B-C, and needs to import a second LUN, such as LUNB. In the second storage device, a third LUN, such as LUNB-C, is exported, and the disk corresponding to LUNB-C is pulled out. And inserting a disk corresponding to the LUNB, importing the LUNB, judging whether data synchronization services belonging to other storage devices exist in the LUNB, and if so, creating a data change bitmap for the LUNB and initializing the data change bitmap. Because the LUNB-C is exported, the LUNB does not have the LUN with the same LUN identification P in the second storage device, the LUNB can be continuously used instead of the LUNB-C after the LUNB is imported into the second storage device, and if data needs to be written into the LUNB, the data change bitmap of the LUNB is synchronously updated.
Thus, the incremental synchronization process described in fig. 1 on the first storage device is completed, and in the subsequent process of moving data, the above steps 101 and 102 are re-executed, so that data can be repeatedly migrated from the first storage device to the second storage device. In the whole migration process, the data synchronization service does not need to be reconfigured, the increment synchronization is realized on the first storage device, the second storage device does not perform data synchronization processing operation any more, only the disk corresponding to the target LUN for storing the data of the old data plane needs to be pulled away, and then the disk corresponding to the target LUN for storing the data of the new data plane is inserted, so that simple disk exchange is performed, the migration operation complexity is simplified, and the migration efficiency is improved.
As can be seen from the above technical solution, in the first storage device, if the data plane record list of the first LUN includes the data plane record of the second LUN, a data plane record for the second LUN corresponding to the earliest timestamp T is obtained from the data plane record of the first LUN, and the data increment of the first LUN is synchronized to the second LUN according to the difference bitmap recorded by the first LUN for the T corresponding to the earliest timestamp T, the difference bitmap corresponding to the second LUN after T, and the data change bitmap of the second LUN; in the second storage device, when the second LUN is imported, after detecting that the second LUN has been configured with data synchronization services belonging to other storage devices, creating a data change bitmap for the second LUN, so as to update the data change bitmap when the second LUN is processing a write command. Therefore, in the embodiment of the present application, the second LUN may correspond to multiple LUNs, so that data synchronization processing operations are no longer performed on the second storage device, and only simple disk exchange is performed, thereby simplifying the complexity of migration operations. By applying the migration method provided by the embodiment of the application, the data migration time can be shortened, the migration efficiency can be improved, meanwhile, the operation complexity can be reduced, and the usability can be improved.
After the flow shown in fig. 1 is completed, as an embodiment, after detecting that the target LUN records data synchronization services of the first LUN to the second LUN belonging to the first storage device in step 101, the method further includes: if the data plane record list of the first LUN does not contain the data plane record of the target LUN, the full data of the first LUN is synchronized to the target LUN.
In this embodiment, the data plane record list of the first LUN does not include the data plane record of the target LUN, which means that the first LUN never synchronizes the data of the first LUN to the target LUN, and the data synchronization service of the first LUN is full synchronization.
In some embodiments, as shown in fig. 2, after the incrementally synchronizing the data of the first LUN to the target LUN, the method further includes steps 1011 to 1013:
step 1011, delete the data plane record of the target LUN from the data plane record list of the first LUN, and add a target data plane record.
Wherein the target data plane record at least comprises a LUN identification Q of the target LUN and a current time S at which the target data plane record is recorded.
In this step, after the data increment of the first LUN is synchronized to the target LUN for the data synchronization service, this indicates that the data synchronization service is completed, the target LUN already stores data of a new data plane, and an old data plane record of the target LUN does not need to be retained any more.
Illustratively, after completing the LUNA-to-LUNB delta synchronization, the LUNA deletes the existing data-plane record of the LUNB, e.g., deletes the data-plane record with timestamp 20211221100000 in table 5, and then adds a new data-plane record marking the timestamp of the second lun (idtb) data-plane record, which may be the current time, e.g., 20211223100000.
TABLE 5 data plane record table
Target LUN Time stamp
IDTB-C 20211221100000
IDTB 20211223100000
Step 1012, creating a new difference bitmap in the first LUN, where the time corresponding to the new difference bitmap is S.
In this step, after adding a target data plane record, a new difference bitmap needs to be created accordingly.
Based on the above example, the first LUN creates a new difference bitmap, which corresponds to a timestamp of 20211223100000, wherein the data change condition of the first LUN is recorded in the new difference bitmap, and the previous difference bitmap is not updated, as shown in table 6 below.
Table 6 differential bitmap
Differential bitmap Time stamp
diffmap_20211221100000 20211221100000
diffmap_20211222100000 20211222100000
diffmap_20211223100000 20211223100000
Step 1013, obtaining an earliest timestamp R from the data plane record of the first LUN, and deleting a difference bitmap corresponding to the first LUN, where the time is earlier than that of R.
And (3) aiming at the limited space of the difference bitmaps, in order to avoid that some difference bitmaps which are not used any more continuously occupy the space, deleting the difference bitmaps to make room for other new difference bitmaps.
Based on the above example, the earliest timestamp in the data plane record list, such as 20211222100000, is obtained, and the difference bitmap corresponding to the timestamp earlier than the timestamp, such as diffmap _20211221100000, is deleted from the difference bitmap shown in table 6, such as the difference bitmap shown in table 7 below.
Table 7 differential bitmap
Differential bitmap Time stamp
diffmap_20211222100000 20211222100000
diffmap_20211223100000 20211223100000
In other embodiments, after the full synchronizing of the data of the first LUN to the target LUN, the method may further perform the steps 1011-1013 described above.
The description of the above embodiments is thus completed.
Referring to fig. 3, fig. 3 is a system structure diagram of the data migration 300 provided in the present embodiment. The system at least comprises: a first storage device 301 and a second storage device 302;
a first storage device 301 for data synchronization traffic for which a first LUN to a second LUN has been configured, when the target LUN is imported, determining the target LUN as a second LUN according to the LUN identification P for identifying the unique identity of the currently imported target LUN, after detecting that the target LUN records data synchronization traffic of the first LUN to the second LUN belonging to the first storage device, if the data-plane record of the target LUN is included in the list of data-plane records of the first LUN, a data-plane record for the target LUN corresponding to the earliest timestamp T is obtained from the data-plane records of the first LUN, synchronizing the data increment of the first LUN to the target LUN according to the difference bitmap recorded by the first LUN and corresponding to the T, the difference bitmap recorded after the T and the data change bitmap of the target LUN; wherein,
the first LUN is designated for producing a data volume, the second LUN is designated for storing a data copy of the produced data volume, the data plane record list is a data plane record recorded according to an execution sequence of a data synchronization service, and one data plane record at least includes a LUN identifier Q for identifying a unique identity of a target LUN and a timestamp corresponding to the data plane record; the difference bitmap is used for recording data change conditions of the first LUN in time periods corresponding to different timestamps; the data change bitmap is used for recording the data change condition of the target LUN; the LUN identity Q is different from the LUN identity P.
A second storage device 302, configured to create the data change bitmap for the target LUN after detecting that the target LUN records data synchronization services belonging to other storage devices when the target LUN is imported, so as to update the data change bitmap when the target LUN is processing a write command.
As an embodiment, the first storage device 301 is further configured to configure, if it is detected that the target LUN does not record data synchronization services of the first LUN to the second LUN belonging to the first storage device, the data synchronization services of the first LUN to the second LUN for the target LUN, and synchronize the full data of the first LUN to the target LUN; the device to which the data synchronization service belongs is the first storage device, the source LUN is the identifier P of the first LUN, and the target LUN is the identifier P of the second LUN.
As an embodiment, the first storage device 301 is further configured to synchronize the full data of the first LUN to the target LUN if the data-plane record of the target LUN is not included in the data-plane record list of the first LUN.
As an embodiment, the first storage device 301 is further configured to delete the data plane record of the target LUN from the data plane record list of the first LUN, and add a target data plane record, where the target data plane record at least includes a LUN identifier Q of the target LUN and a current time S for recording the target data plane record; creating a new difference bitmap in the first LUN, wherein the time corresponding to the new difference bitmap is S; and acquiring the earliest timestamp R from the data plane record of the first LUN, and deleting the difference bitmap which is earlier than the difference bitmap corresponding to the R from the difference bitmap corresponding to the first LUN.
As an embodiment, when the first storage device 301 and the second storage device 302 create a LUN, if there is the specified identifier P for the created LUN, the specified identifier P is obtained, where the identifier P of the created LUN is different from the identifier P existing in the current storage device;
if the specified identity P does not exist for the created LUN, automatically configuring the identity P for the created LUN so that the configured identity P is different from the identity P existing in the current storage device.
Thus, the structure of the system shown in fig. 3 is completed.
As can be seen from the foregoing technical solutions, in the first storage device, if the data plane record list of the first LUN includes the data plane record of the second LUN, a data plane record for the second LUN corresponding to the earliest timestamp T is acquired from the data plane record of the first LUN, and a data increment of the first LUN is synchronized to the second LUN according to the difference bitmap recorded for the T in the first LUN, the difference bitmap corresponding after T, and the data change bitmap of the second LUN; in the second storage device, when the second LUN is imported, after detecting that the second LUN has been configured with data synchronization services belonging to other storage devices, creating a data change bitmap for the second LUN, so as to update the data change bitmap when the second LUN is processing a write command. Therefore, according to the embodiment of the application, incremental synchronization can be realized in the first storage device according to the data plane of the currently imported target LUN, data synchronization processing operation is not performed in the second storage device any more, only the disk corresponding to the target LUN storing the data of the old data plane needs to be pulled away, and then the disk corresponding to the target LUN storing the data of the new data plane is inserted, so that the data of the new data plane is obtained through simple disk exchange, the complexity of migration operation is simplified, and meanwhile, when the migration data is executed for multiple times, the data synchronization service does not need to be repeatedly enabled or disabled, and the operation complexity is reduced. By applying the migration method provided by the embodiment of the application, the data migration time can be shortened, the migration efficiency can be improved, meanwhile, the operation complexity can be reduced, and the usability can be improved.
The implementation processes of the functions and actions of each device in the apparatus are specifically described in the implementation processes of corresponding steps in the method, and are not described herein again.
In the electronic device provided in the embodiment of the present application, from a hardware level, a schematic diagram of a hardware architecture can be seen as shown in fig. 4. The method comprises the following steps: a machine-readable storage medium and a processor, wherein: the machine-readable storage medium stores machine-executable instructions executable by the processor; the processor is configured to execute machine-executable instructions to implement the application disclosed in the above examples to data migration operations.
Machine-readable storage media are provided by embodiments of the present application that store machine-executable instructions that, when invoked and executed by a processor, cause the processor to implement the application of the example disclosures above to data migration operations.
Here, a machine-readable storage medium may be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, and so forth. For example, the machine-readable storage medium may be: a RAM (random Access Memory), a volatile Memory, a non-volatile Memory, a flash Memory, a storage drive (e.g., a hard drive), a solid state drive, any type of storage disk (e.g., an optical disk, a dvd, etc.), or similar storage medium, or a combination thereof.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. A typical implementation device is a computer, which may take the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email messaging device, game console, tablet computer, wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Furthermore, these computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the scheme of the application. One of ordinary skill in the art can understand and implement it without inventive effort.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims (11)

1. A method for data migration, the method comprising:
the first storage device has configured a data synchronization service from the first LUN to the second LUN, and when the target LUN is imported, determining the target LUN as a second LUN according to the LUN identification P which is used for identifying the unique identity of the LUN and is currently imported into the target LUN, after detecting that the target LUN records data synchronization traffic of the first LUN to the second LUN belonging to the first storage device, if the data-plane record of the target LUN is included in the list of data-plane records of the first LUN, a data-plane record for the target LUN corresponding to the earliest timestamp T is obtained from the data-plane records of the first LUN, synchronizing data increment of the first LUN to the target LUN according to the difference bitmap, which is recorded by the first LUN and corresponds to the T, the difference bitmap which corresponds to the T and the data change bitmap of the target LUN; wherein,
the first LUN is designated for producing a data volume, the second LUN is designated for storing a data copy of the produced data volume, the data plane record list is a data plane record recorded according to an execution sequence of a data synchronization service, and one data plane record at least includes a LUN identifier Q for identifying a unique identity of a target LUN and a timestamp corresponding to the data plane record; the difference bitmap is used for recording data change conditions of the first LUN in time periods corresponding to different timestamps; the data change bitmap is used for recording the data change condition of the target LUN; the LUN identifier Q is different from the LUN identifier P;
and when the target LUN is imported, the second storage device creates the data change bitmap for the target LUN after detecting that the target LUN records data synchronization services belonging to other storage devices, so that when the target LUN processes a write command, the data change bitmap is updated.
2. The method of claim 1, further comprising:
if the first storage device detects that the target LUN does not record the data synchronization service from the first LUN to the second LUN belonging to the first storage device, configuring the data synchronization service from the first LUN to the second LUN for the target LUN, and synchronizing the full data of the first LUN to the target LUN; the device to which the data synchronization service belongs is the first storage device, the source LUN is the identifier P of the first LUN, and the target LUN is the identifier P of the second LUN.
3. The method according to claim 1, wherein after detecting that the target LUN records data synchronization traffic of the first LUN to the second LUN belonging to the first storage device, the method further comprises:
if the data plane record list of the first LUN does not contain the data plane record of the target LUN, the full data of the first LUN is synchronized to the target LUN.
4. The method according to claim 2 or 3, wherein after the incrementally synchronizing the data of the first LUN to the target LUN, the method further comprises:
deleting the data plane record of the target LUN from the data plane record list of the first LUN, and adding a target data plane record, wherein the target data plane record at least comprises an LUN identifier Q of the target LUN and the current time S for recording the target data plane record;
creating a new difference bitmap in the first LUN, wherein the time corresponding to the new difference bitmap is S;
obtaining an earliest timestamp R from a data plane record of the first LUN, and deleting a difference bitmap which is earlier than the timestamp R from a difference bitmap corresponding to the first LUN; or/and
after the synchronizing the full amount of data of the first LUN to the target LUN, the method further comprises:
deleting the data plane record of the target LUN from the data plane record list of the first LUN, and adding a target data plane record, wherein the target data plane record at least comprises an LUN identifier Q of the target LUN and the current time S for recording the target data plane record;
creating a new difference bitmap in the first LUN, wherein the time corresponding to the new difference bitmap is S;
and acquiring the earliest timestamp R from the data plane record of the first LUN, and deleting the difference bitmap which is earlier than the difference bitmap corresponding to the R from the difference bitmap corresponding to the first LUN.
5. The method of claim 1, further comprising:
when the first storage device or the second storage device creates a LUN, if the specified identifier P exists for the created LUN, acquiring the specified identifier P, where the identifier P of the created LUN is different from the identifier P existing in the current storage device;
if the specified identity P does not exist for the created LUN, automatically configuring the identity P for the created LUN, so that the configured identity P is different from the identity P existing in the current storage device.
6. A data migration system, characterized in that the system comprises at least: a first storage device and a second storage device;
a first storage device for data synchronization traffic for which the first LUN has been configured to the second LUN, when the target LUN is imported, determining the target LUN as a second LUN according to the LUN identification P for identifying the unique identity of the currently imported target LUN, after detecting that the target LUN records data synchronization traffic of the first LUN to the second LUN belonging to the first storage device, if the data-plane record of the target LUN is included in the list of data-plane records of the first LUN, a data-plane record for the target LUN corresponding to the earliest timestamp T is obtained from the data-plane records of the first LUN, synchronizing the data increment of the first LUN to the target LUN according to the difference bitmap recorded by the first LUN and corresponding to the T, the difference bitmap recorded after the T and the data change bitmap of the target LUN; wherein,
the first LUN is designated for producing a data volume, the second LUN is designated for storing a data copy of the produced data volume, the data plane record list is a data plane record recorded according to an execution sequence of a data synchronization service, and one data plane record at least includes a LUN identifier Q for identifying a unique identity of a target LUN and a timestamp corresponding to the data plane record; the difference bitmap is used for recording data change conditions of the first LUN in time periods corresponding to different timestamps; the data change bitmap is used for recording the data change condition of the target LUN; the LUN identifier Q is different from the LUN identifier P;
and the second storage device is used for creating the data change bitmap for the target LUN after the target LUN is detected to record data synchronization services belonging to other storage devices when the target LUN is imported, so that the data change bitmap is updated when the target LUN processes a write command.
7. The system according to claim 6, wherein the first storage device is further configured to configure data synchronization traffic of the first LUN to the second LUN for the target LUN if it is detected that the target LUN does not record data synchronization traffic of the first LUN to the second LUN belonging to the first storage device, and fully synchronize data of the first LUN to the target LUN; the device to which the data synchronization service belongs is the first storage device, the source LUN is the identifier P of the first LUN, and the target LUN is the identifier P of the second LUN.
8. The system according to claim 6, wherein the first storage device is further configured to synchronize the full amount of data of the first LUN to the target LUN if the data-plane record of the target LUN is not included in the list of data-plane records of the first LUN.
9. The system according to claim 8, wherein the first storage device is further configured to delete a data-plane record of the target LUN from the list of data-plane records of the first LUN and add a target data-plane record, the target data-plane record comprising at least a LUN identification Q of the target LUN and a current time S at which the target data-plane record is recorded; creating a new difference bitmap in the first LUN, wherein the time corresponding to the new difference bitmap is S; and acquiring the earliest timestamp R from the data plane record of the first LUN, and deleting the difference bitmap which is earlier than the difference bitmap corresponding to the R from the difference bitmap corresponding to the first LUN.
10. The system according to claim 6, wherein the first storage device or the second storage device is further configured to, when creating a LUN, if the specified identifier P exists for the created LUN, obtain the specified identifier P, where the identifier P of the created LUN is different from the identifier P existing in a current storage device; if the specified identity P does not exist for the created LUN, automatically configuring the identity P for the created LUN so that the configured identity P is different from the identity P existing in the current storage device.
11. An electronic device comprising a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor; the processor is used for executing machine executable instructions to realize the steps of the method of any one of the above 1-5.
CN202210006811.7A 2022-01-05 2022-01-05 Data migration method, system and equipment Active CN114442943B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210006811.7A CN114442943B (en) 2022-01-05 2022-01-05 Data migration method, system and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210006811.7A CN114442943B (en) 2022-01-05 2022-01-05 Data migration method, system and equipment

Publications (2)

Publication Number Publication Date
CN114442943A true CN114442943A (en) 2022-05-06
CN114442943B CN114442943B (en) 2023-04-25

Family

ID=81366777

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210006811.7A Active CN114442943B (en) 2022-01-05 2022-01-05 Data migration method, system and equipment

Country Status (1)

Country Link
CN (1) CN114442943B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102096557A (en) * 2010-12-31 2011-06-15 成都市华为赛门铁克科技有限公司 Capacity expansion method, device and system for independent redundant array of inexpensive disc (RAID)
CN106383667A (en) * 2016-09-18 2017-02-08 华为数字技术(成都)有限公司 Method and apparatus for LUN migration in business operation
US10031703B1 (en) * 2013-12-31 2018-07-24 Emc Corporation Extent-based tiering for virtual storage using full LUNs
CN112783449A (en) * 2021-01-25 2021-05-11 中国工商银行股份有限公司 Data migration method and device
US20210326211A1 (en) * 2018-12-29 2021-10-21 Huawei Technologies Co., Ltd. Data backup method, apparatus, and system
JP2021170245A (en) * 2020-04-16 2021-10-28 富士通株式会社 Storage control device, storage system and storage control program

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102096557A (en) * 2010-12-31 2011-06-15 成都市华为赛门铁克科技有限公司 Capacity expansion method, device and system for independent redundant array of inexpensive disc (RAID)
US10031703B1 (en) * 2013-12-31 2018-07-24 Emc Corporation Extent-based tiering for virtual storage using full LUNs
CN106383667A (en) * 2016-09-18 2017-02-08 华为数字技术(成都)有限公司 Method and apparatus for LUN migration in business operation
US20210326211A1 (en) * 2018-12-29 2021-10-21 Huawei Technologies Co., Ltd. Data backup method, apparatus, and system
JP2021170245A (en) * 2020-04-16 2021-10-28 富士通株式会社 Storage control device, storage system and storage control program
CN112783449A (en) * 2021-01-25 2021-05-11 中国工商银行股份有限公司 Data migration method and device

Also Published As

Publication number Publication date
CN114442943B (en) 2023-04-25

Similar Documents

Publication Publication Date Title
JP4900811B2 (en) Storage system and storage control method
US9087008B1 (en) Replicating a volume using snapshots
CN102929748B (en) Data back up method and device
US7707373B2 (en) Storage system and backup method
CN109144416B (en) Method and device for querying data
JP2016529633A (en) Snapshot and clone replication
JP2012164343A (en) Method for managing deletion of data
CN104750755B (en) A kind of data covering method and system after database active-standby switch
CN106709014B (en) File system conversion method and device
CN112783449A (en) Data migration method and device
CN111007990A (en) Positioning method for quickly positioning data block reference in snapshot system
CN111158858B (en) Cloning method and device of virtual machine and computer readable storage medium
CN111367856A (en) Data copying method and device, electronic equipment and machine-readable storage medium
CN104462148B (en) A kind of data storage and management method and device
JP2017531892A (en) Improved apparatus and method for performing a snapshot of a block level storage device
CN108984343B (en) Virtual machine backup and storage management method based on content analysis
CN114442944B (en) Data replication method, system and equipment
CN109582235B (en) Management metadata storage method and device
CN114442943B (en) Data migration method, system and equipment
CN110018987B (en) Snapshot creating method, device and system
CN113868018B (en) Data storage method and device and data recovery method
CN107545022B (en) Disk management method and device
CN113821476B (en) Data processing method and device
CN114442941B (en) Data migration method, system, storage medium and equipment
CN111399774B (en) Data processing method and device based on snapshot under distributed storage system

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