CN114442941B - Data migration method, system, storage medium and equipment - Google Patents
Data migration method, system, storage medium and equipment Download PDFInfo
- Publication number
- CN114442941B CN114442941B CN202210006146.1A CN202210006146A CN114442941B CN 114442941 B CN114442941 B CN 114442941B CN 202210006146 A CN202210006146 A CN 202210006146A CN 114442941 B CN114442941 B CN 114442941B
- Authority
- CN
- China
- Prior art keywords
- lun
- data
- storage device
- synchronization service
- data synchronization
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 70
- 230000005012 migration Effects 0.000 title claims abstract description 38
- 238000013508 migration Methods 0.000 title claims abstract description 38
- 230000008859 change Effects 0.000 claims abstract description 397
- 230000001360 synchronised effect Effects 0.000 claims abstract description 38
- 230000008569 process Effects 0.000 claims abstract description 25
- 238000004590 computer program Methods 0.000 claims description 9
- 230000008676 import Effects 0.000 claims description 8
- 238000004519 manufacturing process Methods 0.000 claims description 7
- 238000012545 processing Methods 0.000 description 22
- 238000010586 diagram Methods 0.000 description 10
- 230000006870 function Effects 0.000 description 8
- 230000010076 replication Effects 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 239000006227 byproduct Substances 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
Images
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/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
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1446—Point-in-time backing up or restoration of persistent data
- G06F11/1448—Management of the data involved in backup or backup restore
-
- 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/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/061—Improving I/O performance
- G06F3/0611—Improving I/O performance in relation to response time
-
- 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/0671—In-line storage system
- G06F3/0683—Plurality of storage devices
- G06F3/0689—Disk 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)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Signal Processing For Digital Recording And Reproducing (AREA)
Abstract
Description
技术领域technical field
本申请涉及数据存储技术领域,尤其涉及一种数据迁移方法、系统、存储介质及设备。The present application relates to the technical field of data storage, and in particular to a data migration method, system, storage medium and equipment.
背景技术Background technique
随着大数据时代的到来,数据量越来越大,也越来越重要,而数据跨设备迁移和备份也成为了一种常见需求。而在通常的实现方案中,一般是通过网络在数据中心S1和数据中心S2之间频繁迁移数据,但是因为安全因素等原因,若数据中心S1和数据中心S2之间网络不通,则就无法借用已有的数据同步业务(比如复制、镜像、拷贝等技术)完成数据迁移,基于此,在网络通信不可达的情况下,如何将数据跨设备频繁迁移俨然成为了一个重要研究内容。With the advent of the big data era, the amount of data is getting larger and more important, and data migration and backup across devices has become a common requirement. In the usual implementation scheme, data is frequently migrated between data center S1 and data center S2 through the network. However, due to security factors and other reasons, if the network between data center S1 and data center S2 is disconnected, it cannot be borrowed. Existing data synchronization services (such as replication, mirroring, copying, etc.) complete data migration. Based on this, how to frequently migrate data across devices when network communication is unreachable has become an important research content.
目前,提出的一种替代方案是把磁盘当U盘使用,假设需要把数据中心S1的LUN1(Logical Unit Number,逻辑单元号)中数据迁移到数据中心S2的LUN2,具体实现是:在数据中心S1创建LUN3,并配置数据同步业务,把LUN1中数据全量同步到LUN3中,数据同步完成后,还需要禁用相关的业务,导出LUN3。而在将LUN3导入到数据中心S2时,还需要配置数据同步业务,且在将LUN3中数据全量同步到LUN2之后,还需要禁用相关的业务,导出LUN3。在将LUN3导入到数据中心S1之后,在下一次数据迁移时,还是会执行上述配置数据同步业务的步骤,并执行全量同步。可见,无论在数据中心S1中将LUN1的数据同步到LUN3中,还是在数据中心S2中将LUN3的数据同步到LUN2中,都需要在数据中心S1和数据中心S2中配置重复配置和禁用数据同步业务,且在数据中心S1和数据中心S2均执行全量同步来同步全部数据,这使得迁移过程操作繁琐,迁移时间长,迁移效率低下。At present, an alternative proposed is to use the disk as a USB flash drive. Assume that the data in LUN1 (Logical Unit Number, Logical Unit Number) of data center S1 needs to be migrated to LUN2 of data center S2. The specific implementation is: in the data center S1 creates LUN3 and configures the data synchronization service to synchronize all the data in LUN1 to LUN3. After the data synchronization is completed, it is necessary to disable related services and export LUN3. When importing LUN3 to data center S2, you need to configure the data synchronization service, and after synchronizing all the data in LUN3 to LUN2, you need to disable related services and export LUN3. After LUN3 is imported to data center S1, the above steps of configuring the data synchronization service will still be performed during the next data migration, and full synchronization will be performed. It can be seen that no matter whether the data of LUN1 is synchronized to LUN3 in data center S1 or the data of LUN3 is synchronized to LUN2 in data center S2, it is necessary to configure duplicate configuration and disable data synchronization in data center S1 and data center S2 business, and both data center S1 and data center S2 perform full synchronization to synchronize all data, which makes the migration process cumbersome, takes a long time, and reduces migration efficiency.
发明内容Contents of the invention
本申请提供了一种数据迁移方法、系统、存储介质及设备,以提高数据的迁移效率。The present application provides a data migration method, system, storage medium and equipment, so as to improve the efficiency of data migration.
本申请提供的技术方案包括:The technical solutions provided by this application include:
第一方面,本申请实施例提供了一种数据迁移方法,所述方法包括:In the first aspect, the embodiment of the present application provides a data migration method, the method comprising:
第一存储设备在导入属于其他存储设备的第三LUN到所述第一存储设备时,确定所述第三LUN存在属于所述第一存储设备的数据同步业务和属于其他存储设备的数据同步业务之后,若检查到所述第三LUN的数据变更标识为第二标识值,则将所述第三LUN的数据变更位图同步至第一LUN至所述第三LUN的数据同步业务,初始化所述第三LUN的数据变更位图,并将所述第三LUN的变更数据标识更改为第一标识值;依据已被配置的所述第一LUN到所述第三LUN的数据同步业务,将所述第一LUN的数据增量同步至所述第三LUN中,更改所述第三LUN的数据变更标识为第二标识值,更新所述第三LUN的数据变更位图;所述第一LUN被指定用于生产数据卷,所述第三LUN被指定用于搬移数据卷,所述第一标识值用于表示数据没有发生变化,所述第二标识值用于表示数据发生变化,所述数据变更位图用于记录数据变化情况;When the first storage device imports a third LUN belonging to other storage devices to the first storage device, it is determined that the third LUN has a data synchronization service belonging to the first storage device and a data synchronization service belonging to other storage devices Afterwards, if it is checked that the data change flag of the third LUN is the second flag value, then the data change bitmap of the third LUN is synchronized to the data synchronization service from the first LUN to the third LUN, and the data synchronization service of the third LUN is initialized. the data change bitmap of the third LUN, and change the change data identifier of the third LUN to the first identifier value; according to the configured data synchronization service from the first LUN to the third LUN, change the synchronizing the data increment of the first LUN to the third LUN, changing the data change flag of the third LUN to a second flag value, and updating the data change bitmap of the third LUN; the first The LUN is designated for producing data volumes, the third LUN is designated for moving data volumes, the first identification value is used to indicate that data has not changed, and the second identification value is used to indicate that data has changed, so The above data change bitmap is used to record data changes;
第二存储设备在导入属于所述其他存储设备的所述第三LUN到所述第二存储设备时,确定所述第三LUN存在属于所述第二存储设备的数据同步业务和属于其他存储设备的数据同步业务之后,若检查到所述第三LUN的数据变更标识为第二标识值,则将所述第三LUN的数据变更位图同步至所述第三LUN至第二LUN的数据同步业务,并依据被配置的所述第三LUN到所述第二LUN的数据同步业务,更改所述第三LUN的数据变更标识为第一标识值,初始化所述第三LUN的数据变更位图;第三LUN在处理写命令时,更改所述第三LUN的数据变更标识为第二标识值,更新数据变更位图;所述第三LUN的数据增量同步至所述第二LUN中;所述第二LUN被指定用于保存生产数据卷的数据副本。When the second storage device imports the third LUN belonging to the other storage device to the second storage device, it is determined that the third LUN has a data synchronization service belonging to the second storage device and belongs to other storage devices After the data synchronization service, if it is checked that the data change flag of the third LUN is the second flag value, then the data change bitmap of the third LUN is synchronized to the data synchronization of the third LUN to the second LUN service, and according to the configured data synchronization service from the third LUN to the second LUN, change the data change identification of the third LUN to the first identification value, and initialize the data change bitmap of the third LUN ; When the third LUN is processing the write command, change the data change flag of the third LUN to the second identification value, and update the data change bitmap; the data increment of the third LUN is synchronized to the second LUN; The second LUN is designated to store the data copy of the production data volume.
第二方面,本申请实施例提供了一种数据迁移统,所述系统至少包括第一存储设备和第二存储设备;In the second aspect, the embodiment of the present application provides a data migration system, the system includes at least a first storage device and a second storage device;
第一存储设备,用于在导入属于其他存储设备的第三LUN到所述第一存储设备时,确定所述第三LUN存在属于所述第一存储设备的数据同步业务和属于其他存储设备的数据同步业务之后,若检查到所述第三LUN的数据变更标识为第二标识值,则将所述第三LUN的数据变更位图同步至第一LUN至所述第三LUN的数据同步业务,初始化所述第三LUN的数据变更位图,并将所述第三LUN的变更数据标识更改为第一标识值;依据已被配置的所述第一LUN到所述第三LUN的数据同步业务,将所述第一LUN的数据增量同步至所述第三LUN中,更改所述第三LUN的数据变更标识为第二标识值,更新所述第三LUN的数据变更位图;所述第一LUN被指定用于生产数据卷,所述第三LUN被指定用于搬移数据卷,所述第一标识值用于表示数据没有发生变化,所述第二标识值用于表示数据发生变化,所述数据变更位图用于记录数据变化情况;The first storage device is configured to, when importing a third LUN belonging to other storage devices to the first storage device, determine that the third LUN has a data synchronization service belonging to the first storage device and a data synchronization service belonging to other storage devices. After the data synchronization service, if it is checked that the data change flag of the third LUN is the second flag value, then the data change bitmap of the third LUN is synchronized to the data synchronization service from the first LUN to the third LUN , initialize the data change bitmap of the third LUN, and change the change data flag of the third LUN to a first flag value; according to the configured data synchronization from the first LUN to the third LUN Business, synchronizing the data increment of the first LUN to the third LUN, changing the data change identifier of the third LUN to a second identifier value, and updating the data change bitmap of the third LUN; The first LUN is designated for producing data volumes, the third LUN is designated for moving data volumes, the first identification value is used to indicate that data has not changed, and the second identification value is used to indicate that data has change, the data change bitmap is used to record data changes;
第二存储设备,用于在导入属于所述其他存储设备的所述第三LUN到所述第二存储设备时,确定所述第三LUN存在属于所述第二存储设备的数据同步业务和属于其他存储设备的数据同步业务之后,若检查到所述第三LUN的数据变更标识为第二标识值,则将所述第三LUN的数据变更位图同步至所述第三LUN至第二LUN的数据同步业务,更改所述第三LUN的数据变更标识为第一标识值,初始化所述第三LUN的数据变更位图;第三LUN在处理写命令时,更改所述第三LUN的数据变更标识为第二标识值,更新数据变更位图;依据被配置的所述第三LUN到所述第二LUN的数据同步业务,将所述第三LUN的数据增量同步至所述第二LUN中;所述第二LUN被指定用于保存生产数据卷的数据副本。The second storage device is configured to, when importing the third LUN belonging to the other storage device to the second storage device, determine that the third LUN has a data synchronization service belonging to the second storage device and a After the data synchronization service of other storage devices, if it is checked that the data change flag of the third LUN is the second flag value, then the data change bitmap of the third LUN is synchronized from the third LUN to the second LUN data synchronization service, change the data change flag of the third LUN to the first flag value, and initialize the data change bitmap of the third LUN; when the third LUN processes a write command, change the data of the third LUN The change flag is the second flag value, and the data change bitmap is updated; according to the configured data synchronization service from the third LUN to the second LUN, the incremental data of the third LUN is synchronized to the second LUN. In the LUN; the second LUN is designated to store the data copy of the production data volume.
由以上技术方案可以看出,本申请中,第一存储设备通过第三LUN的数据变更标识确定第三LUN的数据是否发生变化,即,第三LUN在其他存储设备上是否被写入了数据,并针对表示数据发生变化的数据变更标识,将第三LUN的数据变更位图同步至第一LUN至第三LUN的数据同步业务,以使得第一存储设备能够感知第三LUN在其他存储设备上的数据变化,并更改所述第三LUN的数据变更标识为第一标识值,初始化所述第三LUN的数据变更位图,依据已被配置的数据同步业务,将第一LUN的数据增量同步至第三LUN中,更新第三LUN的数据变更标识和数据变更位图;第二存储设备通过第三LUN的数据变更标识和数据变更位图感知第三LUN在其他存储设备上的数据变化,并将第三LUN的数据变更位图同步至第三LUN至第二LUN的数据同步业务,更改所述第三LUN的数据变更标识为第一标识值,初始化所述第三LUN的数据变更位图,在第三LUN在处理写命令时,更改所述第三LUN的数据变更标识为第二标识值,更新数据变更位图,以在第三LUN被导入其他存储设备时被感知其数据变化,并依据已被配置的数据同步业务,将第三LUN的数据增量同步至第二LUN中。这样,在迁移数据过程中,在第一存储设备和第二存储设备上均无需重复配置和禁用数据同步业务,而且均可以依据数据变更位图和数据变更标识进行数据增量同步。应用本申请实施例提供的迁移方法可以降低迁移过程中操作复杂度,缩短迁移时间,提高迁移效率。It can be seen from the above technical solutions that in this application, the first storage device determines whether the data of the third LUN has changed through the data change identifier of the third LUN, that is, whether the third LUN has data written on other storage devices , and for the data change flag indicating that the data has changed, synchronize the data change bitmap of the third LUN to the data synchronization service from the first LUN to the third LUN, so that the first storage device can perceive that the third LUN is in other storage devices and change the data change flag of the third LUN to the first flag value, initialize the data change bitmap of the third LUN, and increase the data of the first LUN according to the configured data synchronization service The data is synchronized to the third LUN, and the data change ID and data change bitmap of the third LUN are updated; the second storage device perceives the data of the third LUN on other storage devices through the data change ID and data change bitmap of the third LUN Change, and synchronize the data change bitmap of the third LUN to the data synchronization service from the third LUN to the second LUN, change the data change identification of the third LUN to the first identification value, and initialize the data of the third LUN changing the bitmap, changing the data change flag of the third LUN to the second flag value when the third LUN is processing the write command, and updating the data change bitmap so that the third LUN is perceived when the third LUN is imported into other storage devices Data changes, and according to the configured data synchronization service, the data increment of the third LUN is synchronized to the second LUN. In this way, during the process of data migration, there is no need to repeatedly configure and disable the data synchronization service on the first storage device and the second storage device, and data incremental synchronization can be performed according to the data change bitmap and the data change identification. Applying the migration method provided by the embodiment of the present application can reduce the operation complexity in the migration process, shorten the migration time, and improve the migration efficiency.
附图说明Description of drawings
图1为本申请提供的一种数据迁移方法的流程图;Fig. 1 is a flow chart of a data migration method provided by the present application;
图2为本申请提供的实现步骤101的流程图;FIG. 2 is a flow chart of implementing
图3为本申请提供的实现步骤102的流程图;FIG. 3 is a flow chart of implementing
图4为本申请提供的一种数据迁移系统的结构示意图;FIG. 4 is a schematic structural diagram of a data migration system provided by the present application;
图5为本申请提供的一种电子设备的结构示意图。FIG. 5 is a schematic structural diagram of an electronic device provided by the present application.
具体实施方式Detailed ways
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本申请相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本申请的一些方面相一致的装置和方法的例子。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, the same numerals in different drawings refer to the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with aspects of the present application as recited in the appended claims.
在本申请使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本申请。在本申请和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。还应当理解,本文中使用的术语“和/或”是指并包含一个或多个相关联的列出项目的任何或所有可能组合。The terminology used in this application is for the purpose of describing particular embodiments only, and is not intended to limit the application. As used in this application and the appended claims, the singular forms "a", "the", and "the" are intended to include the plural forms as well, unless the context clearly dictates otherwise. It should also be understood that the term "and/or" as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.
应当理解,尽管在本申请可能采用术语第一、第二、第三等来描述各种信息,但这些信息不应限于这些术语。这些术语仅用来将同一类型的信息彼此区分开。例如,在不脱离本申请范围的情况下,第一信息也可以被称为第二信息,类似地,第二信息也可以被称为第一信息。取决于语境,如在此所使用的词语“如果”可以被解释成为“在……时”或“当……时”或“响应于确定”。It should be understood that although the terms first, second, third, etc. may be used in this application to describe various information, the information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of the present application, first information may also be called second information, and similarly, second information may also be called first information. Depending on the context, the word "if" as used herein may be interpreted as "at" or "when" or "in response to a determination."
参见图1,图1为本申请提供的一种数据迁移方法的流程图,该方法包括:Referring to Fig. 1, Fig. 1 is a flowchart of a data migration method provided by the present application, which method includes:
步骤101,所述第一存储设备在导入属于其他存储设备的第三LUN到所述第一存储设备时,确定所述第三LUN存在属于所述第一存储设备的数据同步业务和属于其他存储设备的数据同步业务之后,若检查到所述第三LUN的数据变更标识为第二标识值,则将所述第三LUN的数据变更位图同步至第一LUN至所述第三LUN的数据同步业务,初始化所述第三LUN的数据变更位图,并将所述第三LUN的变更数据标识更改为第一标识值;依据已被配置的所述第一LUN到所述第三LUN的数据同步业务,将所述第一LUN的数据增量同步至所述第三LUN中,更改所述第三LUN的数据变更标识为第二标识值,更新所述第三LUN的数据变更位图。
第一LUN、第三LUN位于所述第一存储设备不同的磁盘上,这也就是说,存放第一LUN的磁盘中未存放第三LUN,存放第三LUN的磁盘未存放第一LUN。The first LUN and the third LUN are located on different disks of the first storage device, that is to say, the disk storing the first LUN does not store the third LUN, and the disk storing the third LUN does not store the first LUN.
第一存储设备只是为便于和后文的设备区分而进行的命名,并非用于限定某一存储设备。The first storage device is only named for the convenience of distinguishing it from the following devices, and is not used to limit a certain storage device.
第一存储设备被用于配置LUN的数据同步业务,该业务可以包括复制业务、镜像业务或拷贝业务等。The first storage device is used to configure a data synchronization service of the LUN, and the service may include a copy service, a mirror service, or a copy service.
LUN是指基于RAID(Redundant Arrays of Independent Disks,磁盘阵列)创建的独立可用的存储空间,通常用于写入前端应用服务器的数据,在本发明实施例中,第一LUN和第三LUN并不特指某两个固定的LUN,而是可以指代任意两个用于存放数据的LUN,本发明实施例后续不再复述。LUN refers to the independent and available storage space created based on RAID (Redundant Arrays of Independent Disks, disk array), and is usually used to write the data of the front-end application server. In the embodiment of the present invention, the first LUN and the third LUN are not Specifically refers to two fixed LUNs, but may refer to any two LUNs used to store data, which will not be repeated in the following embodiments of the present invention.
在本实施例中,第一LUN被创建在第一存储设备中,被指定用于生产数据卷,第三LUN在初始用于搬移数据卷时,可以被创建在第一存储设备中,被指定用于搬移数据卷。In this embodiment, the first LUN is created in the first storage device and is designated for producing data volumes. When the third LUN is initially used for moving data volumes, it can be created in the first storage device and designated as Used to move data volumes.
在本实施例中,第一标识值和第二标识值并不特指某两个固定的标识值,而是可以指代LUN上任意两个标识值,本发明实施例后续不再复述。In this embodiment, the first identification value and the second identification value do not specifically refer to certain two fixed identification values, but may refer to any two identification values on the LUN, which will not be repeated in the following embodiments of the present invention.
第一标识值只是为便于和后文的标识值区分而进行的命名,并非用于限定某一设备。The first identification value is just a naming for the convenience of distinguishing it from the following identification values, and is not used to limit a certain device.
在本实施例中,各LUN上可以设置数据变更标识,该数据变更标识可以包括初始标识值、第一标识值和第二标识值,初始标识值表示该标识无效,无需关注该标识和数据变化情况,可以使用“0”标识,第一标识值用于表示数据没有发生变化,可以使用“1”标识,第二标识值用于表示数据发生变化,可以使用“2”标识。In this embodiment, a data change flag can be set on each LUN. The data change flag can include an initial flag value, a first flag value, and a second flag value. The initial flag value indicates that the flag is invalid, and there is no need to pay attention to the flag and data changes. In this case, "0" can be used for identification, the first identification value is used to indicate that the data has not changed, and "1" can be used for identification, and the second identification value is used to indicate that data has changed, and "2" can be used for identification.
数据变更位图用于记录LUN的数据变化情况。LUN的存储空间按照预设大小划分为多个存储块,每个存储块对应数据变更位图中的1个bit,基于此,若某个bit值为0,则表示该bit值对应的存储块的数据没有发生变化,若该bit值为1,则表示该bit值对应的存储块的数据发生变化。The data change bitmap is used to record the data changes of the LUN. The storage space of the LUN is divided into multiple storage blocks according to the preset size. Each storage block corresponds to a bit in the data change bitmap. Based on this, if a bit value is 0, it means the storage block corresponding to the bit value The data of has not changed. If the bit value is 1, it means that the data of the storage block corresponding to the bit value has changed.
示例性的:Exemplary:
第一存储设备上创建第一LUN和第三LUN时,第一LUN和第三LUN的数据变更标识设置为初始标识值,如初始标识值为0,不创建数据变更位图。When the first LUN and the third LUN are created on the first storage device, the data change flags of the first LUN and the third LUN are set to initial flag values. If the initial flag value is 0, no data change bitmap is created.
第二存储设备上创建第二LUN时,第二LUN的数据变更标识设置为初始标识值,如初始标识值0,不创建数据变更位图。When the second LUN is created on the second storage device, the data change flag of the second LUN is set to an initial flag value, such as an initial flag value of 0, and no data change bitmap is created.
在本实施例中,针对每一LUN在处理写命令时,如果该LUN的数据变更标识为初始标识值时,无特殊处理,否则,如果该LUN的数据变更标识为第一标识值,则修改数据变更标识为第二标识值,并更改数据变更位图中该写命令对应的存储块对应的bit的值为1;如果该LUN的数据变更标识为第二标识值,则更改数据变更位图中该写命令对应的存储块对应的bit的值为1。In this embodiment, when processing a write command for each LUN, if the data change flag of the LUN is the initial flag value, there is no special processing; otherwise, if the data change flag of the LUN is the first flag value, modify The data change is identified as the second identification value, and the value of the bit corresponding to the storage block corresponding to the write command in the data change bitmap is changed to 1; if the data change identification of the LUN is the second identification value, the data change bitmap is changed The value of the bit corresponding to the storage block corresponding to the write command is 1.
在本实施例中,第一存储设备中已配置第一LUN到第三LUN的数据同步业务,且已完成了初始数据同步。在初始同步过程中,因为第三LUN的数据变更标识均为初始标识值,因此,无需更新第三LUN的数据变更标识和数据变更位图。In this embodiment, the data synchronization service from the first LUN to the third LUN has been configured in the first storage device, and the initial data synchronization has been completed. During the initial synchronization process, since the data change identifier of the third LUN is an initial identifier value, there is no need to update the data change identifier and the data change bitmap of the third LUN.
第一存储设备导入第三LUN时,即,第三LUN已经导入过其他存储设备后再回到第一存储设备,依据第三LUN的数据变更标识和数据更位图可以感知数据变化情况,如果数据变更标识为第二标识值,则可通过数据变更位图获取到第三LUN的数据变更情况。本步骤将第三LUN的数据变更位图同步至第一LUN至第三LUN的数据同步业务,使得第一LUN可以感知到这部分差异,以复制业务为例,第一LUN作为复制业务的源LUN,通过差异位图记录了第一LUN上的数据变化情况,在将第三LUN的数据变更位图同步至第一LUN至第三LUN的复制业务时,将把第三LUN的数据变更位图合并到第一LUN的差异位图,使得合并后第一LUN的差异位图包含了第三LUN的数据变更位图。When the first storage device imports the third LUN, that is, the third LUN has been imported to other storage devices and then returns to the first storage device, the data change status can be detected according to the data change identifier and data change bitmap of the third LUN. If the data change flag is the second flag value, then the data change situation of the third LUN can be obtained through the data change bitmap. In this step, the data change bitmap of the third LUN is synchronized to the data synchronization service from the first LUN to the third LUN, so that the first LUN can perceive this part of the difference. Taking the copy service as an example, the first LUN is the source of the copy service LUN, the data change on the first LUN is recorded through the difference bitmap. When the data change bitmap of the third LUN is synchronized to the replication service from the first LUN to the third LUN, the data change bit of the third LUN will be The map is merged into the differential bitmap of the first LUN, so that the merged differential bitmap of the first LUN includes the data change bitmap of the third LUN.
因为第三LUN还存在属于其他存储设备的数据同步业务,即,其他存储设备关心第三LUN在第一存储设备的数据变化情况,因此,在将第三LUN的数据变更位图同步至第一LUN至第三LUN的数据同步业务之后,还需要初始化第三LUN的数据变更位图,更改第三LUN的数据变更标识为第一标识值,使得可以通过第三LUN的数据变更标识和数据变更位图来标记第三LUN在第一存储设备上的数据变化情况。Because the third LUN also has data synchronization services belonging to other storage devices, that is, other storage devices care about the data changes of the third LUN on the first storage device, therefore, after synchronizing the data change bitmap of the third LUN to the first After the data synchronization service from the LUN to the third LUN, it is also necessary to initialize the data change bitmap of the third LUN, and change the data change flag of the third LUN to the first flag value, so that the data change flag and data change of the third LUN can be passed The bitmap is used to mark the data changes of the third LUN on the first storage device.
第一存储设备依据已被配置的第一LUN到第三LUN的数据同步业务,将第一LUN的数据增量同步第三LUN时,一方面,以复制业务为例,在启动一次第一LUN至第三LUN的复制任务时,可依据合并后第一LUN的差异位图将差异数据从第一LUN中同步至第三LUN中,实现了增量同步;另一方面,第三LUN在处理写命令时,将第三LUN的数据变更标识修改为第二标识值,并根据写命令更新数据变更位图,直到第三LUN被导出。第三LUN通过数据变更标识和数据变更位图记录该第三LUN在第一存储设备上的数据变化情况,以便该第三LUN再次导入其他存储设备时,其他存储设备上的业务可以感知该第三LUN在第一存储设备上的数据变化情况。When the first storage device synchronizes the incremental data of the first LUN to the third LUN based on the configured data synchronization service from the first LUN to the third LUN, on the one hand, taking the replication service as an example, when starting the first LUN When copying tasks to the third LUN, the difference data can be synchronized from the first LUN to the third LUN according to the difference bitmap of the merged first LUN, realizing incremental synchronization; on the other hand, the third LUN is processing When writing the command, modify the data change flag of the third LUN to the second flag value, and update the data change bitmap according to the write command until the third LUN is exported. The third LUN records the data change of the third LUN on the first storage device through the data change identifier and data change bitmap, so that when the third LUN is reimported to other storage devices, services on other storage devices can perceive the data change of the third LUN. Data changes of the three LUNs on the first storage device.
作为一个实施例,第一存储设备在确定第三LUN存在属于本第一存储设备的数据同步业务和属于其他存储设备的数据同步业务之后,若检查到所述第三LUN的数据变更标识为第一标识值,则依据已被配置的第一LUN到第三LUN的数据同步业务,以及第一LUN记录的该数据同步业务的差异情况,将第一LUN的数据增量同步至第三LUN中,更改第三LUN的数据变更标识为第二标识值,更新所述第三LUN的数据变更位图。As an embodiment, after the first storage device determines that the third LUN has data synchronization services belonging to the first storage device and data synchronization services belonging to other storage devices, if it detects that the data change flag of the third LUN is the first One identifier value, according to the configured data synchronization service from the first LUN to the third LUN, and the difference of the data synchronization service recorded by the first LUN, the incremental data of the first LUN is synchronized to the third LUN , changing the data change flag of the third LUN to the second flag value, and updating the data change bitmap of the third LUN.
作为另一个实施例,第一存储设备在确定第三LUN存在属于本第一存储设备的数据同步业务和属于其他存储设备的数据同步业务之后,若检查到所述第三LUN的数据变更标识为初始标识值,则为第三LUN创建数据变更位图,更改第三LUN的数据变更标识为第一标识值,依据已被配置的第一LUN到第三LUN的数据同步业务,以及第一LUN记录的该数据同步业务的差异情况,将第一LUN的数据增量同步至第三LUN中,更改第三LUN的数据变更标识为第二标识值,更新所述第三LUN的数据变更位图。As another embodiment, after the first storage device determines that the third LUN has data synchronization services belonging to the first storage device and data synchronization services belonging to other storage devices, if it detects that the data change flag of the third LUN is For the initial identification value, create a data change bitmap for the third LUN, change the data change identification of the third LUN to the first identification value, based on the configured data synchronization service from the first LUN to the third LUN, and the first LUN Record the difference of the data synchronization service, synchronize the incremental data of the first LUN to the third LUN, change the data change flag of the third LUN to the second flag value, and update the data change bitmap of the third LUN .
作为一个实施例,上述复制业务还可以被替换为其他数据同步业务,比如镜像业务、拷贝业务等。As an embodiment, the above-mentioned duplication service may also be replaced by other data synchronization services, such as a mirroring service, a copying service, and the like.
步骤102,第二存储设备在导入属于所述其他存储设备的所述第三LUN到所述第二存储设备时,确定所述第三LUN存在属于所述第二存储设备的数据同步业务和属于其他存储设备的数据同步业务之后,若检查到所述第三LUN的数据变更标识为第二标识值,则将所述第三LUN的数据变更位图同步至所述第三LUN至第二LUN的数据同步业务,更改所述第三LUN的数据变更标识为第一标识值,初始化所述第三LUN的数据变更位图;第三LUN在处理写命令时,更改所述第三LUN的数据变更标识为第二标识值,更新数据变更位图;依据被配置的所述第三LUN到所述第二LUN的数据同步业务,将所述第三LUN的数据增量同步至所述第二LUN中。
在本实施例中,上述第二LUN被指定用于保存生产数据卷的数据副本,第二LUN被创建在在所述第二存储设备中。In this embodiment, the above-mentioned second LUN is designated to store the data copy of the production data volume, and the second LUN is created in the second storage device.
这里,第二存储设备只是为便于描述而进行的命名,并非用于限定某一设备。Here, the second storage device is just named for convenience of description, and is not used to limit a certain device.
第二LUN也只是为便于描述而进行的命名,并非用于限定某一LUN。The second LUN is only named for convenience of description, and is not used to limit a certain LUN.
在本实施例中,第二存储设备中已配置第三LUN到第二LUN的数据同步业务,并且已经完成了第三LUN到第二LUN的初始数据同步。In this embodiment, the data synchronization service from the third LUN to the second LUN has been configured in the second storage device, and the initial data synchronization from the third LUN to the second LUN has been completed.
在本实施例中,第一存储设备完成第一LUN到第三LUN的增量同步后,拔出第三LUN,并插入第二存储设备中。第二存储设备在导入第三LUN时,确定第三LUN上既存在第二存储设备的数据同步业务又存在属于其他存储设备的数据同步业务之后,检查第三LUN的数据变更标识,若为第二标识值,则表示第三LUN在其他存储设备上写入过数据,通过数据变更位图记录了数据变化情况,基于此,需要把数据变更位图同步到第三LUN在第二存储设备的数据同步业务,以使第二存储设备感知第三LUN在其他存储设备上的数据变化情况。以拷贝业务为例,第三LUN作为拷贝业务的源LUN,通过差异位图记录了第三LUN上的数据变化情况,第二LUN作为拷贝业务的目标LUN,通过差异位图记录了第二LUN上的数据变化情况,在将第三LUN的数据变更位图同步至第三LUN至第二LUN的拷贝业务时,将把第三LUN的数据变更位图作为第一LUN的差异位图,使得第一LUN的差异位图包含了第三LUN的数据变更位图。In this embodiment, after the first storage device completes incremental synchronization from the first LUN to the third LUN, the third LUN is pulled out and inserted into the second storage device. When the second storage device imports the third LUN, after determining that both the data synchronization service of the second storage device and the data synchronization service of other storage devices exist on the third LUN, it checks the data change identifier of the third LUN, if it is the first Two identifier values indicate that the third LUN has written data on other storage devices, and the data changes have been recorded through the data change bitmap. Based on this, it is necessary to synchronize the data change bitmap to the third LUN on the second storage device. The data synchronization service enables the second storage device to perceive the data changes of the third LUN on other storage devices. Taking the copy service as an example, the third LUN is used as the source LUN of the copy service, and the data changes on the third LUN are recorded through the difference bitmap, and the second LUN is used as the target LUN of the copy service, and the second LUN is recorded through the difference bitmap When synchronizing the data change bitmap of the third LUN to the copy service from the third LUN to the second LUN, the data change bitmap of the third LUN will be used as the difference bitmap of the first LUN, so that The difference bitmap of the first LUN includes the data change bitmap of the third LUN.
因为第三LUN还存在属于其他存储设备的数据同步业务,即,其他存储设备关心第三LUN在第二存储设备的数据变化情况,因此,在将第三LUN的数据变更位图同步至第三LUN至第二LUN的数据同步业务之后,还需要初始化第三LUN的数据变更位图,更改第三LUN的数据变更标识为第一标识值;第三LUN在处理写命令时,将修改数据变更标识为第二标识值,并更改数据变更位图中该写命令对应的存储块对应的bit的值为1,即,通过数据变更位图记录第三LUN在第二存储设备上的数据变化情况,使得其他存储设备可以通过第三LUN的数据变更标识和数据变更位图来标记第三LUN在第二存储设备上的数据变化情况。Because the third LUN also has data synchronization services belonging to other storage devices, that is, other storage devices are concerned about the data changes of the third LUN on the second storage device, so after synchronizing the data change bitmap of the third LUN to the third After the data synchronization service from the LUN to the second LUN, it is also necessary to initialize the data change bitmap of the third LUN, and change the data change flag of the third LUN to the first flag value; when the third LUN processes the write command, it will modify the data change bitmap Mark it as the second identification value, and change the value of the bit corresponding to the storage block corresponding to the write command in the data change bitmap to 1, that is, record the data change of the third LUN on the second storage device through the data change bitmap , so that other storage devices can mark the data change of the third LUN on the second storage device through the data change identifier and the data change bitmap of the third LUN.
第二存储设备依据已被配置的第三LUN到第二LUN的数据同步业务,将第一LUN的数据增量同步至第三LUN时,以拷贝业务为例,在启动一次第三LUN至第一LUN的拷贝任务时,将第二LUN上记录的差异位图合并至第三LUN的差异位图,依据合并后第三LUN的差异位图将差异数据从第三LUN中同步至第二LUN中,实现了增量同步。When the second storage device synchronizes the incremental data of the first LUN to the third LUN according to the configured data synchronization service from the third LUN to the second LUN, taking the copy service as an example, when starting the third LUN to the second LUN When copying a LUN, merge the difference bitmap recorded on the second LUN into the difference bitmap of the third LUN, and synchronize the difference data from the third LUN to the second LUN according to the merged difference bitmap of the third LUN In , incremental synchronization is implemented.
作为一个实施例,第二存储设备在确定第三LUN存在属于第二存储设备的数据同步业务和属于其他存储设备的数据同步业务之后,若检查到第三LUN的数据变更标识为第一标识值,则表示该第三LUN未在其他存储设备上写入过数据;第三LUN在处理写命令时,更改所述第三LUN的数据变更标识为第二标识值,更新数据变更位图;依据被配置的第三LUN到第二LUN的数据同步业务,以及第二LUN记录的该数据同步业务的差异情况,将第三LUN的增量数据同步至第二LUN中。As an embodiment, after the second storage device determines that the third LUN has data synchronization services belonging to the second storage device and data synchronization services belonging to other storage devices, if it detects that the data change flag of the third LUN is the first identification value , it means that the third LUN has not written data on other storage devices; the third LUN changes the data change flag of the third LUN to the second flag value when processing the write command, and updates the data change bitmap; according to The configured data synchronization service from the third LUN to the second LUN, and the difference of the data synchronization service recorded by the second LUN, synchronize the incremental data of the third LUN to the second LUN.
作为另一个实施例,第二存储设备在确定第三LUN存在属于第二存储设备的数据同步业务和属于其他存储设备的数据同步业务之后,若检查到第三LUN的数据变更标识为初始标识值,则为第三LUN创建数据变更位图,更改第三LUN的数据变更标识为第一标识值;第三LUN在处理写命令时,更改所述第三LUN的数据变更标识为第二标识值,更新数据变更位图;依据被配置的第三LUN到第二LUN的数据同步业务,以及第二LUN记录的该数据同步业务的差异情况,将第三LUN的增量数据同步至第二LUN中。As another embodiment, after the second storage device determines that there are data synchronization services belonging to the second storage device and data synchronization services belonging to other storage devices in the third LUN, if it is detected that the data change identifier of the third LUN is the initial identification value , then create a data change bitmap for the third LUN, change the data change flag of the third LUN to the first flag value; when the third LUN processes the write command, change the data change flag of the third LUN to the second flag value , update the data change bitmap; synchronize the incremental data of the third LUN to the second LUN according to the configured data synchronization service from the third LUN to the second LUN and the difference of the data synchronization service recorded in the second LUN middle.
作为一个实施例,上述拷贝业务还可以被替换为其他数据同步业务,比如镜像业务、复制业务等。As an embodiment, the above-mentioned copy service may also be replaced by other data synchronization services, such as a mirroring service, a duplication service, and the like.
至此,完成图1所示的描述。由图1所示的流程图可以看出,在本申请中,第一存储设备通过第三LUN的数据变更标识确定第三LUN在其他存储设备上的数据是否发生变化,即,第三LUN在其他存储设备上是否被写入了数据,并针对表示数据发生变化的数据变更标识,将第三LUN的数据变更位图同步至第一LUN至第三LUN的数据同步业务如复制业务,以使得第一存储设备能够感知第三LUN在其他存储设备上的数据变化,并更改所述第三LUN的数据变更标识为第一标识值,初始化所述第三LUN的数据变更位图,依据已被配置的数据同步业务如复制业务,将第一LUN的数据同步至第三LUN中,更新第三LUN的数据变更标识和数据变更位图;第二存储设备通过第三LUN的数据变更标识和数据变更位图感知第三LUN在其他存储设备上的数据变化,并将第三LUN的数据变更位图同步至第三LUN至第二LUN的数据同步业务如拷贝业务,更改所述第三LUN的数据变更标识为第一标识值,初始化所述第三LUN的数据变更位图,在第三LUN在处理写命令时,更改所述第三LUN的数据变更标识为第二标识值,更新数据变更位图,以在第三LUN被导入其他存储设备时被感知其数据变化,并依据已被配置的数据同步业务,将第三LUN的数据增量同步至第二LUN中。这样,在迁移数据过程中,在第一存储设备和第二存储设备上均无需重复配置和禁用数据同步业务,而且均可以依据数据变更位图和数据变更标识进行数据增量同步。应用本申请实施例提供的迁移方法可以降低迁移过程中操作复杂度,缩短迁移时间,提高迁移效率。So far, the description shown in FIG. 1 is completed. It can be seen from the flowchart shown in FIG. 1 that in this application, the first storage device determines whether the data of the third LUN on other storage devices has changed through the data change identifier of the third LUN, that is, the third LUN is in the Whether data has been written on other storage devices, and for the data change flag indicating that the data has changed, synchronize the data change bitmap of the third LUN to the data synchronization service from the first LUN to the third LUN, such as a copy service, so that The first storage device can sense the data change of the third LUN on other storage devices, and change the data change flag of the third LUN to the first flag value, initialize the data change bitmap of the third LUN, and based on the Configured data synchronization services, such as replication services, synchronize the data of the first LUN to the third LUN, and update the data change ID and data change bitmap of the third LUN; the second storage device passes the data change ID and data of the third LUN The change bitmap senses the data change of the third LUN on other storage devices, and synchronizes the data change bitmap of the third LUN to the data synchronization service from the third LUN to the second LUN, such as a copy service, and changes the data of the third LUN. The data change flag is the first flag value, the data change bitmap of the third LUN is initialized, and when the third LUN is processing the write command, the data change flag of the third LUN is changed to the second flag value, and the data change bitmap is updated. Bitmap, so that when the third LUN is imported to other storage devices, the data changes of the third LUN are sensed, and the data increment of the third LUN is synchronized to the second LUN according to the configured data synchronization service. In this way, during the process of data migration, there is no need to repeatedly configure and disable the data synchronization service on the first storage device and the second storage device, and data incremental synchronization can be performed according to the data change bitmap and the data change identifier. Applying the migration method provided by the embodiment of the present application can reduce the operation complexity in the migration process, shorten the migration time, and improve the migration efficiency.
在完成图1所示的流程之后,作为一个实施例,该方法还包括:所述第一存储设备确定所述第三LUN存在属于所述第一存储设备的数据同步业务和不存在属于其他存储设备的数据同步业务之后,若检查到所述第三LUN的数据变更标识为第二标识值,则将所述第三LUN的数据变更位图同步至所述第一LUN至所述第三LUN的数据同步业务,更改所述第三LUN的数据变更标识为初始标识值,删除所述第三LUN的数据变更位图,依据已被配置的所述第一LUN到所述第三LUN的数据同步业务,将所述第一LUN的数据增量同步至所述第三LUN中。After the process shown in FIG. 1 is completed, as an embodiment, the method further includes: the first storage device determines that the third LUN has data synchronization services belonging to the first storage device and does not exist data synchronization services belonging to other storage devices. After the data synchronization service of the device, if it is checked that the data change flag of the third LUN is the second flag value, then the data change bitmap of the third LUN is synchronized from the first LUN to the third LUN data synchronization service of the third LUN, change the data change identifier of the third LUN to the initial identifier value, delete the data change bitmap of the third LUN, according to the configured data from the first LUN to the third LUN The synchronization service is to synchronize the incremental data of the first LUN to the third LUN.
这就表示第三LUN存在属于第一存储设备的数据同步业务,第一存储设备关心第三LUN在其他存储设备上的数据变化情况,如果第三LUN的数据变更标识为第二标识值,需要把第三LUN的数据变更位图同步至第一LUN至第三LUN的数据同步业务,使得第一LUN至第三LUN的数据同步业务可以感知到第三LUN在其他存储设备上的数据变化情况;另外,第三LUN不存在属于其他存储设备的数据同步业务,即,没有存储设备关心第三LUN在第一存储设备上的数据变化情况,因此,在将第三LUN的数据变更位图同步至第一LUN至第三LUN的数据同步业务之后,可以更改所述第三LUN的数据变更标识为初始标识值,删除所述第三LUN的数据变更位图。在一些实施例中,依据已被配置的第一LUN到第三LUN的数据同步业务,将第一LUN的数据增量同步至第三LUN时,可根据第一LUN上合并之后的差异位图实现增量同步,增量同步过程中,因为第三LUN的数据变更标识为初始标识值,因此第三LUN在处理写命令时,不更新数据变更标识和数据变更位图,提高写命令处理效率。This means that the third LUN has a data synchronization service belonging to the first storage device, and the first storage device cares about the data changes of the third LUN on other storage devices. Synchronize the data change bitmap of the third LUN to the data synchronization service from the first LUN to the third LUN, so that the data synchronization service from the first LUN to the third LUN can perceive the data changes of the third LUN on other storage devices ; In addition, the third LUN does not have data synchronization services belonging to other storage devices, that is, no storage device cares about the data changes of the third LUN on the first storage device. Therefore, after synchronizing the data change bitmap of the third LUN After the data synchronization service from the first LUN to the third LUN, the data change identifier of the third LUN may be changed to an initial identifier value, and the data change bitmap of the third LUN may be deleted. In some embodiments, according to the configured data synchronization service from the first LUN to the third LUN, when incrementally synchronizing the data of the first LUN to the third LUN, the difference bitmap after merging on the first LUN can be Realize incremental synchronization. During incremental synchronization, because the data change ID of the third LUN is the initial ID value, the third LUN does not update the data change ID and data change bitmap when processing write commands, improving the processing efficiency of write commands. .
在另一些实施例中,所述第二存储设备确定所述第三LUN存在属于所述第二存储设备的数据同步业务和不存在属于其他存储设备的数据同步业务之后,若检查到所述第三LUN的数据变更标识为第二标识值,则将所述第三LUN的数据变更位图同步至所述第三LUN至第二LUN的数据同步业务,更改所述第三LUN的数据变更标识为初始标识值,删除所述第三LUN的数据变更位图,依据已被配置的所述第三LUN到所述第二LUN的数据同步业务,将所述第三LUN的数据增量同步至所述第一LUN中。In some other embodiments, after the second storage device determines that the third LUN has data synchronization services belonging to the second storage device and does not have data synchronization services belonging to other storage devices, if it is checked that the third LUN The data change flag of the third LUN is the second flag value, then the data change bitmap of the third LUN is synchronized to the data synchronization service from the third LUN to the second LUN, and the data change flag of the third LUN is changed is the initial identification value, delete the data change bitmap of the third LUN, and synchronize the incremental data of the third LUN to the second LUN according to the configured data synchronization service from the third LUN to the second LUN. In the first LUN.
这就表示第三LUN存在属于第二存储设备的数据同步业务,第二存储设备关心第三LUN在其他存储设备上的数据变化情况,如果第三LUN的数据变更标识为第二标识值,需要把第三LUN的数据变更位图同步至第三LUN至第二LUN的数据同步业务,使得第三LUN至第二LUN的数据同步业务可以感知到第三LUN在其他存储设备上的数据变化情况;另外,第三LUN不存在属于其他存储设备的数据同步业务,即,没有存储设备关心第三LUN在第二存储设备上的数据变化情况,因此,在将第三LUN的数据变更位图同步至第三LUN至第二LUN的数据同步业务之后,可以更改所述第三LUN的数据变更标识为初始标识值,删除所述第三LUN的数据变更位图,这样,第三LUN在处理写命令时,不更新数据变更标识和数据变更位图,提高写命令处理效率。在一些实施例中,依据已被配置的第三LUN到第二LUN的数据同步业务,将第三LUN的数据增量同步至第二LUN时,可根据第三LUN上合并之后的差异位图实现增量同步。This means that the third LUN has a data synchronization service belonging to the second storage device, and the second storage device cares about the data changes of the third LUN on other storage devices. Synchronize the data change bitmap of the third LUN to the data synchronization service from the third LUN to the second LUN, so that the data synchronization service from the third LUN to the second LUN can perceive the data changes of the third LUN on other storage devices ; In addition, the third LUN does not have data synchronization services belonging to other storage devices, that is, no storage device cares about the data changes of the third LUN on the second storage device, therefore, after synchronizing the data change bitmap of the third LUN After the data synchronization service from the third LUN to the second LUN, the data change identifier of the third LUN can be changed to the initial identifier value, and the data change bitmap of the third LUN can be deleted. In this way, the third LUN is processing the write When the command is executed, the data change flag and the data change bitmap are not updated, which improves the processing efficiency of the write command. In some embodiments, according to the configured data synchronization service from the third LUN to the second LUN, when incrementally synchronizing the data of the third LUN to the second LUN, according to the merged difference bitmap on the third LUN Implement incremental synchronization.
作为另一个实施例,该方法还包括:所述第一存储设备确定所述第三LUN不存在属于所述第一存储设备的数据同步业务和存在属于其他存储设备的数据同步业务之后,更改所述第三LUN的数据变更标识为第一标识值,初始化所述第三LUN的数据变更位图。这就表示第三LUN不存在属于第一存储设备的数据同步业务,第一存储设备不关心第三LUN在其他存储设备上的数据变化情况,因此,不需要检查第三LUN的数据变更标识和数据变更位图;另外,第三LUN存在属于其他存储设备的数据同步业务,其他存储设备关心第三LUN在第一存储设备上的数据变化情况,因此,更改所述第三LUN的数据变更标识为第一标识值,初始化所述第三LUN的数据变更位图,使得第三LUN在处理写命令时,更改所述第三LUN的数据变更标识为第二标识值,更新数据变更位图,以在第三LUN被导入其他存储设备时被感知其数据变化。As another embodiment, the method further includes: after the first storage device determines that there is no data synchronization service belonging to the first storage device and there is a data synchronization service belonging to other storage devices on the third LUN, changing the The data change flag of the third LUN is a first flag value, and the data change bitmap of the third LUN is initialized. This means that the third LUN does not have data synchronization services belonging to the first storage device, and the first storage device does not care about the data changes of the third LUN on other storage devices. Therefore, it is not necessary to check the data change identifier and Data change bitmap; In addition, the third LUN has data synchronization services belonging to other storage devices, and other storage devices are concerned about the data changes of the third LUN on the first storage device, so change the data change identification of the third LUN Be the first identification value, initialize the data change bitmap of the third LUN, so that when the third LUN processes the write command, change the data change identification of the third LUN to the second identification value, update the data change bitmap, In order to sense the data changes of the third LUN when it is imported to other storage devices.
作为另一些实施例,该方法还包括:所述第二存储设备确定所述第三LUN不存在属于所述第二存储设备的数据同步业务和存在属于其他存储设备的数据同步业务之后,更改所述第三LUN的数据变更标识为第一标识值,初始化所述第三LUN的数据变更位图。这就表示第三LUN不存在属于第二存储设备的数据同步业务,第二存储设备不关心第三LUN在其他存储设备上的数据变化情况,因此,不需要检查第三LUN的数据变更标识和数据变更位图;另外,第三LUN存在属于其他存储设备的数据同步业务,其他存储设备关心第三LUN在第二存储设备上的数据变化情况,因此,更改所述第三LUN的数据变更标识为第一标识值,初始化所述第三LUN的数据变更位图,使得第三LUN在处理写命令时,更改所述第三LUN的数据变更标识为第二标识值,更新数据变更位图,以在第三LUN被导入其他存储设备时被感知其数据变化。As some other embodiments, the method further includes: after the second storage device determines that there is no data synchronization service belonging to the second storage device and there is a data synchronization service belonging to other storage devices on the third LUN, changing the The data change flag of the third LUN is a first flag value, and the data change bitmap of the third LUN is initialized. This means that the third LUN does not have data synchronization services belonging to the second storage device, and the second storage device does not care about the data changes of the third LUN on other storage devices. Therefore, it is not necessary to check the data change identifier and Data change bitmap; In addition, the third LUN has data synchronization services belonging to other storage devices, and other storage devices are concerned about the data change of the third LUN on the second storage device, so change the data change identification of the third LUN Be the first identification value, initialize the data change bitmap of the third LUN, so that when the third LUN processes the write command, change the data change identification of the third LUN to the second identification value, update the data change bitmap, In order to sense the data changes of the third LUN when it is imported to other storage devices.
作为另一个实施例,该方法还包括:所述第一存储设备确定所述第三LUN不存在属于所述第一存储设备的数据同步业务和不存在属于其他存储设备的数据同步业务之后,更改所述第三LUN的数据变更标识为初始标识值,删除所述第三LUN的数据变更位图。这就表示第三LUN不存在属于第一存储设备的数据同步业务,第一存储设备不关心第三LUN在其他存储设备上的数据变化情况,因此,不需要检查第三LUN的数据变更标识和数据变更位图;另外,第三LUN不存在属于其他存储设备的数据同步业务,其他存储设备不关心第三LUN在第一存储设备上的数据变化情况,因此,更改所述第三LUN的数据变更标识为初始标识值,删除所述第三LUN的数据变更位图,这样,第三LUN在处理写命令时,不更新数据变更标识和数据变更位图,提高写命令处理效率。As another embodiment, the method further includes: after the first storage device determines that there is no data synchronization service belonging to the first storage device and no data synchronization service belonging to other storage devices on the third LUN, changing The data change identifier of the third LUN is an initial identifier value, and the data change bitmap of the third LUN is deleted. This means that the third LUN does not have data synchronization services belonging to the first storage device, and the first storage device does not care about the data changes of the third LUN on other storage devices. Therefore, it is not necessary to check the data change identifier and Data change bitmap; In addition, the third LUN does not have data synchronization services belonging to other storage devices, and other storage devices do not care about the data changes of the third LUN on the first storage device, so change the data of the third LUN The change flag is the initial flag value, and the data change bitmap of the third LUN is deleted. In this way, when the third LUN processes the write command, the data change flag and the data change bitmap are not updated, thereby improving the write command processing efficiency.
作为另一些实施例,该方法还包括:所述第二存储设备确定所述第三LUN不存在属于所述第二存储设备的数据同步业务和不存在属于其他存储设备的数据同步业务之后,更改所述第三LUN的数据变更标识为初始标识值,删除所述第三LUN的数据变更位图。这就表示第三LUN不存在属于第二存储设备的数据同步业务,第二存储设备不关心第三LUN在其他存储设备上的数据变化情况,因此,不需要检查第三LUN的数据变更标识和数据变更位图;另外,第三LUN不存在属于其他存储设备的数据同步业务,其他存储设备不关心第三LUN在第二存储设备上的数据变化情况,因此,更改所述第三LUN的数据变更标识为初始标识值,删除所述第三LUN的数据变更位图,这样,第三LUN在处理写命令时,不更新数据变更标识和数据变更位图,提高写命令处理效率。As another embodiment, the method further includes: after the second storage device determines that there is no data synchronization service belonging to the second storage device and no data synchronization service belonging to other storage devices on the third LUN, changing The data change identifier of the third LUN is an initial identifier value, and the data change bitmap of the third LUN is deleted. This means that the third LUN does not have data synchronization services belonging to the second storage device, and the second storage device does not care about the data changes of the third LUN on other storage devices. Therefore, it is not necessary to check the data change identifier and Data change bitmap; In addition, the third LUN does not have data synchronization services belonging to other storage devices, and other storage devices do not care about the data changes of the third LUN on the second storage device, so change the data of the third LUN The change flag is the initial flag value, and the data change bitmap of the third LUN is deleted. In this way, when the third LUN processes the write command, the data change flag and the data change bitmap are not updated, thereby improving the write command processing efficiency.
在一些实施例中,如图2所示,上述步骤101中确定所述第三LUN存在属于所述第一存储设备的数据同步业务和属于其他存储设备的数据同步业务,包括如下步骤201~步骤206:In some embodiments, as shown in FIG. 2, it is determined in the
步骤201,第一存储设备查找所述第三LUN记录的数据同步业务配置中是否存在属于所述第一存储设备的设备标识,若是,则执行步骤202,若否,则执行步骤203
在本实施例中,第三LUN携带用于表示第一存储设备唯一身份的设备标识。In this embodiment, the third LUN carries a device identifier used to represent the unique identity of the first storage device.
步骤202,确定所述第三LUN存在属于所述第一存储设备的数据同步业务。
步骤203,确定所述第三LUN不存在属于所述第一存储设备的数据同步业务。
步骤204,查找所述第三LUN记录的数据同步业务配置中是否存在不属于所述第一存储设备的设备标识,若是,则执行步骤205,否则,则执行步骤206。
在本步骤中,只要确定第三LUN中携带第一存储设备的设备标识就表示该第三LUN存在属于第一存储设备的数据同步业务,查到第三LUN还携带非第一存储设备的设备标识,则就表示第三LUN还存在属于其他存储设备数据同步业务。In this step, as long as it is determined that the third LUN carries the device identifier of the first storage device, it means that the third LUN has a data synchronization service belonging to the first storage device, and it is found that the third LUN also carries devices other than the first storage device ID, it means that the third LUN still has data synchronization services belonging to other storage devices.
需要说明的是,步骤201和步骤204没有先后的执行顺序,可以先执行步骤201,也可以先执行步骤204,本实施例对此并不限定。It should be noted that
步骤205,确定所述第三LUN存在属于其他存储设备的数据同步业务。
步骤206,确定所述第三LUN不存在属于其他存储设备的数据同步业务。
基于上述实施例,如图3所示,上述步骤102中所述第二存储设备确定所述第三LUN存在属于所述第二存储设备的数据同步业务和不存在属于其他存储设备的数据同步业务,包括步骤301~步骤306:Based on the above embodiment, as shown in FIG. 3 , the second storage device in
步骤301,第二存储设备查找所述第三LUN记录的数据同步业务配置中是否存在属于所述第二存储设备的设备标识,若是,则执行步骤302,若否,则执行步骤303。
在本实施例中,第三LUN携带用于表示第二存储设备唯一身份的设备标识。In this embodiment, the third LUN carries a device identifier used to represent the unique identity of the second storage device.
步骤302,确定所述第三LUN存在属于所述第二存储设备的数据同步业务。
步骤303,确定所述第三LUN不存在属于所述第二存储设备的数据同步业务。
步骤304,查找所述第三LUN记录的数据同步业务配置中的是否存在不属于所述第二存储设备的设备标识,若是,则执行步骤305,否则,则执行步骤306。
在本步骤中,只要确定第三LUN中携带第二存储设备的设备标识就表示该第三LUN存在属于第二存储设备的数据同步业务,查到第三LUN还携带第二存储设备的设备标识,则就表示第三LUN还存在属于其他存储设备数据同步业务。In this step, as long as it is determined that the third LUN carries the device ID of the second storage device, it means that the third LUN has a data synchronization service belonging to the second storage device, and it is found that the third LUN also carries the device ID of the second storage device , it means that the third LUN still has data synchronization services belonging to other storage devices.
需要说明的是,步骤301和步骤304没有先后的执行顺序,可以先执行步骤301,也可以先执行步骤304,本实施例对此并不限定。It should be noted that
步骤305,确定所述第三LUN存在属于其他存储设备的数据同步业务。
步骤306,确定所述第三LUN不存在属于其他存储设备的数据同步业务。
可见,应用本申请实施例提供的方法通过设备标识能够快速准确地确定出第三LUN是否存在属于该设备标识对应的存储设备的数据同步业务以及是否存在属于非该设备标识的其他存储设备的数据同步业务。It can be seen that applying the method provided by the embodiment of the present application can quickly and accurately determine whether the third LUN has a data synchronization service belonging to the storage device corresponding to the device ID and whether there is data belonging to other storage devices other than the device ID through the device ID. Synchronize business.
作为一个实施例,上述设备标识为UUID(Universally Unique Identifier,通用唯一识别码)或设备序列号。As an embodiment, the above-mentioned device identifier is a UUID (Universally Unique Identifier, Universally Unique Identifier) or a device serial number.
如果业务实际使用需求发生了变化,比如第三LUN在第一存储设备或第二存储设备上长期使用,不再用于搬移数据卷时,第三LUN上属于其他存储设备的数据同步业务不再需要保留,基于此,可手动删除该属于其他存储设备的数据同步业务。作为一个实施例,该方法进一步包括:所述第一存储设备在删除所述第三LUN上属于其他存储设备的数据同步业务之后,将所述第三LUN的数据变更标识更改为初始标识值,同时删除所述第三LUN的数据变更位图。这样,当第一存储设备上的第三LUN不再存在属于其他存储设备的数据同步业务时,这就表示,其他存储设备不关心第三LUN在第一存储设备上的数据变化情况,因此,更改所述第三LUN的数据变更标识为初始标识值,删除所述第三LUN的数据变更位图,这样,第三LUN在处理写命令时,不更新数据变更标识和数据变更位图,提高写命令处理效率。作为另一个实施例,所述第二存储设备在删除所述第三LUN上属于其他存储设备的数据同步业务之后,将所述第三LUN的数据变更标识更改为初始标识值,同时删除所述第三LUN的数据变更位图。这样,当第二存储设备上的第三LUN不再存在属于其他存储设备的业务时,这就表示,其他存储设备不关心第三LUN在第二存储设备上的数据变化情况,因此,更改所述第三LUN的数据变更标识为初始标识值,删除所述第三LUN的数据变更位图,这样,第三LUN在处理写命令时,不更新数据变更标识和数据变更位图,提高写命令处理效率。If the actual usage requirements of the business change, for example, when the third LUN is used for a long time on the first storage device or the second storage device and is no longer used for moving data volumes, the data synchronization service belonging to other storage devices on the third LUN is no longer It needs to be reserved. Based on this, the data synchronization service belonging to other storage devices can be manually deleted. As an embodiment, the method further includes: after the first storage device deletes the data synchronization service belonging to other storage devices on the third LUN, changing the data change identifier of the third LUN to an initial identifier value, At the same time, the data change bitmap of the third LUN is deleted. In this way, when the third LUN on the first storage device no longer has data synchronization services belonging to other storage devices, it means that other storage devices do not care about the data changes of the third LUN on the first storage device. Therefore, Change the data change flag of the third LUN to the initial flag value, and delete the data change bitmap of the third LUN, so that the third LUN does not update the data change flag and the data change bitmap when processing the write command, thereby improving Write command processing efficiency. As another embodiment, after the second storage device deletes the data synchronization service belonging to other storage devices on the third LUN, it changes the data change identifier of the third LUN to an initial identifier value, and deletes the Data change bitmap of the third LUN. In this way, when the third LUN on the second storage device no longer has services belonging to other storage devices, it means that other storage devices do not care about the data changes of the third LUN on the second storage device. The data change flag of the third LUN is the initial flag value, and the data change bitmap of the third LUN is deleted. In this way, when the third LUN processes the write command, the data change flag and the data change bitmap are not updated, and the write command is improved. Processing efficiency.
至此,完成上述实施例的描述。So far, the description of the above embodiment is completed.
参见图4,图4为本实施例提供的数据迁移400的系统结构图。所述系统至少包括第一存储设备401和第二存储设备402;Referring to FIG. 4 , FIG. 4 is a system structure diagram of data migration 400 provided in this embodiment. The system includes at least a
第一存储设备401,用于在导入属于其他存储设备的第三LUN到所述第一存储设备时,确定所述第三LUN存在属于所述第一存储设备的数据同步业务和属于其他存储设备的数据同步业务之后,若检查到所述第三LUN的数据变更标识为第二标识值,则将所述第三LUN的数据变更位图同步至第一LUN至所述第三LUN的数据同步业务,初始化所述第三LUN的数据变更位图,并将所述第三LUN的变更数据标识更改为第一标识值;依据已被配置的所述第一LUN到所述第三LUN的数据同步业务,将所述第一LUN的数据增量同步至所述第三LUN中,更改所述第三LUN的数据变更标识为第二标识值,更新所述第三LUN的数据变更位图;所述第一LUN被指定用于生产数据卷,所述第三LUN被指定用于搬移数据卷,所述第一标识值用于表示数据没有发生变化,所述第二标识值用于表示数据发生变化,所述数据变更位图用于记录数据变化情况;The
第二存储设备402,用于在导入属于所述其他存储设备的所述第三LUN到所述第二存储设备时,确定所述第三LUN存在属于所述第二存储设备的数据同步业务和属于其他存储设备的数据同步业务之后,若检查到所述第三LUN的数据变更标识为第二标识值,则将所述第三LUN的数据变更位图同步至所述第三LUN至第二LUN的数据同步业务,更改所述第三LUN的数据变更标识为第一标识值,初始化所述第三LUN的数据变更位图;第三LUN在处理写命令时,更改所述第三LUN的数据变更标识为第二标识值,更新数据变更位图;依据被配置的所述第三LUN到所述第二LUN的数据同步业务,将所述第三LUN的数据增量同步至所述第二LUN中;所述第二LUN被指定用于保存生产数据卷的数据副本。The
作为一个实施例,所述第一存储设备401还用于确定所述第三LUN存在属于所述第一存储设备的数据同步业务和不存在属于其他存储设备的数据同步业务之后,若检查到所述第三LUN的数据变更标识为第二标识值,则将所述第三LUN的数据变更位图同步至所述第一LUN至所述第三LUN的数据同步业务,更改所述第三LUN的数据变更标识为初始标识值,删除所述第三LUN的数据变更位图,依据已被配置的所述第一LUN到所述第三LUN的数据同步业务,将所述第一LUN的数据增量同步至所述第三LUN中;或/和As an embodiment, the
所述第二存储设备402还用于确定所述第三LUN存在属于所述第二存储设备的数据同步业务和不存在属于其他存储设备的数据同步业务之后,若检查到所述第三LUN的数据变更标识为第二标识值,则将所述第三LUN的数据变更位图同步至所述第三LUN至第二LUN的数据同步业务,更改所述第三LUN的数据变更标识为初始标识值,删除所述第三LUN的数据变更位图,依据已被配置的所述第三LUN到所述第二LUN的数据同步业务,将所述第三LUN的数据增量同步至所述第一LUN中。The
作为一个实施例,所述第一存储设备401还用于确定所述第三LUN不存在属于所述第一存储设备的数据同步业务和存在属于其他存储设备的数据同步业务之后,更改所述第三LUN的数据变更标识为第一标识值,初始化所述第三LUN的数据变更位图;或/和As an embodiment, the
所述第二存储设备还用于确定所述第三LUN不存在属于所述第二存储设备的数据同步业务和存在属于其他存储设备的数据同步业务之后,更改所述第三LUN的数据变更标识为第一标识值,初始化所述第三LUN的数据变更位图。The second storage device is further configured to change the data change identifier of the third LUN after determining that the third LUN does not have a data synchronization service belonging to the second storage device and that there is a data synchronization service belonging to other storage devices For the first identification value, initialize the data change bitmap of the third LUN.
作为一个实施例,所述第一存储设备401还用于确定所述第三LUN不存在属于所述第一存储设备的数据同步业务和不存在属于其他存储设备的数据同步业务之后,更改所述第三LUN的数据变更标识为初始标识值,删除所述第三LUN的数据变更位图;或/和As an embodiment, the
所述第二存储设备402还用于确定所述第三LUN不存在属于所述第二存储设备的数据同步业务和不存在属于其他存储设备的数据同步业务之后,更改所述第三LUN的数据变更标识为初始标识值,删除所述第三LUN的数据变更位图。The
作为一个实施例,所述第一存储设备401中确定所述第三LUN存在属于所述第一存储设备的数据同步业务和属于其他存储设备的数据同步业务,具体用于:As an embodiment, the
查找所述第三LUN记录的数据同步业务配置中是否存在属于所述第一存储设备的设备标识,若是,则确定所述第三LUN存在属于所述第一存储设备的数据同步业务,若否,则确定所述第三LUN不存在属于所述第一存储设备的数据同步业务;查找所述第三LUN记录的数据同步业务配置中是否存在不属于所述第一存储设备的设备标识,若是,则确定所述第三LUN存在属于其他存储设备的数据同步业务,若否,则确定所述第三LUN不存在属于所述其他存储设备的数据同步业务;Find whether there is a device identifier belonging to the first storage device in the data synchronization service configuration recorded by the third LUN, if yes, determine that the third LUN has a data synchronization service belonging to the first storage device, if not , then determine that the third LUN does not have a data synchronization service belonging to the first storage device; check whether there is a device identifier that does not belong to the first storage device in the data synchronization service configuration recorded by the third LUN, if , then determine that the third LUN has a data synchronization service belonging to other storage devices, if not, then determine that the third LUN does not have a data synchronization service belonging to the other storage device;
所述第二存储设备402中确定所述第三LUN存在属于所述第二存储设备的数据同步业务和属于其他存储设备的数据同步业务,具体用于:The
查找所述第三LUN记录的数据同步业务配置中是否存在数据所述第二存储设备的设备标识,若是,则确定所述第三LUN被存在属于所述第二存储设备的数据同步业务,若否,则确定所述第三LUN不存在属于所述第二存储设备的数据同步业务;查找所述第三LUN记录的数据同步业务配置中的是否存在不属于所述第二存储设备的设备标识,若是,则确定所述第三LUN存在属于其他存储设备的数据同步业务,若否,则确定所述第三LUN不存在属于所述其他存储设备的数据同步业务。Find whether there is a device identifier of the second storage device in the data synchronization service configuration recorded by the third LUN, and if so, determine that the third LUN is stored in the data synchronization service belonging to the second storage device, if No, then determine that the third LUN does not have a data synchronization service belonging to the second storage device; check whether there is a device identifier that does not belong to the second storage device in the data synchronization service configuration recorded by the third LUN If yes, determine that the third LUN has data synchronization services belonging to other storage devices, and if not, determine that the third LUN does not have data synchronization services belonging to other storage devices.
作为一个实施例,所述第一存储设备401还用于在删除所述第三LUN上属于其他存储设备的数据同步业务之后,将所述第三LUN的数据变更标识更改为初始标识值,同时删除所述第三LUN的数据变更位图;或/和As an embodiment, the
所述第二存储设备402还用于在删除所述第三LUN上属于其他存储设备的数据同步业务之后,将所述第三LUN的数据变更标识更改为初始标识值,同时删除所述第三LUN的数据变更位图。The
至此,完成图4所示的描述。So far, the description shown in FIG. 4 is completed.
由图4所示的流程图可以看出,在本申请中,第一存储设备通过第三LUN的数据变更标识确定第三LUN的数据是否发生变化,即,第三LUN在其他存储设备上是否被写入了数据,并针对表示数据发生变化的数据变更标识,将第三LUN的数据变更位图同步至第一LUN至第三LUN的数据同步业务,以使得第一存储设备能够感知第三LUN在其他存储设备上的数据变化,并更改所述第三LUN的数据变更标识为第一标识值,初始化所述第三LUN的数据变更位图,依据已被配置的数据同步业务,将第一LUN的数据增量同步至第三LUN中,更新第三LUN的数据变更标识和数据变更位图;第二存储设备通过第三LUN的数据变更标识和数据变更位图感知第三LUN在其他存储设备上的数据变化,并将第三LUN的数据变更位图同步至第三LUN至第二LUN的数据同步业务,更改所述第三LUN的数据变更标识为第一标识值,初始化所述第三LUN的数据变更位图,在第三LUN在处理写命令时,更改所述第三LUN的数据变更标识为第二标识值,更新数据变更位图,以在第三LUN被导入其他存储设备时被感知其数据变化,并依据已被配置的数据同步业务,将第三LUN的数据增量同步至第二LUN中。这样,在迁移数据过程中,在第一存储设备和第二存储设备上均无需重复配置和禁用数据同步业务,而且均可以依据数据变更位图和数据变更标识进行数据增量同步。应用本申请实施例提供的迁移方法可以降低迁移过程中操作复杂度,缩短迁移时间,提高迁移效率。It can be seen from the flow chart shown in FIG. 4 that in this application, the first storage device determines whether the data of the third LUN has changed through the data change identifier of the third LUN, that is, whether the third LUN is on another storage device. The data is written, and for the data change flag indicating that the data has changed, the data change bitmap of the third LUN is synchronized to the data synchronization service from the first LUN to the third LUN, so that the first storage device can perceive the third LUN The data change of the LUN on other storage devices, and change the data change identification of the third LUN to the first identification value, initialize the data change bitmap of the third LUN, and change the data change bitmap of the third LUN according to the configured data synchronization service. The incremental data of one LUN is synchronized to the third LUN, and the data change identifier and data change bitmap of the third LUN are updated; the second storage device perceives that the third LUN is in other The data on the storage device changes, and the data change bitmap of the third LUN is synchronized to the data synchronization service from the third LUN to the second LUN, the data change identifier of the third LUN is changed to the first identifier value, and the The data change bitmap of the third LUN, when the third LUN is processing the write command, change the data change flag of the third LUN to the second flag value, update the data change bitmap, so that the third LUN is imported into other storage The device is aware of its data changes, and according to the configured data synchronization service, the data increment of the third LUN is synchronized to the second LUN. In this way, during the process of data migration, there is no need to repeatedly configure and disable the data synchronization service on the first storage device and the second storage device, and data incremental synchronization can be performed according to the data change bitmap and the data change identification. Applying the migration method provided by the embodiment of the present application can reduce the operation complexity in the migration process, shorten the migration time, and improve the migration efficiency.
上述系统中各个单元的功能和作用的实现过程具体详见上述方法中对应步骤的实现过程,在此不再赘述。For the implementation process of the functions and functions of each unit in the above system, please refer to the implementation process of the corresponding steps in the above method for details, and will not be repeated here.
对于系统实施例而言,由于其基本对应于方法实施例,所以相关之处参见方法实施例的部分说明即可。以上所描述的系统实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本申请方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。As for the system embodiment, since it basically corresponds to the method embodiment, for related parts, please refer to the part description of the method embodiment. The system embodiments described above are only illustrative, and the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in One place, or it can be distributed to multiple network elements. Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this application. It can be understood and implemented by those skilled in the art without creative effort.
至此,完成图4所示设备的描述。So far, the description of the device shown in FIG. 4 is completed.
本申请实施例提供的电子设备,从硬件层面而言,硬件架构示意图可以参见图5所示。包括:机器可读存储介质和处理器,其中:所述机器可读存储介质存储有能够被所述处理器执行的机器可执行指令;所述处理器用于执行机器可执行指令,以实现上述示例公开的应用于数据迁移操作。For the electronic device provided in the embodiment of the present application, from a hardware level, a schematic diagram of a hardware architecture may be shown in FIG. 5 . It includes: a machine-readable storage medium and a processor, wherein: the machine-readable storage medium stores machine-executable instructions that can be executed by the processor; the processor is configured to execute the machine-executable instructions, so as to realize the above examples Publicly applied to data migration operations.
本申请实施例提供的机器可读存储介质,所述机器可读存储介质存储有机器可执行指令,所述机器可执行指令在被处理器调用和执行时,所述机器可执行指令促使所述处理器实现上述示例公开的应用于数据迁移操作。In the machine-readable storage medium provided by the embodiment of the present application, the machine-readable storage medium stores machine-executable instructions, and when the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the The processor implements the data migration operations disclosed in the above examples.
这里,机器可读存储介质可以是任何电子、磁性、光学或其它物理存储装置,可以包含或存储信息,如可执行指令、数据,等等。例如,机器可读存储介质可以是:RAM(RadomAccess Memory,随机存取存储器)、易失存储器、非易失性存储器、闪存、存储驱动器(如硬盘驱动器)、固态硬盘、任何类型的存储盘(如光盘、dvd等),或者类似的存储介质,或者它们的组合。Here, a machine-readable storage medium may be any electronic, magnetic, optical, or other physical storage device that may contain or store information, such as executable instructions, data, and the like. For example, the machine-readable storage medium can be: RAM (Radom Access Memory, random access memory), volatile memory, non-volatile memory, flash memory, storage drive (such as hard disk drive), solid-state hard disk, any type of storage disk ( such as CD, DVD, etc.), or similar storage media, or a combination thereof.
上述实施例阐明的系统、装置、模块或单元,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。一种典型的实现设备为计算机,计算机的具体形式可以是个人计算机、膝上型计算机、蜂窝电话、相机电话、智能电话、个人数字助理、媒体播放器、导航设备、电子邮件收发设备、游戏控制台、平板计算机、可穿戴设备或者这些设备中的任意几种设备的组合。The systems, devices, modules, or units described in the above embodiments can be specifically implemented by computer chips or entities, or by products with certain functions. A typical implementing device is a computer, which may take the form of a personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media player, navigation device, e-mail device, game control device, etc. desktops, tablets, wearables, or any combination of these.
为了描述的方便,描述以上装置时以功能分为各种单元分别描述。当然,在实施本申请时可以把各单元的功能在同一个或多个软件和/或硬件中实现。For the convenience of description, when describing the above devices, functions are divided into various units and described separately. Of course, when implementing the present application, the functions of each unit can be implemented in one or more pieces of software and/or hardware.
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请实施例可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present application may be provided as methods, systems, or computer program products. 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, etc.) having computer-usable program code embodied therein.
本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可以由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其它可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其它可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present application is described with reference to flowcharts and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present application. It should be understood that each procedure and/or block in the flowchart and/or block diagram, and a combination of procedures and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions may be provided to a general purpose computer, special purpose computer, embedded processor, or processor of other programmable data processing equipment to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing equipment produce a An apparatus for realizing the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
而且,这些计算机程序指令也可以存储在能引导计算机或其它可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或者多个流程和/或方框图一个方框或者多个方框中指定的功能。Moreover, these computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, The instruction means implements the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
这些计算机程序指令也可装载到计算机或其它可编程数据处理设备上,使得在计算机或者其它可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其它可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operational steps are performed on the computer or other programmable equipment to produce computer-implemented processing, so that the information executed on the computer or other programmable equipment The instructions provide steps for implementing the functions specified in the flow chart or blocks of the flowchart and/or the block or blocks of the block diagrams.
对于装置实施例而言,由于其基本对应于方法实施例,所以相关之处参见方法实施例的部分说明即可。以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本申请方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。As for the device embodiment, since it basically corresponds to the method embodiment, for related parts, please refer to the part description of the method embodiment. The device embodiments described above are only illustrative, and the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in One place, or it can be distributed to multiple network elements. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of the present application. It can be understood and implemented by those skilled in the art without creative effort.
以上所述仅为本申请的较佳实施例而已,并不用以限制本申请,凡在本申请的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本申请保护的范围之内。The above is only a preferred embodiment of the application, and is not intended to limit the application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the application should be included in the application. within the scope of protection.
Claims (14)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210006146.1A CN114442941B (en) | 2022-01-05 | 2022-01-05 | Data migration method, system, storage medium and equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210006146.1A CN114442941B (en) | 2022-01-05 | 2022-01-05 | Data migration method, system, storage medium and equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114442941A CN114442941A (en) | 2022-05-06 |
CN114442941B true CN114442941B (en) | 2023-05-12 |
Family
ID=81366201
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210006146.1A Active CN114442941B (en) | 2022-01-05 | 2022-01-05 | Data migration method, system, storage medium and equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114442941B (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6732231B1 (en) * | 2001-02-28 | 2004-05-04 | Emc Corporation | System and method for management of mirrored storage devices storing device serial numbers |
US9400611B1 (en) * | 2013-03-13 | 2016-07-26 | Emc Corporation | Data migration in cluster environment using host copy and changed block tracking |
CN106383667A (en) * | 2016-09-18 | 2017-02-08 | 华为数字技术(成都)有限公司 | Method and apparatus for LUN migration in business operation |
WO2019076236A1 (en) * | 2017-10-17 | 2019-04-25 | 中兴通讯股份有限公司 | Data synchronization method and device, super controller, domain controller, and storage medium |
CN111367892A (en) * | 2020-03-31 | 2020-07-03 | 中国建设银行股份有限公司 | Data migration method and device |
CN112783449A (en) * | 2021-01-25 | 2021-05-11 | 中国工商银行股份有限公司 | Data migration method and device |
-
2022
- 2022-01-05 CN CN202210006146.1A patent/CN114442941B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6732231B1 (en) * | 2001-02-28 | 2004-05-04 | Emc Corporation | System and method for management of mirrored storage devices storing device serial numbers |
US9400611B1 (en) * | 2013-03-13 | 2016-07-26 | Emc Corporation | Data migration in cluster environment using host copy and changed block tracking |
CN106383667A (en) * | 2016-09-18 | 2017-02-08 | 华为数字技术(成都)有限公司 | Method and apparatus for LUN migration in business operation |
WO2019076236A1 (en) * | 2017-10-17 | 2019-04-25 | 中兴通讯股份有限公司 | Data synchronization method and device, super controller, domain controller, and storage medium |
CN111367892A (en) * | 2020-03-31 | 2020-07-03 | 中国建设银行股份有限公司 | Data migration method and device |
CN112783449A (en) * | 2021-01-25 | 2021-05-11 | 中国工商银行股份有限公司 | Data migration method and device |
Also Published As
Publication number | Publication date |
---|---|
CN114442941A (en) | 2022-05-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6708929B2 (en) | Storage control device, storage system, and storage control program | |
US9606740B2 (en) | System, method and computer program product for synchronizing data written to tape including writing an index into a data partition | |
US10831613B2 (en) | Replicating a source data set to a target data store | |
US10852981B2 (en) | System for migrating virtual tape volumes between filesystems | |
CN105938457B (en) | Filter method, device and the data reading system of data | |
CN106407040A (en) | Remote data copy method and system | |
US9075754B1 (en) | Managing cache backup and restore | |
US9021222B1 (en) | Managing incremental cache backup and restore | |
JP2006268829A (en) | Method and apparatus for mirroring objects between storage systems | |
JP2006209636A (en) | Method for maintaining snapshot | |
JP2013011919A (en) | Storage apparatus and snapshot control method of the same | |
CN103617097B (en) | File access pattern method and device | |
CN111007990B (en) | Positioning method for quickly positioning data block references in snapshot system | |
US8140886B2 (en) | Apparatus, system, and method for virtual storage access method volume data set recovery | |
CN100504800C (en) | Method for snapshot of magnetic disk | |
CN112783449A (en) | Data migration method and device | |
CN106528338A (en) | Remote data replication method, storage equipment and storage system | |
JP2017531892A (en) | Improved apparatus and method for performing a snapshot of a block level storage device | |
US10725970B2 (en) | Block storage device with optional deduplication | |
CN114442941B (en) | Data migration method, system, storage medium and equipment | |
CN114442943B (en) | A data migration method, system and device | |
CN113868018B (en) | Data storage method and device and data recovery method | |
CN114442944B (en) | Data replication method, system and equipment | |
CN114442942B (en) | A data migration method, system, device and storage medium | |
CN107545022A (en) | Disk management method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |