CN113467717B - Dual-machine volume mirror image management method, device and equipment and readable storage medium - Google Patents

Dual-machine volume mirror image management method, device and equipment and readable storage medium Download PDF

Info

Publication number
CN113467717B
CN113467717B CN202110706031.9A CN202110706031A CN113467717B CN 113467717 B CN113467717 B CN 113467717B CN 202110706031 A CN202110706031 A CN 202110706031A CN 113467717 B CN113467717 B CN 113467717B
Authority
CN
China
Prior art keywords
copy
mirror
equipment
mirror image
volume
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
Application number
CN202110706031.9A
Other languages
Chinese (zh)
Other versions
CN113467717A (en
Inventor
李奋翔
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspur Jinan data Technology Co ltd
Original Assignee
Inspur Jinan data Technology 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 Jinan data Technology Co ltd filed Critical Inspur Jinan data Technology Co ltd
Priority to CN202110706031.9A priority Critical patent/CN113467717B/en
Publication of CN113467717A publication Critical patent/CN113467717A/en
Application granted granted Critical
Publication of CN113467717B publication Critical patent/CN113467717B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0662Virtualisation aspects
    • G06F3/0665Virtualisation aspects at area level, e.g. provisioning of virtual or logical volumes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0614Improving the reliability of storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/065Replication mechanisms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]

Landscapes

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

Abstract

The invention discloses a dual-machine volume mirror image management method, which moves the management of an original host side to a storage equipment side for execution, directly establishes an authentication relation and a mirror image link between equipment at the local end and remote equipment, and performs mirror image copy volume mirror image data synchronization between the two storage equipment. The invention also discloses a double-machine volume mirror image management device, equipment and a readable storage medium, which have corresponding technical effects.

Description

Dual-machine volume mirror image management method, device and equipment and readable storage medium
Technical Field
The present invention relates to the field of storage technologies, and in particular, to a method, an apparatus, a device, and a readable storage medium for managing dual volumes.
Background
The storage network provides a basic hardware resource for mass storage and data sharing of data, and is a foundation stone for IT infrastructure construction. Meanwhile, the explosive growth of data puts higher demands on storage technology, and data loss and damage can have great influence on enterprise business, so that data protection strategies and disaster recovery backup technologies are particularly important.
Volume mirroring provides a mirrored volume for a local or external volume, which is a dynamic volume with fault tolerance capability, by using two copies or mirrors of the volume to replicate data stored on the volume to provide data redundancy. All data written on the mirror volume are written into two mirror copies on independent physical disks, and if any copy of the mirror volume fails, the host can still normally access the mirror volume without any influence on the host-side service. Meanwhile, after the fault copy is recovered from the fault, the mirror volume automatically synchronizes the data of the fault copy, and finally, the data of the two copies are consistent, continuous data protection is continuously provided for the mirror volume, and disaster recovery risk and operation and maintenance cost are reduced.
In order to realize the dual-machine Volume mirroring function, the host system needs to be logged in, first, a first mirror copy and a second mirror copy PV (Physical Volume) to be mirrored are formed by LVM commands, then the first mirror copy and the second mirror copy are built into the same VG (Volume Group), finally, related operations of creating a Volume mirror are executed, the first mirror copy and the second mirror copy form a mirror Volume, management, fault processing and data recovery of the Volume mirror are also realized based on LVM related commands, and data are written into multiple copies of the mirror Volume in real time, thereby ensuring continuity of service and reliability of data. The technology depends on the configuration of a host system, and the management mode is complex; in addition, when managing volume mirroring, processing storage faults and recovering data, a large number of LVM related commands need to be executed, so that the method has higher technical requirements on technicians, and has the defects of single function, complex management, difficult maintenance and the like.
In summary, how to simplify the dual-machine volume image management and reduce the difficulty of use is a technical problem that needs to be solved by those skilled in the art.
Disclosure of Invention
The invention aims to provide a method, a device and equipment for managing double-machine volume mirror images and a readable storage medium, which can simplify double-machine volume mirror image management and reduce the use difficulty.
In order to solve the technical problems, the invention provides the following technical scheme:
a dual-volume mirror management method includes:
establishing a device authentication relationship between the local device and the remote device;
establishing a mirror image link between the local end equipment and the remote end equipment;
establishing a volume mirror relationship between the first mirror copy and the second mirror copy; the first mirror image copy is stored in the local end device, and the second mirror image copy is stored in the remote end device;
determining the read-write priority of the first mirror image copy and the second mirror image copy, taking the copy with high priority as the first copy, and taking the copy with low priority as the second copy;
and if the I/O request is received, calling the first copy to respond to the I/O request, and synchronously writing copy change data corresponding to the I/O request into the second copy.
Optionally, before the establishing the volume mirroring relationship between the first mirrored copy and the second mirrored copy, the method further includes:
judging whether the capacities of the first mirror image copy and the second mirror image copy are consistent;
and if so, executing the step of establishing the volume mirror relationship between the first mirror copy and the second mirror copy.
Optionally, before the establishing the device authentication relationship between the local device and the remote device, the method further includes:
receiving a remote device addition request;
determining equipment information of equipment to be added; wherein the device information includes: authentication name, IP, and login information;
and determining the remote equipment according to the equipment information.
Optionally, the establishing the device authentication relationship between the local device and the remote device includes:
determining user information and port information of the remote equipment;
and adding the user information and the port information to the local equipment as remote equipment information.
Optionally, the establishing a mirror link between the local device and the remote device includes:
determining port information and IP of the local end equipment and the remote end equipment;
determining whether the local end equipment and the remote end equipment are positioned in the same network segment according to the IP;
if so, generating a data exchange link between the local terminal equipment and the remote terminal equipment according to the port information, and taking the data exchange link as the mirror image link.
Optionally, after the high-priority copy is taken as the first copy and the low-priority copy is taken as the second copy, the method further includes:
if a volume image deleting instruction is received, the volume image relationship between the first image copy and the second image copy is relieved;
reducing the read-write priority of the first copy to the read-write priority corresponding to the second copy;
and deleting virtual block equipment, a data management metadata volume, a configuration file and a database record which describe the first mirror copy and the second mirror copy.
Optionally, the dual-volume mirror management method further includes:
if a copy priority exchanging instruction is received, exchanging the read-write priorities of the first mirror copy and the second mirror copy;
and updating the read-write priorities of the first mirror copy and the second mirror copy to the metadata volume.
A dual volume image management device comprising:
the authentication establishing unit is used for establishing an equipment authentication relationship between the local equipment and the remote equipment;
the link construction unit is used for constructing a mirror image link between the local terminal equipment and the remote terminal equipment;
the volume image establishing unit is used for establishing a volume image relationship between the first image copy and the second image copy; the first mirror image copy is stored in the local end device, and the second mirror image copy is stored in the remote end device;
the priority determining unit is used for determining the read-write priority of the first mirror image copy and the second mirror image copy, taking the copy with high priority as the first copy and the copy with low priority as the second copy;
and the request synchronous response unit is used for calling the first copy to respond to the I/O request if the I/O request is received, and synchronously writing copy change data corresponding to the I/O request into the second copy.
A computer device, comprising:
a memory for storing a computer program;
and the processor is used for realizing the steps of the double-machine volume mirror image management method when executing the computer program.
A readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the dual volume image management method described above.
The method provided by the embodiment of the invention moves the management of the original host side to the storage equipment side for execution, directly establishes the authentication relation and the mirror link between the equipment at the local end and the remote equipment, and synchronizes the volume mirror data of the mirror copy between the two storage equipment.
Correspondingly, the embodiment of the invention also provides a dual-machine volume image management device, equipment and a readable storage medium corresponding to the dual-machine volume image management method, which have the technical effects and are not repeated herein.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the related art, the drawings that are required to be used in the embodiments or the related technical descriptions will be briefly described, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to the drawings without inventive effort for those skilled in the art.
FIG. 1 is a flowchart of a dual-volume image management method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram illustrating a dual-volume mirror management device according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
Detailed Description
The core of the invention is to provide a double-machine volume mirror image management method which can simplify double-machine volume mirror image management and reduce the use difficulty.
In order to better understand the aspects of the present invention, the present invention will be described in further detail with reference to the accompanying drawings and detailed description. It will be apparent that the described embodiments are only some, but not all, embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1, fig. 1 is a flowchart of a dual-volume mirror management method according to an embodiment of the invention, the method includes the following steps:
s101, establishing a device authentication relationship between local end devices and remote end devices;
the local end device is the execution device of the dual-machine volume mirror image management method provided by the embodiment, and the remote end device is the device which is in remote mirror image synchronization with the local end device.
The method comprises the steps of determining local equipment and remote equipment, establishing equipment authentication relation between the local equipment and the remote equipment, and performing equipment management on the remote equipment at the local equipment after equipment authentication is established, wherein the equipment management comprises deletion of the remote equipment, equipment information checking and the like, so that mirror image management based on the equipment end is realized. In the application, the original host side management of the volume mirror image is moved to the storage equipment end for execution, so that the problem of complex host side management can be avoided. The process of establishing the device authentication relationship is not limited in this embodiment, and may refer to implementation of the related art. Optionally, the process of establishing the device authentication relationship between the local device and the remote device may specifically include the following steps:
(1) Determining user information and port information of the remote equipment;
(2) User information and port information are added to the local device as remote device information.
In the above manner, establishing the device authentication relationship between the local device and the remote device includes: the method can simply and efficiently realize the authentication between the devices by adding the user information and the port information of the remote device to the local device. In addition, in response to receiving the instruction for deleting the device authentication relationship, it may be further configured to delete the remote device user information and the port information in the local device, and delete the remote device user information and the port information in the local device, so as to facilitate establishment and release of the device authentication relationship, and facilitate management of the device authentication relationship.
In addition, the determination manner of the remote device in this embodiment is not limited, and for convenience of management, before the device authentication relationship between the local device and the remote device is established, the adding process of the user to the remote device may be responded, which is specifically as follows:
(1) Receiving a remote device addition request;
(2) Determining equipment information of equipment to be added;
wherein the device information includes: authentication name, IP, and login information;
(3) And determining the remote device according to the device information.
When adding the remote equipment, obtaining the information of the remote equipment to be added, and inputting the name of equipment authentication, the IP of the remote equipment and login information (such as a user name and a password) of the login remote equipment, and determining the remote equipment to be subjected to mirror image synchronous management according to the information. The user adding mode of the remote equipment can facilitate the management of the user on the double-machine volume mirror image, and in addition, in order to ensure the consistency of the local first mirror image copy and the remote second mirror image copy data, the management interface can check the information of the remote equipment, including the equipment authentication name, the remote equipment IP, the remote equipment state information and the like, so as to realize the addition and the deletion of the remote equipment.
S102, setting up a mirror image link between local equipment and remote equipment;
and establishing a mirror image link between the local equipment and the remote equipment so as to realize data synchronization between the local equipment and the remote equipment. The process of establishing the mirror link is not limited in this embodiment, and may be implemented, for example, according to the following steps:
(1) Determining port information and IP of the local equipment and the remote equipment;
(2) Determining whether the local equipment and the remote equipment are positioned in the same network segment according to the IP;
(3) If so, generating a data exchange link between the local equipment and the remote equipment according to the port information to serve as a mirror image link.
In the above manner, establishing the mirror link between the local device and the remote device includes: when the mirror image link is created, the port and IP information of the local end equipment are required to be input, the port and IP information of the remote end equipment are required to be input, the two end IPs are positioned in the same network segment, and then the data exchange link from the local end equipment to the remote end equipment is formed and used as the mirror image link. The mode can ensure that the equipment is in the same network segment, thereby ensuring the normal data interaction between the equipment. If the links are not in the same network segment, the method is not limited in this embodiment, and a prompt message of link establishment failure can be generated.
Further, in addition to the establishment of the link, the management of the mirror link may further include other aspects, such as the removal of the link and the checking of the link status, so as to ensure the availability of the data exchange link, for example, the removal of the link may remove the data exchange link from the local device to the remote device in response to receiving the instruction for deleting the mirror link, and delete the IP of the same network segment between the local device and the remote device.
S103, establishing a volume mirror relationship between the first mirror copy and the second mirror copy;
the first mirror image copy is stored in the local device, the second mirror image copy is stored in the remote device, and the local device establishes mirror synchronization with the second mirror image copy in the remote device through the first mirror image copy.
The method for establishing the volume mirror relationship between the two mirror copies can refer to implementation in the related technology, for example, the creation of the dual-machine volume mirror relationship can be performed after mirror information such as a local device storage pool, a first mirror copy, device authentication, a remote device storage pool, a second mirror copy, a mirror link, a mirror copy priority role and the like is determined.
For enhanced understanding, a method for establishing a volume mirror relationship is described herein, including the steps of: determining a storage pool of the local terminal equipment, a first mirror image copy in the local terminal equipment, equipment authentication relation data between the local terminal equipment and the remote terminal equipment, a storage pool of the remote terminal equipment, a second mirror image copy in the remote terminal equipment, a mirror image link and a mirror image copy priority role, calling an interface for creating a volume mirror image, wherein interface information comprises a command for creating the volume mirror image and parameter information of the remote terminal equipment, and writing the information into a configuration file after the information is received by the rear terminal; judging whether the first mirror image copy capacity is consistent with the second mirror image copy capacity, if not, throwing out an abnormality, and deleting the generated configuration file; the equipment to which the second mirror image copy belongs calls an interface for creating the volume mirror image, and information is written into a configuration file; the local end and the remote end device create metadata volumes according to the configuration files, establish mirror image relations, successfully create double-machine volume mirror image relations of the local end device and the remote end device, and write the double-machine volume mirror image relations into a database. In addition, the management information of the double-machine volume mirror image can be checked, wherein the management information comprises a local end first mirror image copy name, a local storage pool, second mirror image copy information, equipment authentication, a mirror image link, a connection state, a health state and synchronous progress information.
S104, determining read-write priorities of the first mirror image copy and the second mirror image copy, taking the copy with high priority as the first copy, and taking the copy with low priority as the second copy;
and determining the read-write priority of the first mirror image copy and the second mirror image copy, wherein the copy with the high priority is used as a main response copy, the copy with the low priority is used as a standby response copy, and the data synchronization is performed with the main response copy. The read-write priorities of the first mirror image copy and the second mirror image copy can be set correspondingly according to actual use requirements, in this embodiment, the read-write priorities of the two copies are not limited, in order to distinguish the two copies conveniently, a copy with a high priority in the first mirror image copy and the second mirror image copy is used as the first copy, and a copy with a low priority is used as the second copy.
S105, if the I/O request is received, the first copy is called to respond to the I/O request, and copy change data corresponding to the I/O request is synchronously written into the second copy.
And responding to the priority roles of the first copy and the second copy, starting initial data synchronization of the first copy and the second copy, calling the first copy to respond to the I/O request if the I/O request is received, and writing the changed data into the second copy to realize data synchronization between the second copy and the first copy.
It should be noted that, the change data may be determined in real time and updated to the second copy, or may be determined at intervals of a preset time, which is not limited in this embodiment.
For enhanced understanding, a simultaneous write process for I/O request change data is presented herein, comprising: and responding to the command of the first mirror image copy receiving the host side I/O request, the local terminal equipment writes the I/O requested to be written into the first mirror image copy, and forwards the I/O requested to be written into the second mirror image copy of the remote terminal equipment, after the second mirror image copy is successfully written, the writing success information is returned to the first mirror image copy, and after the first mirror image copy is completely written, the writing success information is returned to the host side, so that the mirror image of the data is completed. The host side issues an I/O request to the mapped first mirror image copy, after the first mirror image copy receives the I/O request, the device to which the first mirror image copy belongs forwards the I/O to the device to which the second mirror image copy belongs through a mirror image link, after the second mirror image copy is successfully written, the writing success information is returned to the first mirror image copy, after the first mirror image copy is written, the writing success information is returned to the host side, so that the mirror image of the data is completed, the complete consistency of the data is ensured, and the metadata information is synchronized.
Based on the description, the technical scheme provided by the embodiment of the invention moves the management of the original host side to the storage equipment side for execution, directly establishes the authentication relationship and the mirror link between the local equipment and the remote equipment, and performs the volume mirror data synchronization of the mirror copy between the two storage equipment.
It should be noted that, based on the above embodiments, the embodiments of the present invention further provide corresponding improvements. The preferred/improved embodiments relate to the same steps as those in the above embodiments or the steps corresponding to the steps may be referred to each other, and the corresponding advantages may also be referred to each other, so that detailed descriptions of the preferred/improved embodiments are omitted herein.
On the basis of the embodiment, in order to ensure normal writing of data after the read-write priority conversion of the two mirror copies, before establishing a volume mirror relationship between the first mirror copy and the second mirror copy, it may be further determined whether the capacities of the first mirror copy and the second mirror copy are consistent; and if so, executing the step of establishing the volume mirror relationship between the first mirror copy and the second mirror copy. If the capacity is inconsistent, the subsequent steps are not executed, corresponding capacity inconsistency prompt information can be output, the abnormality is thrown out, and the generated configuration file is deleted, which is not limited in the embodiment.
Further, in addition to the above-mentioned volume image management manner, in order to facilitate replacement and deletion of the volume image, and meet the user requirement of transferring the second image copy to the other image copies, in the above-mentioned embodiment, after taking the copy with high priority as the first copy and the copy with low priority as the second copy, the following steps may be further executed:
(1) If a volume image deleting instruction is received, the volume image relationship between the first image copy and the second image copy is relieved;
(2) Reducing the read-write priority of the first copy to the read-write priority corresponding to the second copy;
(3) And deleting the virtual block device, the data management metadata volume, the configuration file and the database record which describe the first mirror copy and the second mirror copy.
The user selects a volume mirror image deleting function at a management interface, and the management interface issues a deleting command to the background; the background releases the double-machine-volume mirror function; the first mirror image copy is reduced to a second mirror image copy, and the connection relation between the first mirror image copy and the second mirror image copy is disconnected; and deleting virtual block equipment describing the first mirror image copy and the second mirror image copy, deleting the data management metadata volume, deleting the configuration file, and deleting the database record.
The above steps may be implemented to remove a volume image relationship between the first image copy and the second image copy in response to receiving an instruction to delete the volume image.
In addition, in addition to the above-mentioned volume image management manner, in order to facilitate switching of the data copies in response to the I/O request, to implement data management conversion between two synchronized image copies, the following steps may be further executed:
(1) If a copy priority exchanging instruction is received, exchanging the read-write priorities of the first mirror copy and the second mirror copy;
(2) And updating the read-write priorities of the first mirror copy and the second mirror copy to the metadata volume.
And when the user selects the priority switching function on the management interface, the background responds to an instruction for exchanging the priorities of the first mirror image copy and the second mirror image copy, invokes the priority switching interface, firstly determines parameters of volume upgrading and downgrade issued by the storage receiving interface, namely the read-write priority before the conversion of the two mirror image copies, and the execution command converts the read-write priority of the first mirror image copy into the level of the second mirror image copy, and converts the read-write priority of the second mirror image copy into the level of the original first mirror image copy, and writes priority role information into the metadata volume.
The steps can ensure the quick switching of the two mirror copies when the first copy is abnormal, and ensure the continuous normal response of the I/O request.
In addition, in order to facilitate cancellation of the mirror link between the first mirror copy and the second mirror copy, in some embodiments of the present invention, the following steps may be further performed: responding to the received instruction of disconnecting the first mirror image copy from the second mirror image copy, selecting the first mirror image copy to be disconnected from the second mirror image copy by the management interface, and calling the first mirror image copy to be disconnected from the second mirror image copy; and the back end stores and receives a command for disconnecting the first mirror image copy from the second mirror image copy, executes the command for disconnecting the first mirror image copy from the second mirror image copy, releases the mirror image relationship between the first mirror image copy and the second mirror image copy, and writes the state information into the metadata volume. The above steps may disconnect the first mirrored copy from the second mirrored copy.
In addition, in order to respond to the service requirement, in some embodiments of the present invention, in the technology of the foregoing embodiments, the splitting process script may be further executed in response to receiving the splitting process instruction when the splitting occurs, so as to solve the splitting problem. Specifically, when a splitting problem occurs, an interface for executing splitting processing by the first mirror image copy and the second mirror image copy is called; and the back end stores and receives an executing splitting processing instruction issued by the interface, calls a splitting processing script, restores the dual-machine mirror volume to a normal state, and writes state information into the metadata volume. The steps can realize the splitting processing of the mirror image copy, and the mirror image splitting requirement of a user is met.
Corresponding to the above method embodiment, the embodiment of the present invention further provides a dual-volume image management device, where the dual-volume image management device described below and the dual-volume image management method described above may be referred to correspondingly.
Referring to fig. 2, the apparatus includes the following modules:
the authentication establishment unit 110 is mainly used for establishing an equipment authentication relationship between the local equipment and the remote equipment;
the link construction unit 120 is mainly used for constructing a mirror image link between the local end device and the remote end device;
the volume image establishing unit 130 is mainly configured to establish a volume image relationship between the first image copy and the second image copy; the first mirror image copy is stored in the local terminal device, and the second mirror image copy is stored in the remote terminal device;
the priority determining unit 140 is mainly configured to determine read-write priorities of the first mirror copy and the second mirror copy, take a copy with a high priority as the first copy, and take a copy with a low priority as the second copy;
the request synchronization response unit 150 is mainly configured to invoke the first copy to respond to the I/O request if the I/O request is received, and synchronously write copy change data corresponding to the I/O request to the second copy.
Corresponding to the above method embodiment, the embodiment of the present invention further provides a computer device, where a computer device described below and a dual-volume mirror management method described above may be referred to correspondingly.
The computer device includes:
a memory for storing a computer program;
and the processor is used for realizing the steps of the double-machine volume mirror image management method of the embodiment of the method when executing the computer program.
Specifically, referring to fig. 3, a schematic diagram of a specific structure of a computer device according to the present embodiment, where the computer device may have a relatively large difference due to different configurations or performances, may include one or more processors (central processing units, CPU) 322 (e.g., one or more processors) and a memory 332, where the memory 332 stores one or more computer applications 342 or data 344. Wherein the memory 332 may be transient storage or persistent storage. The program stored in memory 332 may include one or more modules (not shown), each of which may include a series of instruction operations in the data processing apparatus. Still further, the central processor 322 may be configured to communicate with the memory 332 and execute a series of instruction operations in the memory 332 on the computer device 301.
The computer device 301 may also include one or more power supplies 326, one or more wired or wireless network interfaces 350, one or more input/output interfaces 358, and/or one or more operating systems 341.
The steps in the dual volume image management method described above may be implemented by the structure of the computer device.
Corresponding to the above method embodiments, the embodiments of the present invention further provide a readable storage medium, where a readable storage medium described below and a dual-machine volume image management method described above may be referred to correspondingly.
A readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the dual-volume image management method of the above method embodiments.
The readable storage medium may be a usb disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, and the like.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative elements and steps are described above generally in terms of functionality in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Those skilled in the art may implement the described functionality using different approaches for each particular application, but such implementation is not intended to be limiting.

