


技术领域technical field
本发明实施例涉及存储技术领域,特别是一种远程数据复制方法、存储设备及存储系统。The embodiments of the present invention relate to the technical field of storage, and in particular, to a remote data replication method, a storage device, and a storage system.
背景技术Background technique
数据容灾,又称为远程数据复制技术,是指建立一个异地的数据系统,该系统是本地数据的一个可用复制。在本地数据及整个应用系统出现灾难时,系统至少在异地保存有一份可用的关键业务的数据。Data disaster recovery, also known as remote data replication technology, refers to the establishment of a remote data system, which is an available copy of local data. In the event of a disaster in the local data and the entire application system, the system at least saves an available key business data in a different place.
典型的数据容灾系统包括生产中心和灾备中心。在生产中心,部署有主机、存储阵列,用于正常的业务运行;在灾备中心,部署有主机、存储阵列,用于在生产中心发生灾难后,接管其业务。在海量存储系统中,生产中心的存储阵列和灾备中心的存储阵列通常都是包含多个控制器的存储阵列。不同的控制器可以分别对同一个文件进行写入和修改,为了保证复制到灾备中心的文件和生产中心的文件保持一致,各个控制器对该文件进行的写入操作需要串行复制到灾备中心,影响了复制效率。A typical data disaster recovery system includes a production center and a disaster recovery center. In the production center, hosts and storage arrays are deployed for normal business operation; in the disaster recovery center, hosts and storage arrays are deployed to take over its business after a disaster occurs in the production center. In a mass storage system, the storage array of the production center and the storage array of the disaster recovery center are usually storage arrays containing multiple controllers. Different controllers can write and modify the same file respectively. In order to ensure that the files copied to the disaster recovery center are consistent with those of the production center, the write operations performed by each controller on the file need to be serially copied to the disaster recovery center. The backup center affects the replication efficiency.
发明内容SUMMARY OF THE INVENTION
本实施例提供了一种远程数据复制方法和存储系统,能够在多控系统中并发地执行复制任务。This embodiment provides a remote data replication method and storage system, which can execute replication tasks concurrently in a multi-controller system.
第一方面,提供了一种远程数据复制方法。所述方法应用于存储系统中,所述存储系统包括生产阵列和灾备阵列,所述生产阵列至少包括第一控制器和第二控制器。第一控制器检测本地是否有复制任务,当没有复制任务时,向第二控制器发送请求消息。所述请求消息用于向所述第二控制器申请复制任务,第二控制器至少包括两个复制任务。第二控制器根据所述请求消息,读取第一个复制任务对应的数据并发送给所述第一控制器。第一控制器接收所述第一个复制任务对应的数据,将所述第一个复制任务对应的数据发送给灾备阵列,第二控制器也将第二个复制任务对应的数据发送给所述灾备阵列。In a first aspect, a remote data replication method is provided. The method is applied to a storage system, the storage system includes a production array and a disaster recovery array, and the production array at least includes a first controller and a second controller. The first controller detects whether there is a replication task locally, and when there is no replication task, sends a request message to the second controller. The request message is used to apply for a replication task to the second controller, and the second controller includes at least two replication tasks. According to the request message, the second controller reads the data corresponding to the first replication task and sends the data to the first controller. The first controller receives the data corresponding to the first replication task, sends the data corresponding to the first replication task to the disaster recovery array, and the second controller also sends the data corresponding to the second replication task to the Describe the disaster recovery array.
在本实施例中,第一控制器没有复制任务,处于空闲状态,而第二控制器至少包括两个复制任务,处于繁忙状态。因此,第一控制器可以向第二控制器发送请求消息,以申请复制任务。第二控制器根据所述请求消息,将自己的至少两个两个复制任务分配一个给第一控制器,从而第一控制器和第二控制器可以各自执行一个复制任务,达到了并行处理了的目的,提高了复制效率。In this embodiment, the first controller has no replication tasks and is in an idle state, while the second controller includes at least two replication tasks and is in a busy state. Therefore, the first controller can send a request message to the second controller to apply for the replication task. According to the request message, the second controller assigns one of its at least two replication tasks to the first controller, so that the first controller and the second controller can each execute one replication task, achieving parallel processing. for the purpose of improving the replication efficiency.
在第一方面的第一种实施方式中,所述第二控制器维护有复制队列,所述复制队列包括所述至少两个复制任务。因此,第二控制器具体是从所述复制队列中获取第一个复制任务,并将第一个复制任务对应的数据发送给第一控制器。另外,第二控制器也是从所述复制队列中获取第二复制任务,将所述第二复制任务对应的数据发送给所述灾备阵列。In a first implementation manner of the first aspect, the second controller maintains a replication queue, and the replication queue includes the at least two replication tasks. Therefore, the second controller specifically acquires the first replication task from the replication queue, and sends the data corresponding to the first replication task to the first controller. In addition, the second controller also obtains the second replication task from the replication queue, and sends the data corresponding to the second replication task to the disaster recovery array.
结合第一方面,以及第一方面的第一种实施方式,在第二种实施方式中,第一个复制任务和所述第二个复制任务是针对同一个文件的复制任务。由此实现了同一个文件的并行复制。With reference to the first aspect and the first implementation manner of the first aspect, in a second implementation manner, the first copying task and the second copying task are copying tasks for the same file. This enables parallel replication of the same file.
结合第一方面的第二种实施方式,在第三种实施方式中,所述文件具有唯一的文件名,所述第一个复制任务对应的数据包括所述文件名,所述文件的初始数据,以及所述初始数据的写入时间,所述第二个复制任务对应的数据包括所述文件名,所述文件的修改数据,以及所述修改数据的写入时间,所述修改数据的写入时间晚于所述初始数据的写入时间。With reference to the second implementation manner of the first aspect, in the third implementation manner, the file has a unique file name, the data corresponding to the first copy task includes the file name, the initial data of the file , and the writing time of the initial data, the data corresponding to the second copy task includes the file name, the modified data of the file, and the writing time of the modified data, the write of the modified data The entry time is later than the writing time of the initial data.
结合第一方面的第三种实施方式,在第四种实施方式中,所述灾备阵列接收所述第一个复制任务对应的数据,创建所述文件的备份文件,将所述初始数据写入所述备份文件,所述备份文件的文件名与所述文件的文件名相同。在所述接收所述第一个复制任务对应的数据之后,所述灾备阵列接收所述第二个复制任务对应的数据。所述灾备阵列确定所述第二个复制任务对应的文件名与所述备份文件的文件名相同时,判断所述修改数据的写入时间是否晚于所述初始数据的写入时间。当所述灾备阵列确定所述修改数据的写入时间晚于所述初始数据的写入时间时,将所述修改数据写入所述备份文件中。在这种实施方式中,如果灾备阵列先接收初始数据,再接收修改数据,可以将修改数据写入备份文件中。即使修改数据会覆盖初始数据,也不会造成灾备阵列和生产阵列的数据不一致。With reference to the third implementation manner of the first aspect, in the fourth implementation manner, the disaster recovery array receives the data corresponding to the first replication task, creates a backup file of the file, and writes the initial data into the backup file, and the file name of the backup file is the same as the file name of the file. After receiving the data corresponding to the first replication task, the disaster recovery array receives the data corresponding to the second replication task. When determining that the file name corresponding to the second copy task is the same as the file name of the backup file, the disaster recovery array determines whether the writing time of the modified data is later than the writing time of the initial data. When the disaster recovery array determines that the writing time of the modified data is later than the writing time of the initial data, the modified data is written into the backup file. In this embodiment, if the disaster recovery array receives the initial data first, and then receives the modified data, the modified data can be written into the backup file. Even if the modified data will overwrite the initial data, it will not cause data inconsistency between the disaster recovery array and the production array.
结合第一方面的第三种实施方式,在第五种实施方式中,所述灾备阵列接收所述第二个复制任务对应的数据,创建所述文件的备份文件,将所述修改数据写入所述备份文件,所述备份文件的文件名与所述文件的文件名相同。在所述接收所述第二个复制任务对应的数据之后,所述灾备阵列接收所述第一个复制任务对应的数据。所述灾备阵列确定所述第一个复制任务对应的文件名与所述备份文件的文件名相同时,判断所述初始数据的写入时间是否晚于所述修改数据的写入时间。当所述灾备阵列确定所述初始数据的写入时间早于所述修改数据的写入时间时,不执行将所述初始数据写入所述备份文件中的操作。在这种实施方式中,如果灾备阵列先接收修改数据,再接收初始数据,则不执行将初始数据写入备份文件的操作,以防止灾备阵列和生产阵列的数据不一致。With reference to the third implementation manner of the first aspect, in the fifth implementation manner, the disaster recovery array receives data corresponding to the second replication task, creates a backup file of the file, and writes the modified data to into the backup file, and the file name of the backup file is the same as the file name of the file. After receiving the data corresponding to the second replication task, the disaster recovery array receives the data corresponding to the first replication task. The disaster recovery array determines whether the writing time of the initial data is later than the writing time of the modified data when it is determined that the file name corresponding to the first copy task is the same as the file name of the backup file. When the disaster recovery array determines that the writing time of the initial data is earlier than the writing time of the modified data, the operation of writing the initial data into the backup file is not performed. In this embodiment, if the disaster recovery array first receives the modified data and then receives the initial data, the operation of writing the initial data to the backup file is not performed to prevent data inconsistency between the disaster recovery array and the production array.
本发明第二方面提供了一种存储设备,以执行第一方面提供的方法。A second aspect of the present invention provides a storage device to perform the method provided in the first aspect.
本发明第三方面提供了一种存储设备,以执行第一方面提供的方法。A third aspect of the present invention provides a storage device to perform the method provided in the first aspect.
附图说明Description of drawings
为了更清楚地说明本发明实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍。In order to illustrate the technical solutions of the embodiments of the present invention more clearly, the accompanying drawings required in the embodiments will be briefly introduced below.
图1是本发明实施例提供的系统架构示意图;1 is a schematic diagram of a system architecture provided by an embodiment of the present invention;
图2是本发明实施例提供的控制器的结构图;2 is a structural diagram of a controller provided by an embodiment of the present invention;
图3是本发明实施例提供的远程数据复制方法的流程示意图。FIG. 3 is a schematic flowchart of a remote data replication method provided by an embodiment of the present invention.
具体实施方式Detailed ways
本实施例提供了一种远程数据复制方法、存储设备和存储系统,能够在多控系统中并发地执行复制任务。This embodiment provides a remote data replication method, storage device, and storage system, which can concurrently execute replication tasks in a multi-controller system.
图1为本发明实施例提供的远程数据复制方法的系统架构示意图,如图1所示,生产中心包括生产主机、连接设备和生产阵列20;灾备中心的系统架构与生产中心类似,包括灾备主机、连接设备和灾备阵列30。在本发明实施例中,灾备中心可以不止一个。其中,生产中心与灾备中心可以通过IP(Internet Protocol)或者FC(Fiber Chanel)或者其他协议进行数据传输。FIG. 1 is a schematic diagram of a system architecture of a remote data replication method provided by an embodiment of the present invention. As shown in FIG. 1, a production center includes a production host, a connection device, and a
生产主机和灾备主机均可以是任何计算设备,如服务器、台式计算机等等。在主机内部,安装有操作系统以及其他应用程序。Both the production host and the disaster recovery host can be any computing devices, such as servers, desktop computers, and so on. Inside the host, an operating system and other applications are installed.
连接设备可以是存储设备和主机之间的任何接口,如光纤交换机,或者其他当前技术已知有的交换机。The connecting device can be any interface between the storage device and the host, such as a fiber optic switch, or other switches known in the art.
生产阵列20和灾备阵列30均可以是存储设备,如独立硬盘冗余阵列(RedundantArrays of Inexpensive Disks,RAID)、硬盘簇(Just a Bunch Of Disks,JBOD)、直接存取存储器(Direct Access Storage Device,DASD)的一个或多个互连的硬盘驱动器,诸如磁带库、一个或多个存储单元的磁带存储设备。Both the
本实施例中的生产阵列20和灾备阵列30均是具有文件系统的存储设备,也就是说,存储介质中保存的数据是以文件为单位进行管理和访问的。文件系统是一种存储和组织数据的方法,它使得对数据的访问和查找变得容易,文件系统使用文件和树形目录的抽象逻辑概念代替了硬盘等物理设备使用的数据块的概念。生产阵列20在使用文件系统来保存数据后,用户不必关心数据实际保存在硬盘的地址为多少的数据块上,只需要记住这个文件的所属目录和文件名。同样的,在写入新数据之前,用户不必关心硬盘上的那个块地址没有被使用,硬盘上的存储空间管理(分配和释放)功能由文件系统自动完成,用户只需要记住数据被写入到了哪个文件中。Both the
生产阵列20和灾备阵列30的硬件结构是相同的。图2是本发明实施例生产阵列20的结构示意图,图3是本发明实施例灾备阵列30的结构示意图。The hardware structures of the
如图2所示,生产阵列20至少包括控制器21、控制器22和若干个硬盘31。控制器21可以包括任何计算设备,如服务器、台式计算机等等。在控制器内部,安装有文件系统以及其他应用程序。控制器21用于执行和文件相关的各种操作,例如创建文件、创建目录、读文件操作、写文件操作、发送数据复制请求等等。控制器22和控制器21的结构类似,功能相同。生产阵列20包含的若干个硬盘31用于提供存储空间保存文件。需要说明的是,控制器21和控制器22仅是本发明实施例的示例,在本发明实施例中还可以包含其他控制器,本实施例并没有对控制器的数量进行限定。As shown in FIG. 2 , the
控制器21主要包括处理器(processor)118、缓存(cache)120、存储器(memory)122、通信总线(简称总线)126以及通信接口(Communication Interface)128。处理器118、缓存120、存储器122以及通信接口128通过通信总线126完成相互间的通信。The
通信接口128,用于与生产主机、灾备阵列以及硬盘31通信。另外,通信接口128还用于与控制器22通信。The communication interface 128 is used to communicate with the production host, the disaster recovery array and the hard disk 31 . Additionally, the communication interface 128 is also used to communicate with the controller 22 .
存储器122,用于存放程序124,存储器122可能包含高速RAM存储器,也可能还包括非易失性存储器(non-volatile memory),例如至少一个硬盘存储器。可以理解的是,存储器122可以为随机存储器(Random-Access Memory,RAM)、磁碟、硬盘、光盘、固态硬盘(SolidState Disk,SSD)或者非易失性存储器等各种可以存储程序代码的非短暂性的(non-transitory)机器可读介质。The memory 122 is used to store the program 124. The memory 122 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one hard disk memory. It can be understood that the memory 122 can be a random-access memory (Random-Access Memory, RAM), a magnetic disk, a hard disk, an optical disk, a solid state disk (Solid State Disk, SSD) or a non-volatile memory and other non-volatile memory devices that can store program codes. Transient (non-transitory) machine-readable medium.
程序124可以包括程序代码,所述程序代码包括上面描述的文件系统以及其他程序代码。Program 124 may include program code, including the file system described above, as well as other program code.
缓存120(Cache)用于缓存从生产主机接收的数据或从硬盘中读取的数据。缓存120可以是RAM、ROM、闪存(Flash memory)或固态硬盘(Solid State Disk,SSD)等各种可以存储数据的非短暂性的(non-transitory)机器可读介质,在此不做限定。The cache 120 (Cache) is used to cache the data received from the production host or the data read from the hard disk. The cache 120 may be various non-transitory (non-transitory) machine-readable media capable of storing data, such as RAM, ROM, flash memory (Flash memory) or solid state disk (Solid State Disk, SSD), which is not limited herein.
另外,存储器122和缓存120可以合设或者分开设置,本发明实施例对此不做限定。In addition, the memory 122 and the cache 120 may be set together or separately, which is not limited in this embodiment of the present invention.
处理器118可能是一个中央处理器CPU,或者是特定集成电路ASIC(ApplicationSpecific Integrated Circuit),或者是被配置成实施本发明实施例的一个或多个集成电路。The processor 118 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention.
灾备阵列30的结构和生产阵列20相同,其作用是当生产阵列20发生故障时,可以接替生产阵列20继续处理业务。The structure of the
下面结合图1和图2,描述本发明实施例一种远程数据复制方法。该方法应用在图1所示的异步远程复制的场景中,由生产阵列20和灾备阵列30执行。如图3所述,所述方法可以包括以下步骤:The following describes a remote data replication method according to an embodiment of the present invention with reference to FIG. 1 and FIG. 2 . This method is applied in the asynchronous remote replication scenario shown in FIG. 1 , and is executed by the
步骤1:第一控制器21检测本地是否有复制任务。Step 1: The
复制任务是指将数据从生产阵列20复制到灾备阵列30的任务。示例性的,第一控制器的缓存中保存有一个复制队列,所述复制队列中可以包括多个复制任务,每个复制任务可以用文件名、文件数据的写入时间等信息来描述。第一控制器可以通过检查所述复制队列所包含的信息来确定当前是否具有复制任务。另外,队列只是本发明实施例的一个示例,本实施例还可以采用其他数据结构,例如堆、栈等,来保存复制任务。The replication task refers to the task of replicating data from the
步骤2:当第一控制器21没有复制任务时,向第二控制器22发送请求消息。Step 2: When the
所述请求消息用于向第二控制器22申请复制任务。可以理解的是,生产阵列20中可能包含其他控制器,某些控制器处于空闲状态(没有复制任务),而某些控制器可能处于繁忙状态(包括多个待处理的复制任务),那么处于空闲状态的控制器可以向处于繁忙状态的控制器申请复制任务。为了方便描述,本实施例以第二控制器22为处于繁忙状态的控制器为例,所述第二控制器22至少包括两个复制任务。The request message is used to apply to the second controller 22 for a replication task. It will be appreciated that the
在实际应用中,第一控制器21可以分别向生产阵列20中的每个控制器发送查询消息,以获取每个控制器待处理的复制任务。再从中选择出一个处于繁忙状态的控制器,向其发送请求消息。或者,在生产阵列20中确定一个控制器,用于采集各个控制器待处理的复制任务的数量,并通知第一控制器21当前处于繁忙状态的控制器。In practical applications, the
步骤3:第二控制器22根据所述请求消息,分配一个或多个复制任务给第一控制器21。Step 3: The second controller 22 allocates one or more replication tasks to the
与第一控制器21类似,第二控制器的缓存中也保存有一个复制队列,所述复制队列中可以包括多个复制任务。第二控制器可以将其中的一个或多个复制任务分配给第一控制器21,以保证各个控制器之间的任务均衡。具体的,第二控制器22可以根据先进先出的原则,将最早进入所述队列的一个或多个复制任务分配给第一控制器21。所谓分配复制任务给第一控制器21,具体可以是将所述复制任务对应的数据发送给第一控制器21。所述复制任务对应的数据包括待复制给灾备阵列30的数据,本发明实施例将待复制给灾备阵列30的数据称为文件数据,也就是文件对应的数据块。由于所述复制任务可以用文件名来描述,因此通过所述文件名以及相应的元数据可以获取文件数据,并发送给第一控制器21。另外,除了所述文件数据之外,所述复制任务对应的数据还包括所述文件数据所属的文件的文件名以及所述文件数据的写入时间。所述文件数据的写入时间是指所述文件数据写入所述生产阵列的时间,它可能是一个具体的时间点,也可能是用于表示一段时间范围的时间区间,还有可能是表示所述文件的版本信息的版本号。本实施例并不对所述写入时间的含义和形式进行任何限定,只要能够通过各个写入时间的对比得出文件数据写入所述生产阵列的先后顺序即可。Similar to the
一个队列里面的多个复制任务,可能是针对同一个文件的复制任务(这些复制任务的文件名相同),也可能是针对不同文件的复制任务。以针对同一个文件的多个复制任务为例,所述多个复制任务对应针对所述文件的多次写入操作。本发明实施例可以利用一个序列号来记录对文件的多次写入操作。例如,当一个文件刚被创建时,也就是执行第一次写入操作时,其序列号为1;当所述文件被修改,也就是执行第二次写入操作时,其序列号为2。所谓执行针对一个文件的多个复制任务也就是将所述文件对应的多次写入操作同步至灾备阵列。因此,每次复制任务可以对应一个唯一的序列号。Multiple copy tasks in a queue may be copy tasks for the same file (the file names of these copy tasks are the same), or may be copy tasks for different files. Taking multiple copy tasks for the same file as an example, the multiple copy tasks correspond to multiple write operations for the file. In this embodiment of the present invention, a serial number can be used to record multiple write operations to a file. For example, when a file is just created, that is, when the first write operation is performed, its sequence number is 1; when the file is modified, that is, when the second write operation is performed, its sequence number is 2 . The so-called execution of multiple replication tasks for a file is to synchronize multiple write operations corresponding to the file to the disaster recovery array. Therefore, each replication task can correspond to a unique sequence number.
为了方便描述,本实施例将第二控制器22分配给第一控制器21的复制任务称为第一复制任务,将第二控制器22分配给第一控制器21的复制任务之外,队列中剩余的复制任务称为第二复制任务。例如,第一个复制任务以及第二个复制任务可分别包括如下信息:For the convenience of description, in this embodiment, the replication task assigned by the second controller 22 to the
如上表所示,第一个复制任务对应的数据属于文件名为0X100的文件名,所述数据的写入时间是2016.1.1,所述第一个复制任务的序列号是001;第二个复制任务对应的数据属于文件名为0X100的文件名,所述数据的写入时间是2016.1.2,所述第二个复制任务的序列号是002。As shown in the above table, the data corresponding to the first copy task belongs to the file name of 0X100, the writing time of the data is 2016.1.1, and the serial number of the first copy task is 001; The data corresponding to the copy task belongs to the file name of 0X100, the writing time of the data is 2016.1.2, and the sequence number of the second copy task is 002.
步骤4:第一控制器21接收第一个复制任务对应的数据,并且将所述数据发送给灾备阵列30。Step 4: The
具体的,第二控制器22可以根据文件名以及对应的元数据,获取文件数据,将所述文件数据、文件名、序列号以及所述文件数据的写入时间发送给第一控制器21。由第一控制器21执行所述复制任务,也就是说将所述文件数据、文件名、序列号以及所述文件数据的写入时间发送给灾备阵列30。Specifically, the second controller 22 may acquire file data according to the file name and corresponding metadata, and send the file data, file name, serial number, and writing time of the file data to the
步骤5:第二控制器22将第二个复制任务对应的数据发送给灾备阵列30。Step 5: The second controller 22 sends the data corresponding to the second replication task to the
具体的,第二控制器22根据所述第二个复制任务记录的文件名以及对应的元数据获取文件数据,并且将所述文件数据、文件名以及所述文件数据的写入时间发送给灾备阵列30。Specifically, the second controller 22 obtains the file data according to the file name recorded by the second copy task and the corresponding metadata, and sends the file data, the file name and the writing time of the file data to the
通过图3所示的实施方式,处于空闲状态的控制器可以向处于繁忙状态的控制器申请复制任务,处于繁忙状态的控制器将自己的复制任务分配一部分给处于空闲状态的控制器,由此,各个控制器可以并行地处理复制任务,提高了复制效率。Through the implementation shown in FIG. 3 , the controller in the idle state can apply for a replication task to the controller in the busy state, and the controller in the busy state allocates a part of its replication task to the controller in the idle state, thereby , each controller can process replication tasks in parallel, which improves the replication efficiency.
下面介绍当各个控制器并行处理复制任务时,如何保证灾备阵列的文件与生产阵列的文件的一致性。The following describes how to ensure the consistency of the files of the disaster recovery array and the files of the production array when each controller processes the replication tasks in parallel.
由图3所示,第一控制器21执行第一个复制任务,将第一个复制任务对应的文件数据复制给了灾备阵列30;第二控制器22执行第二个复制任务,将第二个复制任务对应的文件数据复制给了灾备阵列30。为了方便描述,将第一个复制任务对应的文件数据简称为数据A,将第二个复制任务对应的文件数据简称为数据B。虽然第一控制器21和第二控制器22是并行地执行这两个复制任务,然而灾备阵列30往往并不是同时接收数据A和数据B的时间的。As shown in FIG. 3, the
情况1:灾备阵列30先接收数据A,再接收数据B。Case 1: The
灾备阵列30在接收数据A时,还会一并接收并保存数据A所属的文件的文件名,第一复制任务的序列号以及数据A的写入时间。灾备阵列可以遍历本地的文件的文件名,确定数据A不属于本地的任何一个文件。从而,创建一个新文件,所述新文件是数据A在生产阵列所属的文件的备份文件。所述备份文件的文件名可以与源文件(数据A在生产阵列所属的文件)一致。随后,灾备阵列30将数据A写入所述备份数据,并记录数据A的写入时间,所述写入时间与生产阵列20发送的数据A的写入时间相同。When the
在灾备阵列30接收数据A之后,接收数据B。由于数据B所属的文件的文件名和上述备份文件的文件名相同,灾备阵列30不需再创建新的文件。接下来,灾备阵列30记录数据B对应的写入时间,所述写入时间与生产阵列20发送的数据B的写入时间相同。灾备阵列30比较数据B的写入时间和数据A的写入时间,确定数据B的写入时间晚于数据A的写入时间,因此数据A是所述备份文件的初始数据,而数据B是所述备份文件的修改数据。修改数据可以覆盖初始数据,灾备阵列执行将数据B写入所述备份文件的操作。After the
情况2:灾备阵列30先接收数据B,再接收数据A。Case 2: The
灾备阵列30在接收数据B时,遍历本地的文件的文件名,确定数据B不属于本地的任何一个文件。从而,创建一个新文件,所述新文件是数据B在生产阵列所属的文件的备份文件。所述备份文件的文件名可以与源文件(数据B在生产阵列所属的文件)一致。随后,灾备阵列30将数据B写入所述备份数据,并记录数据B的写入时间,所述写入时间与生产阵列20发送的数据B的写入时间相同。When receiving the data B, the
在灾备阵列30接收数据B之后,接收数据A。由于数据A所属的文件的文件名和上述备份文件的文件名相同,灾备阵列30不需再创建新的文件。接下来,灾备阵列30记录数据A对应的写入时间,所述写入时间与生产阵列20发送的数据A的写入时间相同。灾备阵列30比较数据B的写入时间和数据A的写入时间,确定数据A的写入时间早于数据B的写入时间,因此数据A是所述备份文件的初始数据,而数据B是所述备份文件的修改数据。初始数据不可以覆盖修改数据,灾备阵列不执行将数据A写入所述备份文件的操作。After the
由此,灾备阵列30在接收针对同一个文件的多个数据时,可以根据各个数据的写入时间判断是否执行对备份文件的写入操作,其原则是,只能用写入时间较晚的数据覆盖写入时间较早的数据,由此保证了文件的一致性。Therefore, when the
另外,当生产阵列20中的文件被删除时,为了保持一致,灾备阵列30中的备份文件也需要被删除。具体的,生产阵列20可以向灾备阵列发送删除文件的指令,所述指令包括所述文件的文件名,以及最新的序列号(最后一次写入操作对应的序列号)。灾备阵列30接收所述删除文件的指令之后,根据所述文件名查找到相应的备份文件,判断所述备份文件的最新的序列号是否与生产阵列20发送的序列号相同。若相同,则灾备阵列30执行删除所述备份文件的操作;否则,不执行删除所述备份文件的操作。In addition, when the files in the
最后应说明的是:以上各实施例仅用以说明本发明的技术方案,而非对其限制。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, but not to limit them.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610971200.0ACN106528338B (en) | 2016-10-28 | 2016-10-28 | A remote data replication method, storage device and storage system |
| CN202010780943.6ACN112068992B (en) | 2016-10-28 | 2016-10-28 | Remote data replication method, storage device and storage system |
| PCT/CN2017/081341WO2018076633A1 (en) | 2016-10-28 | 2017-04-21 | Remote data replication method, storage device and storage system |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610971200.0ACN106528338B (en) | 2016-10-28 | 2016-10-28 | A remote data replication method, storage device and storage system |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202010780943.6ADivisionCN112068992B (en) | 2016-10-28 | 2016-10-28 | Remote data replication method, storage device and storage system |
| Publication Number | Publication Date |
|---|---|
| CN106528338A CN106528338A (en) | 2017-03-22 |
| CN106528338Btrue CN106528338B (en) | 2020-08-14 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201610971200.0AActiveCN106528338B (en) | 2016-10-28 | 2016-10-28 | A remote data replication method, storage device and storage system |
| CN202010780943.6AActiveCN112068992B (en) | 2016-10-28 | 2016-10-28 | Remote data replication method, storage device and storage system |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202010780943.6AActiveCN112068992B (en) | 2016-10-28 | 2016-10-28 | Remote data replication method, storage device and storage system |
| Country | Link |
|---|---|
| CN (2) | CN106528338B (en) |
| WO (1) | WO2018076633A1 (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106528338B (en)* | 2016-10-28 | 2020-08-14 | 华为技术有限公司 | A remote data replication method, storage device and storage system |
| CN109164985B (en)* | 2018-08-27 | 2020-07-07 | 华为技术有限公司 | Method for copying data, master device and slave device |
| CN109491980A (en)* | 2018-11-02 | 2019-03-19 | 郑州云海信息技术有限公司 | A kind of remote replication method of file system, device, equipment and storage medium |
| CN109960613B (en)* | 2019-03-11 | 2023-05-12 | 中国银联股份有限公司 | Method and device for batch data processing |
| CN112395135B (en)* | 2020-11-30 | 2024-12-17 | 福建安正智能科技有限公司 | Computer room server data backup method and device |
| CN115277376B (en)* | 2022-09-29 | 2022-12-23 | 深圳华锐分布式技术股份有限公司 | Disaster recovery switching method, device, equipment and medium |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7624134B2 (en)* | 2006-06-12 | 2009-11-24 | International Business Machines Corporation | Enabling access to remote storage for use with a backup program |
| CN102799475A (en)* | 2012-06-29 | 2012-11-28 | 东南大学 | Multi-replication fault-tolerant parallel task scheduling method based on task replication |
| CN103617098A (en)* | 2013-12-03 | 2014-03-05 | 上海爱数软件有限公司 | Intelligent backup method and system based on data changes |
| CN105988901A (en)* | 2013-12-12 | 2016-10-05 | 华为技术有限公司 | Data copying method and storage system |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8548944B2 (en)* | 2010-07-15 | 2013-10-01 | Delphix Corp. | De-duplication based backup of file systems |
| CN104520802B (en)* | 2013-07-26 | 2017-04-19 | 华为技术有限公司 | Data sending method, data receiving method and storage device |
| CN103649901A (en)* | 2013-07-26 | 2014-03-19 | 华为技术有限公司 | Data transmission method, data receiving method and sotring equipment |
| CN105550367A (en)* | 2015-06-30 | 2016-05-04 | 巫立斌 | Asynchronous remote copy method for memory |
| CN105404564A (en)* | 2015-12-16 | 2016-03-16 | 浪潮(北京)电子信息产业有限公司 | Data remote disaster tolerance method and apparatus |
| CN106528338B (en)* | 2016-10-28 | 2020-08-14 | 华为技术有限公司 | A remote data replication method, storage device and storage system |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7624134B2 (en)* | 2006-06-12 | 2009-11-24 | International Business Machines Corporation | Enabling access to remote storage for use with a backup program |
| CN102799475A (en)* | 2012-06-29 | 2012-11-28 | 东南大学 | Multi-replication fault-tolerant parallel task scheduling method based on task replication |
| CN103617098A (en)* | 2013-12-03 | 2014-03-05 | 上海爱数软件有限公司 | Intelligent backup method and system based on data changes |
| CN105988901A (en)* | 2013-12-12 | 2016-10-05 | 华为技术有限公司 | Data copying method and storage system |
| Publication number | Publication date |
|---|---|
| CN112068992A (en) | 2020-12-11 |
| WO2018076633A1 (en) | 2018-05-03 |
| CN106528338A (en) | 2017-03-22 |
| CN112068992B (en) | 2025-01-03 |
| Publication | Publication Date | Title |
|---|---|---|
| US11461202B2 (en) | Remote data replication method and system | |
| CN106528338B (en) | A remote data replication method, storage device and storage system | |
| US10430286B2 (en) | Storage control device and storage system | |
| KR100439675B1 (en) | An efficient snapshot technique for shated large storage | |
| US9996421B2 (en) | Data storage method, data storage apparatus, and storage device | |
| US7293145B1 (en) | System and method for data transfer using a recoverable data pipe | |
| US8706694B2 (en) | Continuous data protection of files stored on a remote storage device | |
| US7882081B2 (en) | Optimized disk repository for the storage and retrieval of mostly sequential data | |
| US8924664B2 (en) | Logical object deletion | |
| US20080320258A1 (en) | Snapshot reset method and apparatus | |
| JP4741371B2 (en) | System, server apparatus, and snapshot format conversion method | |
| US10628298B1 (en) | Resumable garbage collection | |
| WO2018120844A1 (en) | Differential data backup method and differential data backup device | |
| US8140886B2 (en) | Apparatus, system, and method for virtual storage access method volume data set recovery | |
| JP6133396B2 (en) | Computer system, server, and data management method | |
| CN110825559A (en) | A data processing method and device | |
| JP2015049633A (en) | Information processing apparatus, data repair program, and data repair method | |
| JP2006268139A (en) | Data reproduction device, method and program and storing system | |
| JP4394467B2 (en) | Storage system, server apparatus, and preceding copy data generation method | |
| CN111400302B (en) | Modification method, device and system for continuously storing data | |
| CN112286869A (en) | Snapshot creating method and device |
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | 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 |