[go: up one dir, main page]

CN106502828A - Optimized LVM-based remote copying method - Google Patents

Optimized LVM-based remote copying method Download PDF

Info

Publication number
CN106502828A
CN106502828A CN201610913666.5A CN201610913666A CN106502828A CN 106502828 A CN106502828 A CN 106502828A CN 201610913666 A CN201610913666 A CN 201610913666A CN 106502828 A CN106502828 A CN 106502828A
Authority
CN
China
Prior art keywords
lvm
remote
module
request
tcp
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201610913666.5A
Other languages
Chinese (zh)
Inventor
方浩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
IEIT Systems Co Ltd
Original Assignee
Inspur Electronic Information Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inspur Electronic Information Industry Co Ltd filed Critical Inspur Electronic Information Industry Co Ltd
Priority to CN201610913666.5A priority Critical patent/CN106502828A/en
Publication of CN106502828A publication Critical patent/CN106502828A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • G06F11/1464Management of the backup or restore process for networked environments
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process

Landscapes

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

Abstract

本发明特别涉及一种优化的基于LVM的远程复制方法。该优化的基于LVM的远程复制方法,基于LVM远程复制架构包括LVM I/O Analysis模块,LVM I/O Process模块和LVM Remote Replication模块三部分;所述LVM I/O Analysis模块对上层应用的I/O请求解析进行优化;所述LVM I/O Process模块更改写请求的I/O处理流程;所述LVM Remote Replication模块对NBD模块进行更改,使之与LVM的内核结构对接,实现数据的远程发送;LVM Remote Replication模块还对TCP/IP网络的参数也进行了优化,使之更有效到适用于远程复制场景。该优化的基于LVM的远程复制方法,可以用于云计算领域的远距离容灾系统中,不需要特殊的物理环境,只需对原有的IP网络作相应的改进,以完全软件的方法将数据远程复制到另一个远端设备,提升了数据在远程复制中的稳定性、安全性及传输效率。

The invention particularly relates to an optimized LVM-based remote duplication method. The remote replication method based on LVM of this optimization, comprises LVM I/O Analysis module based on LVM remote replication framework, three parts of LVM I/O Process module and LVM Remote Replication module; Described LVM I/O Analysis module is applied to the I /O request analysis is optimized; the LVM I/O Process module changes the I/O processing flow of the write request; the LVM Remote Replication module changes the NBD module so that it is docked with the kernel structure of LVM to realize the remote data Send; the LVM Remote Replication module also optimizes the parameters of the TCP/IP network to make it more effective and suitable for remote replication scenarios. The optimized LVM-based remote replication method can be used in remote disaster recovery systems in the field of cloud computing. It does not require a special physical environment, and only needs to make corresponding improvements to the original IP network. Data is remotely replicated to another remote device, which improves the stability, security and transmission efficiency of data in remote replication.

Description

一种优化的基于LVM的远程复制方法An Optimized Remote Copy Method Based on LVM

技术领域technical field

本发明涉及云计算存储技术领域,特别涉及一种优化的基于LVM的远程复制方法。The invention relates to the technical field of cloud computing storage, in particular to an optimized LVM-based remote replication method.

背景技术Background technique

LVM(Logical Volume Manager,逻辑卷管理)是linux系统中一种动态管理存储设备的管理机制,它通过将底层物理设备抽象封装,向上层提供与普通块存储相同的连续存储空间。LVM提供了完备的用户态及内核态管理机制,同时LVM技术中提供的动态数据迁移、mirror、snapshot等特性,可以为数据复制系统提供完整的框架。LVM (Logical Volume Manager, Logical Volume Management) is a management mechanism for dynamically managing storage devices in the Linux system. It provides the same continuous storage space as ordinary block storage to the upper layer by abstracting and encapsulating the underlying physical devices. LVM provides a complete user mode and kernel mode management mechanism. At the same time, the dynamic data migration, mirror, snapshot and other features provided by LVM technology can provide a complete framework for the data replication system.

NBD(Network Block Device,网络块设备)通过提供client和server服务,将远程主机提供的磁盘空间在本地当作块设备使用。NBD是一个内核模块,它通过定义在内核接口,可以和linux系统中其他块设备管理器(如LVM)无缝对接。NBD (Network Block Device) uses the disk space provided by the remote host locally as a block device by providing client and server services. NBD is a kernel module, which can be seamlessly connected with other block device managers (such as LVM) in the Linux system by defining the kernel interface.

远程复制技术就是将源设备端的数据,通过远程连接复制到一个或多个目标设备端技术。该技术常用于容灾系统中,它通过利用地理上的分散性,当一个地区的数据丢失后,可以通过远端的数据快速恢复。The remote replication technology is to copy the data on the source device to one or more target devices through a remote connection. This technology is often used in disaster recovery systems. By utilizing geographical dispersion, when data in one area is lost, it can be quickly restored through remote data.

基于上述情况,本发明提出了一种优化的基于LVM的远程复制方法。Based on the above situation, the present invention proposes an optimized LVM-based remote replication method.

发明内容Contents of the invention

本发明为了弥补现有技术的缺陷,提供了一种简单高效的优化的基于LVM的远程复制方法。In order to make up for the defects of the prior art, the present invention provides a simple and efficient optimized LVM-based remote replication method.

本发明是通过如下技术方案实现的:The present invention is achieved through the following technical solutions:

一种优化的基于LVM的远程复制方法,其特征在于:基于LVM远程复制架构包括LVM I/OAnalysis模块,LVM I/O Process模块和LVM Remote Replication模块三部分;所述LVM I/O Analysis模块对上层应用的I/O请求解析进行优化,对于读请求直接访问本地数据,对于写请求则发送到本地及远程设备处理模块;所述LVM I/O Process模块对LVM中的Mirror接口进行优化,更改写请求的I/O处理流程,通过先记录日志再更新数据的方法,将数据分别发送到本地及远程设备;所述LVM Remote Replication模块对NBD模块进行更改,使之与LVM的内核结构对接,实现数据的远程发送;同时,由于NBD报文是经由TCP/IP传输的,所述LVM Remote Replication模块还对TCP/IP网络的参数也进行了优化,调整TCP/IP网络中的tcp_sack,tcp_timestamps,tcp_low_latency,tcp_westwood和tcp_bic参数,使之更有效到适用于远程复制场景。An optimized remote replication method based on LVM is characterized in that: the remote replication architecture based on LVM comprises LVM I/OAnalysis module, LVM I/O Process module and LVM Remote Replication module three parts; Described LVM I/O Analysis module is to The I/O request parsing of the upper-layer application is optimized, and the local data is directly accessed for the read request, and then sent to the local and remote device processing module for the write request; the LVM I/O Process module optimizes the Mirror interface in the LVM, and changes Write the requested I/O processing flow, by first recording the log and then updating the data, the data is sent to the local and remote devices respectively; the LVM Remote Replication module changes the NBD module so that it is docked with the kernel structure of the LVM, Realize the remote sending of data; Simultaneously, because NBD message is transmitted via TCP/IP, described LVM Remote Replication module has also been optimized to the parameter of TCP/IP network, adjusts tcp_sack in TCP/IP network, tcp_timestamps, tcp_low_latency, tcp_westwood and tcp_bic parameters to make it more effective for remote replication scenarios.

所述LVM I/O Analysis模块负责对上层应用发起的I/O请求过滤,通过改变lvm_make_request_fn()函数对I/O请求进行分类,读请求或与复制无关的请求直接交由LVM自身机制从盘中读取,写请求则调用LVM I/O Process模块的接口进行处理;所述LVM I/OProcess模块负责构建I/O的流程,同时与Remote Replication模块对接;所述LVM RemoteReplication模块负责远程复制的数据一致性定义及数据的远程传输;将I/O请求在主端经由LVM Remote Replication模块处理后,发送到远程设备端并成功提交日志写到数据盘后,更新本地的日志信息并提交给LVM I/O Process模块;当LVM I/O Process模块中的mirror收到本地及远程的返回消息后,向应用层返回写成功。The LVM I/O Analysis module is responsible for filtering the I/O requests initiated by the upper-layer application, classifying the I/O requests by changing the lvm_make_request_fn() function, and directly handing over read requests or requests that have nothing to do with copying to the slave disk of LVM's own mechanism Read in, write request then call the interface of LVM I/O Process module to process; Described LVM I/OProcess module is responsible for the flow process of constructing I/O, docks with Remote Replication module simultaneously; Described LVM RemoteReplication module is responsible for remote replication Data consistency definition and remote transmission of data; after the I/O request is processed by the LVM Remote Replication module on the master end, it is sent to the remote device end and the log is successfully submitted and written to the data disk, and the local log information is updated and submitted to LVM I/O Process module; when the mirror in the LVM I/O Process module receives the local and remote return messages, it returns the write success to the application layer.

所述LVM I/O Process模块对写请求的I/O处理流程,首先将I/O请求记录到日志信息中,然后将BIOS复制两份,一份发送到本地的数据盘,另一份发送到请求队列中,最后调用Remote Replication模块接口,利用多线程处理将数据发送到对端;当接收到本地及远程设备两个请求完成后,向上层应用返回请求处理成功。The I/O processing flow of the write request by the LVM I/O Process module first records the I/O request into the log information, and then copies the BIOS in two copies, one is sent to the local data disk, and the other is sent to the local data disk. Into the request queue, finally call the Remote Replication module interface, and use multi-threaded processing to send the data to the peer end; when the two requests from the local and remote devices are received, the request processing success is returned to the upper layer application.

所述LVM Remote Replication模块对远程复制的数据一致性定义是指采用实时同步的方式,即上层应用发出的多个写请求必须等待主端和备端的数据同时写入方可继续执行;当请求到来时,先按照请求顺序提交日志,写日志成功后再写数据盘,写数据盘时,按照顺序依次写盘,只有写日志及写数据盘同时成功提交后,才按照请求提交顺序更新日志信息,最后通知上层请求完成;The LVM Remote Replication module defines the data consistency of remote replication as adopting the method of real-time synchronization, that is, multiple write requests sent by the upper layer application must wait for the data of the master end and the backup end to be written simultaneously before continuing to execute; when the request arrives When writing logs, first submit the logs in the order of requests, and then write to the data disk after writing the logs successfully. When writing to the data disks, write to the disks in sequence. Finally, notify the upper layer that the request is complete;

所述LVM Remote Replication模块对数据的远程传输是基于NBD模块完成的,首先对主端和备端通过nbd_init函数初始化并连接,然后利用do_nbd_request函数从请求队列中读取相应的请求,使用报文结构中的handle域装载发送到备端;调用nbd_do_it循环等待并调用nbd_read_stat读取备端的写盘状态;当读写请求完成后,则从请求队列中删除请求并向上层返回成功。The remote transmission of data by the LVM Remote Replication module is based on the NBD module. First, the primary end and the standby end are initialized and connected through the nbd_init function, and then the do_nbd_request function is used to read the corresponding request from the request queue, using the message structure The handle field in is loaded and sent to the standby; call nbd_do_it to wait in a loop and call nbd_read_stat to read the write status of the standby; when the read and write request is completed, delete the request from the request queue and return success to the upper layer.

所述LVM Remote Replication模块对TCP/IP网络的参数的优化包括利用tcp_sack参数启用有选择应答模式,提升乱序报文的回复,只发送丢失的报文;利用tcp_timestamps参数启用TCP时间戳,更精确控制报文重发;关闭tcp_low_latency参数和选用tcp_westwood参数通过吞吐量评估对带宽的整体利用情况进行优化;为了快速长距离的传输启用tcp_bic参数的Binary Increase Congestion,更好利用传输网络的GB级速度。The optimization of the parameters of the TCP/IP network by the LVM Remote Replication module includes using the tcp_sack parameter to enable a selective response mode, improving the reply of out-of-order messages, and only sending lost messages; using the tcp_timestamps parameter to enable TCP timestamps, which is more accurate Control packet retransmission; turn off the tcp_low_latency parameter and select the tcp_westwood parameter to optimize the overall utilization of the bandwidth through throughput evaluation; enable the Binary Increase Congestion of the tcp_bic parameter for fast and long-distance transmission to make better use of the GB-level speed of the transmission network.

本发明的有益效果是:该优化的基于LVM的远程复制方法,可以用于云计算领域的远距离容灾系统中,不需要特殊的物理环境,只需对原有的IP网络作相应的改进,以完全软件的方法将数据远程复制到另一个远端设备,提升了数据在远程复制中的稳定性、安全性及传输效率。The beneficial effects of the present invention are: the optimized LVM-based remote replication method can be used in the remote disaster recovery system in the field of cloud computing, and does not require a special physical environment, and only needs to make corresponding improvements to the original IP network , Remotely copy data to another remote device with a complete software method, which improves the stability, security and transmission efficiency of data in remote copying.

附图说明Description of drawings

附图1为本发明基于LVM远程复制架构结构示意图。Accompanying drawing 1 is the structural diagram of the present invention based on LVM remote replication architecture.

附图2为本发明LVM I/O Process模块处理流程示意图。Accompanying drawing 2 is a schematic diagram of the processing flow of the LVM I/O Process module of the present invention.

附图3为本发明LVM Remote Replication模块IO流程优化示意图。Accompanying drawing 3 is the schematic diagram of IO flow optimization of LVM Remote Replication module of the present invention.

附图4为本发明LVM Remote Replication模块处理流程示意图。Accompanying drawing 4 is a schematic diagram of the processing flow of the LVM Remote Replication module of the present invention.

附图5为本发明LVM Remote Replication模块中NBD子模块报文结构示意图。Accompanying drawing 5 is a schematic diagram of the message structure of the NBD submodule in the LVM Remote Replication module of the present invention.

具体实施方式detailed description

为了使本发明所要解决的技术问题、技术方案及有益效果更加清楚明白,以下结合附图和实施例,对本发明进行详细的说明。应当说明的是,此处所描述的具体实施例仅用以解释本发明,并不用于限定本发明。In order to make the technical problems, technical solutions and beneficial effects to be solved by the present invention clearer, the present invention will be described in detail below in conjunction with the accompanying drawings and embodiments. It should be noted that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.

该优化的基于LVM的远程复制方法,基于LVM远程复制架构包括LVM I/O Analysis模块,LVM I/O Process模块和LVM Remote Replication模块三部分;所述LVM I/OAnalysis模块对上层应用的I/O请求解析进行优化,对于读请求直接访问本地数据,对于写请求则发送到本地及远程设备处理模块;所述LVM I/O Process模块对LVM中的Mirror接口进行优化,更改写请求的I/O处理流程,通过先记录日志再更新数据的方法,将数据分别发送到本地及远程设备;所述LVM Remote Replication模块对NBD模块进行更改,使之与LVM的内核结构对接,实现数据的远程发送;同时,由于NBD报文是经由TCP/IP传输的,所述LVMRemote Replication模块还对TCP/IP网络的参数也进行了优化,调整TCP/IP网络中的tcp_sack,tcp_timestamps,tcp_low_latency,tcp_westwood和tcp_bic参数,使之更有效到适用于远程复制场景。The remote replication method based on LVM of this optimization, comprises LVM I/O Analysis module based on LVM remote replication architecture, LVM I/O Process module and LVM Remote Replication module three parts; Described LVM I/OAnalysis module is applied to the I/O O request analysis is optimized, directly accesses local data for read request, then sends to local and remote device processing module for write request; Described LVM I/O Process module optimizes the Mirror interface in LVM, changes the I/O of write request 0 processing flow, by first recording the log and then updating the data, the data is sent to the local and remote devices respectively; the LVM Remote Replication module changes the NBD module so that it is docked with the kernel structure of the LVM, and realizes the remote sending of the data Simultaneously, because NBD message is transmitted via TCP/IP, described LVMRemote Replication module also optimizes the parameter of TCP/IP network, adjusts tcp_sack in TCP/IP network, tcp_timestamps, tcp_low_latency, tcp_westwood and tcp_bic parameter , making it more effective for remote replication scenarios.

所述LVM I/O Analysis模块负责对上层应用发起的I/O请求过滤,通过改变lvm_make_request_fn()函数对I/O请求进行分类,lvm_make_request_fn()函数的主要功能是对将Mapped Device通过地址映射到底层的Target Device,并将映射的地址返回给系统,读请求或与复制无关的请求直接交由LVM自身机制从盘中读取,写请求则调用LVM I/OProcess模块的接口进行处理;所述LVM I/O Process模块负责构建I/O的流程,同时与Remote Replication模块对接,整个LVM I/O Process模块是基于LVM的mirror特性更改实现的,mirror特性是将I/O请求分别发送到本地及复制卷中;所述LVM Remote Replication模块负责远程复制的数据一致性定义及数据的远程传输;将I/O请求在主端经由LVMRemote Replication模块处理后,发送到远程设备端并成功提交日志写到数据盘后,更新本地的日志信息并提交给LVM I/O Process模块;当LVM I/O Process模块中的mirror收到本地及远程的返回消息后,向应用层返回写成功。The LVM I/O Analysis module is responsible for filtering the I/O request initiated by the upper layer application, classifying the I/O request by changing the lvm_make_request_fn () function, and the main function of the lvm_make_request_fn () function is to map the Mapped Device to the The underlying Target Device, and returns the mapped address to the system, read requests or requests not related to copying are directly handed over to LVM’s own mechanism to read from the disk, and write requests are processed by calling the interface of the LVM I/OProcess module; The LVM I/O Process module is responsible for building the I/O process and is connected to the Remote Replication module. The entire LVM I/O Process module is implemented based on the mirror feature change of LVM. The mirror feature sends I/O requests to the local respectively. and in the replication volume; the LVM Remote Replication module is responsible for the definition of data consistency of remote replication and the remote transmission of data; after the I/O request is processed by the LVMRemote Replication module at the master end, it is sent to the remote device end and the log write is successfully submitted After arriving at the data disk, update the local log information and submit it to the LVM I/O Process module; when the mirror in the LVM I/O Process module receives the local and remote return messages, it returns the write success to the application layer.

所述LVM I/O Process模块对写请求的I/O处理流程,首先将I/O请求记录到日志信息中,然后将BIOS复制两份,一份发送到本地的数据盘,另一份发送到请求队列中,最后调用Remote Replication模块接口,利用多线程处理将数据发送到对端;当接收到本地及远程设备两个请求完成后,向上层应用返回请求处理成功。The I/O processing flow of the write request by the LVM I/O Process module first records the I/O request into the log information, and then copies the BIOS in two copies, one is sent to the local data disk, and the other is sent to the local data disk. Into the request queue, finally call the Remote Replication module interface, and use multi-threaded processing to send the data to the peer end; when the two requests from the local and remote devices are received, the request processing success is returned to the upper layer application.

请求队列是对I/O请求的缓冲。引进该机制是因为远程复制的I/O需要发送到远程设备上的传输速度与本地存储速度相差很大,为了提升整体I/O写的性能,考虑将I/O请求存放到队列中,利用多线程处理将数据发送到对端,从而优化系统整体的写请求处理。The request queue is a buffer for I/O requests. This mechanism is introduced because the transmission speed of the remote replication I/O that needs to be sent to the remote device is very different from the local storage speed. In order to improve the overall I/O writing performance, it is considered to store the I/O request in the queue and use Multi-threaded processing sends data to the peer, thereby optimizing the overall write request processing of the system.

所述LVM Remote Replication模块对远程复制的数据一致性定义是指采用实时同步的方式,即上层应用发出的多个写请求必须等待主端和备端的数据同时写入方可继续执行;当请求到来时,先按照请求顺序提交日志,写日志成功后再写数据盘,写数据盘时,按照顺序依次写盘,只有写日志及写数据盘同时成功提交后,才按照请求提交顺序更新日志信息,最后通知上层请求完成;The LVM Remote Replication module defines the data consistency of remote replication as adopting the method of real-time synchronization, that is, multiple write requests sent by the upper layer application must wait for the data of the master end and the backup end to be written simultaneously before continuing to execute; when the request arrives When writing logs, first submit the logs in the order of requests, and then write to the data disk after writing the logs successfully. When writing to the data disks, write to the disks in sequence. Finally, notify the upper layer that the request is complete;

所述LVM Remote Replication模块对数据的远程传输是基于NBD模块完成的,首先对主端和备端通过nbd_init函数初始化并连接,然后利用do_nbd_request函数从请求队列中读取相应的请求,使用报文结构中的handle域装载发送到备端;调用nbd_do_it循环等待并调用nbd_read_stat读取备端的写盘状态;当读写请求完成后,则从请求队列中删除请求并向上层返回成功。The remote transmission of data by the LVM Remote Replication module is based on the NBD module. First, the primary end and the standby end are initialized and connected through the nbd_init function, and then the do_nbd_request function is used to read the corresponding request from the request queue, using the message structure The handle field in is loaded and sent to the standby; call nbd_do_it to wait in a loop and call nbd_read_stat to read the write status of the standby; when the read and write request is completed, delete the request from the request queue and return success to the upper layer.