Claims (9)

1. The double-machine volume mirror image management method is characterized by comprising the following steps of:
establishing a device authentication relationship between the local device and the remote device;
establishing a mirror image link between the local end equipment and the remote end equipment;
establishing a volume mirror relationship between the first mirror copy and the second mirror copy; the first mirror image copy is stored in the local end device, and the second mirror image copy is stored in the remote end device;
determining the read-write priority of the first mirror image copy and the second mirror image copy, taking the copy with high priority as the first copy, and taking the copy with low priority as the second copy;
if an I/O request is received, calling the first copy to respond to the I/O request, and synchronously writing copy change data corresponding to the I/O request into the second copy;
wherein said establishing a mirror link between said home device and said remote device comprises:
determining port information and IP of the local end equipment and the remote end equipment;
determining whether the local end equipment and the remote end equipment are positioned in the same network segment according to the IP;
if so, generating a data exchange link between the local terminal equipment and the remote terminal equipment according to the port information, and taking the data exchange link as the mirror image link.
2. The dual machine volume image management method of claim 1, further comprising, prior to said establishing a volume image relationship between said first image copy and said second image copy:
judging whether the capacities of the first mirror image copy and the second mirror image copy are consistent;
and if so, executing the step of establishing the volume mirror relationship between the first mirror copy and the second mirror copy.
3. The dual volume image management method of claim 1, further comprising, prior to said establishing a device authentication relationship between the home device and the remote device:
receiving a remote device addition request;
determining equipment information of equipment to be added; wherein the device information includes: authentication name, IP, and login information;
and determining the remote equipment according to the equipment information.
4. The dual-volume image management method of claim 1, wherein the establishing a device authentication relationship between the local device and the remote device comprises:
determining user information and port information of the remote equipment;
and adding the user information and the port information to the local equipment as remote equipment information.
5. The dual volume image management method of claim 1, further comprising, after said taking the high priority copy as the first copy and the low priority copy as the second copy:
if a volume image deleting instruction is received, the volume image relationship between the first image copy and the second image copy is relieved;
reducing the read-write priority of the first copy to the read-write priority corresponding to the second copy;
and deleting virtual block equipment, a data management metadata volume, a configuration file and a database record which describe the first mirror copy and the second mirror copy.
6. The dual volume image management method of claim 1, further comprising:
if a copy priority exchanging instruction is received, exchanging the read-write priorities of the first mirror copy and the second mirror copy;
and updating the read-write priorities of the first mirror copy and the second mirror copy to the metadata volume.
7. A dual volume image management device, comprising:
the authentication establishing unit is used for establishing an equipment authentication relationship between the local equipment and the remote equipment;
the link construction unit is used for constructing a mirror image link between the local terminal equipment and the remote terminal equipment;
the volume mirror image establishing unit is used for establishing a volume mirror image relationship between the first mirror image copy and the second mirror image copy; the first mirror image copy is stored in the local end device, and the second mirror image copy is stored in the remote end device;
the priority determining unit is used for determining the read-write priority of the first mirror image copy and the second mirror image copy, taking the copy with high priority as the first copy and the copy with low priority as the second copy;
the request synchronous response unit is used for calling the first copy to respond to the I/O request if the I/O request is received, and synchronously writing copy change data corresponding to the I/O request into the second copy;
the link construction unit is specifically configured to: determining port information and IP of the local end equipment and the remote end equipment; determining whether the local end equipment and the remote end equipment are positioned in the same network segment according to the IP; if so, generating a data exchange link between the local terminal equipment and the remote terminal equipment according to the port information, and taking the data exchange link as the mirror image link.
8. A computer device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the dual volume image management method according to any one of claims 1 to 6 when executing the computer program.
9. A readable storage medium, wherein a computer program is stored on the readable storage medium, which when executed by a processor, implements the steps of the dual volume image management method according to any one of claims 1 to 6.
CN202110706031.9A 2021-06-24 2021-06-24 Dual-machine volume mirror image management method, device and equipment and readable storage medium Active CN113467717B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110706031.9A CN113467717B (en) 2021-06-24 2021-06-24 Dual-machine volume mirror image management method, device and equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110706031.9A CN113467717B (en) 2021-06-24 2021-06-24 Dual-machine volume mirror image management method, device and equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN113467717A CN113467717A (en) 2021-10-01
CN113467717B true CN113467717B (en) 2024-02-13