所述LVM Remote Replication模块对TCP/IP网络的参数的优化包括利用tcp_sack参数启用有选择应答模式,提升乱序报文的回复,只发送丢失的报文;利用tcp_timestamps参数启用TCP时间戳,更精确控制报文重发;关闭tcp_low_latency参数和选用tcp_westwood参数通过吞吐量评估对带宽的整体利用情况进行优化;为了快速长距离的传输启用tcp_bic参数的Binary Increase Congestion,更好利用传输网络的GB级速度。The optimization of the parameters of the TCP/IP network by the LVM Remote Replication module includes using the tcp_sack parameter to enable a selective response mode, improving the reply of out-of-order messages, and only sending lost messages; using the tcp_timestamps parameter to enable TCP timestamps, which is more accurate Control packet retransmission; turn off the tcp_low_latency parameter and select the tcp_westwood parameter to optimize the overall utilization of the bandwidth through throughput evaluation; enable the Binary Increase Congestion of the tcp_bic parameter for fast and long-distance transmission to make better use of the GB-level speed of the transmission network.

Claims (5)

1.一种优化的基于LVM的远程复制方法,其特征在于:基于LVM远程复制架构包括LVMI/O Analysis模块,LVM I/O Process模块和LVM Remote Replication模块三部分;所述LVM I/O Analysis模块对上层应用的I/O请求解析进行优化,对于读请求直接访问本地数据,对于写请求则发送到本地及远程设备处理模块;所述LVM I/O Process模块对LVM中的Mirror接口进行优化,更改写请求的I/O处理流程,通过先记录日志再更新数据的方法,将数据分别发送到本地及远程设备;所述LVM Remote Replication模块对NBD模块进行更改,使之与LVM的内核结构对接,实现数据的远程发送;同时,由于NBD报文是经由TCP/IP传输的,所述LVM Remote Replication模块对TCP/IP网络的参数也进行了优化,调整TCP/IP网络中的tcp_sack,tcp_timestamps,tcp_low_latency,tcp_westwood和tcp_bic参数,使之更有效到适用于远程复制场景。1. an optimized LVM-based remote replication method, characterized in that: the LVM-based remote replication architecture includes LVMI/O Analysis module, LVM I/O Process module and LVM Remote Replication module three parts; said LVM I/O Analysis The module optimizes the analysis of the I/O request of the upper layer application, directly accesses the local data for the read request, and sends the write request to the local and remote device processing module; the LVM I/O Process module optimizes the Mirror interface in the LVM , change the I/O processing flow of the write request, and send the data to the local and remote devices respectively by first recording the log and then updating the data; the LVM Remote Replication module changes the NBD module so that it is consistent with the kernel structure of the LVM docking to realize remote sending of data; at the same time, since the NBD message is transmitted via TCP/IP, the LVM Remote Replication module also optimizes the parameters of the TCP/IP network, and adjusts tcp_sack and tcp_timestamps in the TCP/IP network , tcp_low_latency, tcp_westwood and tcp_bic parameters to make it more effective for remote replication scenarios. 2.根据权利要求1所述的优化的基于LVM的远程复制方法,其特征在于:所述LVM I/OAnalysis模块负责对上层应用发起的I/O请求过滤,通过改变lvm_make_request_fn()函数对I/O请求进行分类,读请求或与复制无关的请求直接交由LVM自身机制从盘中读取,写请求则调用LVM I/O Process模块的接口进行处理;所述LVM I/O Process模块负责构建I/O的流程,同时与Remote Replication模块对接;所述LVM Remote Replication模块负责远程复制的数据一致性定义及数据的远程传输;将I/O请求在主端经由LVM RemoteReplication模块处理后,发送到远程设备端并成功提交日志写到数据盘后,更新本地的日志信息并提交给LVM I/O Process模块;当LVM I/O Process模块中的mirror收到本地及远程的返回消息后,向应用层返回写成功。2. the remote copy method based on LVM of optimization according to claim 1, is characterized in that: described LVM I/OAnalysis module is responsible for the I/O request filtering that upper layer application initiates, by changing lvm_make_request_fn () function to I/O O requests are classified, read requests or requests that have nothing to do with copying are directly handed over to LVM’s own mechanism to read from the disk, and write requests are processed by calling the interface of the LVM I/O Process module; the LVM I/O Process module is responsible for constructing The process of I/O is docked with the Remote Replication module at the same time; the LVM Remote Replication module is responsible for the data consistency definition of remote replication and the remote transmission of data; after the I/O request is processed by the LVM RemoteReplication module at the master end, it is sent to After the remote device successfully submits the log and writes it to the data disk, it updates the local log information and submits it to the LVM I/O Process module; when the mirror in the LVM I/O Process module receives the local and remote return messages, it sends a message to the application The layer returns write success. 3.根据权利要求1或2所述的优化的基于LVM的远程复制方法,其特征在于:所述LVM I/O Process模块对写请求的I/O处理流程,首先将I/O请求记录到日志信息中,然后将BIOS复制两份,一份发送到本地的数据盘,另一份发送到请求队列中,最后调用RemoteReplication模块接口,利用多线程处理将数据发送到对端;当接收到本地及远程设备两个请求完成后,向上层应用返回请求处理成功。3. the optimized LVM-based remote copy method according to claim 1 or 2, characterized in that: the LVM I/O Process module first records the I/O request to the I/O processing flow of the write request In the log information, the BIOS is copied twice, one is sent to the local data disk, the other is sent to the request queue, and finally the RemoteReplication module interface is called to send the data to the peer end by using multi-thread processing; when the local After the two requests of the remote device and the remote device are completed, the request processing success is returned to the upper layer application. 4.根据权利要求2所述的优化的基于LVM的远程复制方法,其特征在于:所述LVMRemote Replication模块对远程复制的数据一致性定义是指采用实时同步的方式,即上层应用发出的多个写请求必须等待主端和备端的数据同时写入方可继续执行;当请求到来时,先按照请求顺序提交日志,写日志成功后再写数据盘,写数据盘时,按照顺序依次写盘,只有写日志及写数据盘同时成功提交后,才按照请求提交顺序更新日志信息,最后通知上层请求完成;4. the LVM-based remote replication method of optimization according to claim 2 is characterized in that: the data consistency definition of the remote replication by the LVMRemote Replication module refers to the mode of adopting real-time synchronization, that is, multiple The write request must wait for the data on the primary end and the standby end to be written at the same time before continuing to execute; when the request arrives, the log is first submitted in the order of the request, and the data disk is written after the log is successfully written. When the data disk is written, the disk is written in sequence. Only after writing the log and writing the data disk are successfully submitted at the same time, the log information is updated in the order of request submission, and finally the upper layer is notified that the request is completed; 所述LVM Remote Replication模块对数据的远程传输是基于NBD模块完成的,首先对主端和备端通过nbd_init函数初始化并连接,然后利用do_nbd_request函数从请求队列中读取相应的请求,使用报文结构中的handle域装载发送到备端;调用nbd_do_it循环等待并调用nbd_read_stat读取备端的写盘状态;当读写请求完成后,则从请求队列中删除请求并向上层返回成功。The remote transmission of data by the LVM Remote Replication module is based on the NBD module. First, the primary end and the standby end are initialized and connected through the nbd_init function, and then the do_nbd_request function is used to read the corresponding request from the request queue, using the message structure The handle field in is loaded and sent to the standby; call nbd_do_it to wait in a loop and call nbd_read_stat to read the write status of the standby; when the read and write request is completed, delete the request from the request queue and return success to the upper layer. 5.根据权利要求1所述的优化的基于LVM的远程复制方法,其特征在于:所述LVMRemote Replication模块对TCP/IP网络的参数的优化包括利用tcp_sack参数启用有选择应答模式,提升乱序报文的回复,只发送丢失的报文;利用tcp_timestamps参数启用TCP时间戳,更精确控制报文重发;关闭tcp_low_latency参数和选用tcp_westwood参数通过吞吐量评估对带宽的整体利用情况进行优化;为了快速长距离的传输启用tcp_bic参数的Binary Increase Congestion,更好利用传输网络的GB级速度。5. the LVM-based remote replication method of optimization according to claim 1 is characterized in that: the optimization of the parameters of the TCP/IP network by the LVMRemote Replication module includes utilizing the tcp_sack parameter to enable a selective response mode, and improving out-of-sequence reporting Reply to text, only send lost packets; use tcp_timestamps parameter to enable TCP timestamp to control packet retransmission more precisely; disable tcp_low_latency parameter and select tcp_westwood parameter to optimize the overall utilization of bandwidth through throughput evaluation; The distance transmission enables the Binary Increase Congestion of the tcp_bic parameter to make better use of the GB-level speed of the transmission network.
CN201610913666.5A 2016-10-20 2016-10-20 Optimized LVM-based remote copying method Pending CN106502828A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610913666.5A CN106502828A (en) 2016-10-20 2016-10-20 Optimized LVM-based remote copying method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610913666.5A CN106502828A (en) 2016-10-20 2016-10-20 Optimized LVM-based remote copying method

Publications (1)

Publication Number Publication Date
CN106502828A true CN106502828A (en) 2017-03-15

Family

ID=58318057

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610913666.5A Pending CN106502828A (en) 2016-10-20 2016-10-20 Optimized LVM-based remote copying method

Country Status (1)

Country Link
CN (1) CN106502828A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109002254A (en) * 2017-06-07 2018-12-14 华为技术有限公司 Storage processing method, device and relevant device
CN109284202A (en) * 2017-07-19 2019-01-29 爱思开海力士有限公司 Controller and how to operate it

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070288711A1 (en) * 2006-06-08 2007-12-13 Inventec Corporation Snapshot copy management method used for logic volume manager
US20080010421A1 (en) * 2006-07-10 2008-01-10 Inventec Corporation Snapshot expansion system and method thereof
US20090083503A1 (en) * 2007-09-20 2009-03-26 Inventec Corporation System of creating logical volume and method thereof
US8874746B1 (en) * 2010-05-24 2014-10-28 Datacore Software Corporation Collaboration between discrete systems and a shared system to consolidate shared storage-related services

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070288711A1 (en) * 2006-06-08 2007-12-13 Inventec Corporation Snapshot copy management method used for logic volume manager
US20080010421A1 (en) * 2006-07-10 2008-01-10 Inventec Corporation Snapshot expansion system and method thereof
US20090083503A1 (en) * 2007-09-20 2009-03-26 Inventec Corporation System of creating logical volume and method thereof
US8874746B1 (en) * 2010-05-24 2014-10-28 Datacore Software Corporation Collaboration between discrete systems and a shared system to consolidate shared storage-related services

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
葛广贺: "基于LVM2和NBD的远程复制系统设计与性能优化", 《万方数据库》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109002254A (en) * 2017-06-07 2018-12-14 华为技术有限公司 Storage processing method, device and relevant device
CN109284202A (en) * 2017-07-19 2019-01-29 爱思开海力士有限公司 Controller and how to operate it