Family

ID=77872704

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110706031.9A Active CN113467717B (en) 2021-06-24 2021-06-24 Dual-machine volume mirror image management method, device and equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN113467717B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7263590B1 (en) * 2003-04-23 2007-08-28 Emc Corporation Method and apparatus for migrating data in a computer system
CN102761615A (en) * 2012-06-29 2012-10-31 浪潮(北京)电子信息产业有限公司 Method and device for realizing data synchronism of long-distance duplication system
CN108845825A (en) * 2018-06-25 2018-11-20 郑州云海信息技术有限公司 A kind of storage system configuration method, apparatus, equipment and readable storage medium storing program for executing
CN110647423A (en) * 2019-08-15 2020-01-03 苏州浪潮智能科技有限公司 Method, device and readable medium for creating storage volume mirror image based on application
CN110780816A (en) * 2019-10-17 2020-02-11 苏州浪潮智能科技有限公司 Data synchronization method, device and medium
CN112835539A (en) * 2021-03-31 2021-05-25 中国工商银行股份有限公司 Machine room moving method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7263590B1 (en) * 2003-04-23 2007-08-28 Emc Corporation Method and apparatus for migrating data in a computer system
CN102761615A (en) * 2012-06-29 2012-10-31 浪潮(北京)电子信息产业有限公司 Method and device for realizing data synchronism of long-distance duplication system
CN108845825A (en) * 2018-06-25 2018-11-20 郑州云海信息技术有限公司 A kind of storage system configuration method, apparatus, equipment and readable storage medium storing program for executing
CN110647423A (en) * 2019-08-15 2020-01-03 苏州浪潮智能科技有限公司 Method, device and readable medium for creating storage volume mirror image based on application
CN110780816A (en) * 2019-10-17 2020-02-11 苏州浪潮智能科技有限公司 Data synchronization method, device and medium
CN112835539A (en) * 2021-03-31 2021-05-25 中国工商银行股份有限公司 Machine room moving method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于铁路主数据中心云化基础设施的灾备关键技术研究;王景艳;刘洋;;铁路计算机应用(07);全文 *