Similar Documents

Publication Publication Date Title
CN112789588B (en) Cutover engine based on synchronous replication
CN112236753B (en) Faster replay of metadata and data operations using dependency graph based on inode numbering
JP7171757B2 (en) Distributed replicas for block storage systems
US12235808B2 (en) Replicating and migrating files to secondary storage sites
CN108604164B (en) Synchronous replication for storage area network protocol storage
US9244997B1 (en) Asymmetric active-active access of asynchronously-protected data storage
US8689047B2 (en) Virtual disk replication using log files
US10496487B1 (en) Storing snapshot changes with snapshots
CN107402722B (en) A data migration method and storage device
US10152246B1 (en) Application aware AMQP durable messages backup and restore
CN108604163B (en) Synchronous replication for File Access Protocol storage
CN103793291B (en) Distributed data copying method and device
US9992118B2 (en) System and method for optimizing transportation over networks
AU2012355673A1 (en) Application consistent snapshots of a shared volume
US12105983B2 (en) Resilient implementation of client file operations and replication
WO2014186940A1 (en) Hard disk and data processing method
US10872036B1 (en) Methods for facilitating efficient storage operations using host-managed solid-state disks and devices thereof
JP2017526066A (en) Combined storage operations
CN106502828A (en) Optimized LVM-based remote copying method
CN1241122C (en) Memory controlling device and operating method thereof
US11038960B1 (en) Stream-based shared storage system
US20220405220A1 (en) Interconnect layer send queue reservation system
US11537312B2 (en) Maintaining replication consistency during distribution instance changes
US11238010B2 (en) Sand timer algorithm for tracking in-flight data storage requests for data replication
US20200319915A1 (en) Disaggregated rack mount storage side transaction support

Legal Events

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20170315