Also Published As

Publication number Publication date
CN113467717A (en) 2021-10-01

Similar Documents

Publication Publication Date Title
EP3694148A1 (en) Configuration modification method for storage cluster, storage cluster and computer system
CN103226502B (en) A kind of data calamity is for control system and data reconstruction method
KR101547719B1 (en) Maintaining data integrity in data servers across data centers
CN102891849B (en) Service data synchronization method, data recovery method, data recovery device and network device
CN106776121B (en) Data disaster recovery device, system and method
CN108958984B (en) Double-active synchronous online hot standby method based on CEPH
EP1569120A1 (en) Computer system for recovering data based on priority of the data
CN106339278A (en) Data backup and recovery method of network file system
US8255649B2 (en) Remote copy control method and system in storage cluster environment
CN111327467A (en) Server system, disaster recovery backup method thereof and related equipment
CN112596951B (en) NAS data disaster recovery method, device, equipment and storage medium
CN105049258B (en) The data transmission method of network disaster tolerance system
CN115794499B (en) Method and system for dual-activity replication data among distributed block storage clusters
JP5521595B2 (en) Storage system and storage control method
WO2024103594A1 (en) Container disaster recovery method, system, apparatus and device, and computer-readable storage medium
CN107357800A (en) A kind of database High Availabitity zero loses solution method
CN107135097A (en) The disaster tolerance system and disaster recovery method filed based on bookkeeping
JP2023505879A (en) Distributed database system and data disaster backup training method
CN112181723A (en) Financial disaster recovery method and device, storage medium and electronic equipment
CN114356650A (en) Data backup method, device, equipment, system and storage medium
US20210240351A1 (en) Remote copy system and remote copy management method
CN116389233B (en) Container cloud management platform active-standby switching system, method and device and computer equipment
CN113467717B (en) Dual-machine volume mirror image management method, device and equipment and readable storage medium
CN115098300B (en) Database backup method, disaster recovery method, device and equipment
CN107181608A (en) A kind of method and operation management system for recovering service and performance boost

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