A snapshot creation method, system and computer readable storage medium
By registering activity flags in the distributed storage system and using the notification mechanism, the scheduling problem when creating snapshots under the multi-path mechanism is solved, effective scheduling of client processes and action nodes is achieved, and the smooth progress of snapshot creation and system stability are ensured. reliability.
Patent Information
- Application Number
- CN202210188922.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-28
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2042-02-28
AI Technical Summary
In distributed storage systems, the multi-path mechanism makes it difficult to effectively control the scheduling of multiple client processes and local nodes when creating snapshots, which can easily lead to snapshot creation errors and affect the performance and reliability of the storage system.
Through the notification mechanism, the client process and the action node of the distributed storage system register activity flags in the storage volume. The action node obtains these flags when starting the snapshot creation and sends blocking notifications to the active process to ensure that the IO operation is blocked until the snapshot creation is completed. Then resume IO operations.
Effectively schedule client processes and action nodes of the distributed storage system to ensure the smooth progress of the snapshot creation process, avoid interference with IO operations, and improve the accuracy and reliability of snapshot creation.
Smart Images

Figure CN114564321B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of distributed storage, and in particular to a snapshot creation method, system and computer-readable storage medium. Background Art
[0002] To improve the performance and reliability of the storage system, the distributed storage system can provide storage services to the outside world based on the multipath mechanism, that is, the client can use multiple processes to connect to the distributed storage system through this mechanism and perform IO operations with the system at the same time. However, the multipath mechanism brings new scheduling problems to the distributed storage system. For example, when creating a snapshot, it is necessary to effectively schedule and control multiple processes of the client and local nodes, otherwise it will easily lead to snapshot creation errors and other problems, affecting the effect of the distributed storage system in executing snapshot creation. Summary of the invention
[0003] The purpose of the present invention is to provide a snapshot creation method, system and computer-readable storage medium, which can effectively schedule client processes and distributed storage system action nodes that communicate using a multi-path mechanism through a notification mechanism to ensure the smooth progress of the snapshot creation process.
[0004] In order to solve the above technical problems, the present invention provides a snapshot creation method, comprising:
[0005] Multiple active processes in the client establish a connection with the distributed storage system using a multipath mechanism, and register an activity flag corresponding to the active process in a corresponding storage volume in the distributed storage system; the activity flag includes communication information of the active process;
[0006] When starting snapshot creation, the action node in the distributed storage system obtains the activity flag from the storage volume and sends a blocking notification to the active process according to the communication information;
[0007] When receiving the blocking notification, the active process blocks the IO operation with the storage volume and returns a blocking success notification to the action node;
[0008] When receiving the blocking success notification, the action node creates a snapshot for the storage volume, and returns a recovery notification to the active process when the creation is completed;
[0009] When receiving the resumption notification, the active process resumes the IO operation.
[0010] Optionally, registering the activity flag corresponding to the active process in the corresponding storage volume in the distributed storage system includes:
[0011] The active process uses the iscsi server in the path used by the connection to access the storage volume and obtain an operation handle of the storage volume;
[0012] The metadata object of the storage volume is searched according to the operation handle, and the activity flag is registered on the metadata object.
[0013] Optionally, before creating a snapshot for the storage volume, the method further includes:
[0014] The action node determines whether the blocking success notification of all the active processes can be received within a preset time period;
[0015] If yes, proceed to the step of creating a snapshot for the storage volume;
[0016] If not, the process proceeds to the step of returning the resumption notification to the active process.
[0017] Optionally, returning a blocking success notification to the action node includes:
[0018] The active process returns the blocking success notification to the distributed storage system, so that the distributed storage system forwards the blocking success notification to the action node.
[0019] Optionally, after registering the activity flag corresponding to the active process in the corresponding storage volume in the distributed storage system, the method further includes:
[0020] The active process periodically sends first heartbeat information to the distributed storage system;
[0021] The distributed storage system determines whether the first heartbeat information can be periodically received;
[0022] If not, the distributed storage system removes the activity flag.
[0023] Optionally, after the action node in the distributed storage system starts creating a snapshot, the action node further includes:
[0024] The action node registers an action flag in the storage volume, and periodically sends a second heartbeat message to the distributed storage system;
[0025] The distributed storage system determines that the second heartbeat information can be periodically received;
[0026] If not, the distributed storage system removes the action flag and returns an exception notification to the active process;
[0027] When receiving the exception notification, the active process detects whether the action flag is removed, and when determining that the action flag is removed, resumes the IO operation.
[0028] The present invention also provides a snapshot creation system, comprising: a plurality of active processes in a client, and an action node in the distributed storage system, wherein:
[0029] The active process is used to establish a connection with the distributed storage system using a multipath mechanism, and register an activity flag corresponding to the active process in a corresponding storage volume in the distributed storage system; the activity flag includes communication information of the active process; upon receiving the blocking notification returned by the action node, the IO operation between the storage volume and the active process is blocked, and a blocking success notification is returned to the action node; upon receiving the recovery notification returned by the action node, the IO operation is restored;
[0030] The action node is used to obtain the activity flag from the storage volume when starting the snapshot creation, and send a blocking notification to the active process according to the communication information; when receiving the blocking success notification, create a snapshot for the storage volume, and return a recovery notification to the active process when the creation is completed.
[0031] Optionally,
[0032] The active process is also used to access the storage volume using the iscsi server in the path used by the connection and obtain the operation handle of the storage volume; search for the metadata object of the storage volume according to the operation handle, and register the active flag on the metadata object.
[0033] Optionally,
[0034] The action node is further used to determine whether the blocking success notification of all the active processes can be received within a preset time period; if so, enter the step of creating a snapshot for the storage volume; if not, enter the step of returning the recovery notification to the active process.
[0035] The present invention also provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are loaded and executed by a processor, the snapshot creation method as described above is implemented.
[0036] The present invention provides a snapshot creation method, comprising: multiple active processes in a client establish a connection with a distributed storage system using a multipath mechanism, and register an activity flag corresponding to the active process in a corresponding storage volume in the distributed storage system; the activity flag contains communication information of the active process; when starting snapshot creation, an action node in the distributed storage system obtains the activity flag from the storage volume, and sends a blocking notification to the active process according to the communication information; when the active process receives the blocking notification, the active process blocks the IO operation between the storage volume and returns a blocking success notification to the action node; when the action node receives the blocking success notification, the action node creates a snapshot for the storage volume, and returns a recovery notification to the active process when the creation is completed; when the active process receives the recovery notification, the active process resumes the IO operation.
[0037] It can be seen that in the present invention, when multiple active processes in the client use the multipath mechanism to establish a connection with the distributed storage system, the corresponding activity flags will be registered in the storage volume corresponding to the system to retain the necessary communication information in the storage volume; and when the action node starts the snapshot creation, the communication information can be read in the storage volume, and the blocking notification can be sent to the corresponding active process using this information, so that the active process blocks the IO operation between the storage volume and avoids the influence of the IO operation on the snapshot creation process; after determining that the active process has completed the IO blocking, the action node can complete the snapshot creation without being disturbed; finally, when the creation is completed, the action node will return a recovery notification to the active process, so that the active process resumes the IO operation and ends the snapshot creation process. In other words, the present invention can save the communication information of the active process in the storage volume of the distributed storage system, so that the action node can use the information to communicate with the active process, and realize the scheduling between the active process and the action node through the notification mechanism, so that during the snapshot creation process, the multiple processes of the client and the action nodes in the distributed storage system can be effectively scheduled to ensure the smooth progress of the snapshot creation process. The present invention also provides a snapshot creation system and a computer-readable storage medium, which have the above-mentioned beneficial effects. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0039] Figure 1 A flowchart of a snapshot creation method provided by an embodiment of the present invention;
[0040] Figure 2 The present invention provides a structural block diagram of a snapshot creation system. DETAILED DESCRIPTION
[0041] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0042] In the related art, the multipath mechanism brings new scheduling problems to the distributed storage system. For example, when creating a snapshot, it is necessary to effectively schedule and control multiple processes of the client and local nodes, otherwise it will easily lead to snapshot creation errors and other problems, affecting the effect of the distributed storage system in executing snapshot creation. In view of this, the present invention provides a snapshot creation method, which can effectively schedule the client process and the distributed storage system action node that use the multipath mechanism to communicate through a notification mechanism to ensure the smooth progress of the snapshot creation process. Please refer to Figure 1 , Figure 1 A flowchart of a snapshot creation method provided by an embodiment of the present invention, the method may include:
[0043] S101. Multiple active processes in a client establish a connection with a distributed storage system using a multipath mechanism, and register activity flags corresponding to the active processes in corresponding storage volumes in the distributed storage system; the activity flags include communication information of the active processes.
[0044] If the client establishes a connection with the distributed storage system through a multi-path mechanism, it means that the client can communicate with the distributed storage system through multiple data paths. Usually, in order to effectively control these data paths, the client will set a dedicated process to communicate with the distributed storage system in the corresponding data path (i.e., path), that is, the correspondence between the process and the path is one-to-one, and the client can set multiple processes to communicate with the distributed storage system. However, multi-process communication brings difficulties to the control of the distributed storage system. For example, when creating a snapshot for a storage volume (i.e., the storage space of the client in the distributed storage system), the distributed storage system needs to ensure that the client blocks the IO operation between the volume to ensure the smooth creation of the snapshot. Therefore, how to accurately notify each active process of blocking IO is the key to ensuring the smooth creation of the snapshot. In the embodiment of the present invention, after the active process establishes a connection with the distributed storage system through the multi-path mechanism, it will register its corresponding activity flag in the corresponding storage volume. The flag is not only used to mark that it is performing IO operations with the distributed storage system, but also records the communication information for communicating with it. After this, the distributed storage system can effectively communicate with the active process through the communication information registered in the storage volume. It should be noted that the embodiment of the present invention does not limit the activity flag or the content that can be included, for example, it can include the client node IP, process ID, client ID, etc.
[0045] It should be noted that the embodiment of the present invention does not limit the registration position of the activity flag in the storage volume. For example, it can be directly saved in a specified area in the storage volume, or it can be saved in the metadata object corresponding to the storage volume, where the metadata object is used to save the basic information of the storage volume. To facilitate management and search, in the embodiment of the present invention, the active process can register the activity flag in the metadata object corresponding to the storage volume. Specifically, the active process can use the ISCSI server carried by the path between it and the distributed storage system to access the storage volume and obtain the operation handle of the storage volume, which contains the information required to find the metadata object; then, the active process can find the corresponding metadata object according to the handle and register the activity flag in the object, where ISCSI (Internet Small Computer System Interface) is a storage technology based on the Internet and SCSI-3 protocol.
[0046] In a possible case, registering an activity flag corresponding to an active process in a corresponding storage volume in a distributed storage system may include:
[0047] Step 11: The active process uses the iscsi server in the path used by the connection to access the storage volume and obtains the operation handle of the storage volume;
[0048] Step 12: Find the metadata object of the storage volume according to the operation handle, and register the activity flag on the metadata object.
[0049] Furthermore, in order to ensure that the activity flag has a strong timeliness, a heartbeat mechanism can be set between the active process and the distributed storage system. Specifically, after completing the registration of the activity flag, the active process will periodically send heartbeat information to the distributed storage system; and the distributed storage system will determine whether it can periodically receive the heartbeat information of the active process. If it can be received, it can be determined that the activity flag is valid. If it cannot be received, it should be determined that the activity flag is invalid. At this time, the distributed storage system will remove this activity flag to avoid subsequent invalid communication based on this invalid activity flag. It should be noted that the embodiment of the present invention does not limit the specific heartbeat information, which can be set according to actual application requirements; the embodiment of the present invention does not limit the specific period duration of the active process sending heartbeat information to the distributed storage system, which can be set according to actual application requirements.
[0050] In a possible case, after registering the activity flag corresponding to the active process in the corresponding storage volume in the distributed storage system, the following may also be included:
[0051] Step 21: The active process periodically sends the first heartbeat information to the distributed storage system;
[0052] Step 22: The distributed storage system determines whether the first heartbeat information can be received periodically; if so, proceed to step 22; if not, proceed to step 23;
[0053] Step 23: The distributed storage system removes the activity flag.
[0054] S102: When starting to create a snapshot, the action node in the distributed storage system obtains an activity flag from the storage volume and sends a blocking notification to the active process according to the communication information.
[0055] In the embodiment of the present invention, the action node is the node that actually executes the snapshot creation action in the distributed storage system. The node needs to communicate with each active process to inform each active node to block the IO operation. It should be noted that the embodiment of the present invention does not limit the specific blocking notification, as long as the notification can make the active process block the IO operation between the storage volume, it can be set according to the actual application requirements.
[0056] S103. When receiving the blocking notification, the active process blocks the IO operation with the storage volume and returns a blocking success notification to the action node.
[0057] It should be noted that the embodiments of the present invention do not limit the specific process of IO blocking, and reference may be made to the relevant technologies of IO (input and output). The embodiments of the present invention also do not limit how the active process returns a blocking success notification to the action node. For example, the communication information of the action node may be retained in the blocking notification, so that the active process can communicate directly with the action node based on the communication information to return a blocking success notification; of course, the active process may also send the blocking success notification directly to the distributed storage system, so that the system forwards the notification to the action node. For the convenience of management, in the embodiments of the present invention, the active process may send the blocking success notification to the distributed storage system, and forward the notification to the action node through the system.
[0058] In one possible case, a blocking success notification is returned to the action node, including:
[0059] Step 31: The active process returns a blocking success notification to the distributed storage system, so that the distributed storage system forwards the blocking success notification to the action node.
[0060] Further, it should be noted that the embodiment of the present invention does not limit the specific form of the blocking success notification, as long as the notification can enable the action node to determine that the active process has completed IO blocking, and can be set according to actual application requirements.
[0061] S104: When receiving the blocking success notification, the action node creates a snapshot for the storage volume, and returns a recovery notification to the active process when the creation is completed.
[0062] Obviously, when the action node receives the blocking success notification, it can start to create a snapshot for the storage volume. However, considering that multiple active processes may communicate with the same storage volume at the same time, in order to ensure that the snapshot creation process is not disturbed by the outside world and to improve the judgment efficiency, the action node can determine whether it can receive the blocking success notification of all active processes within the preset time period. If it can be received, the snapshot creation can continue; if it cannot be received, the operation can be determined to have failed. It should be noted that the embodiment of the present invention does not limit the operation content after the operation failure is determined. For example, it can try to receive again, and of course it can directly return a recovery notification to each active process so that each active process can resume IO operation. In order to reduce the impact of snapshot creation on the normal activities of the active process, in an embodiment of the present invention, after determining that the operation has failed, the action node can directly return a recovery notification so that each active process can resume IO operation.
[0063] In a possible scenario, before creating a snapshot for a storage volume, the following steps may also be included:
[0064] Step 31: The action node determines whether it can receive the blocking success notification of all active processes within the preset time period; if so, it proceeds to step 32; if not, it proceeds to step 33;
[0065] Step 32: Enter the step of creating a snapshot for the storage volume;
[0066] Step 33: Enter the step of returning the recovery notification to the active process.
[0067] S105. When receiving the resumption notification, the active process resumes the IO operation.
[0068] After receiving the recovery notification, the active process can resume the original IO operation, thus completing the snapshot creation process.
[0069] Of course, it is understandable that the action node may also have snapshot creation anomalies, that is, inaccessibility, disconnection, etc. In order to avoid the impact of action node anomalies on snapshot creation and normal activities of active processes, the embodiment of the present invention may also set a heartbeat between the action node and the distributed storage system. Specifically, the action node can also register an action flag in the storage volume, which is used to identify that the action node is creating a snapshot for the storage volume; after completing the registration, the action node will periodically send heartbeat information to the distributed storage system to notify the system that it is in normal operation. The distributed storage system determines whether it can periodically receive the heartbeat information sent by the action node. If it can be received, it can be determined that the action node is normal; if it cannot be received, it can be determined that the action node is abnormal. At this time, in order to avoid the impact of abnormal situations on each active process, the distributed storage system can remove the action flag and send an abnormal notification to each active process, so that these processes can resume IO operations with the storage volume after determining that the action flag has indeed been removed. It should be noted that the embodiments of the present invention do not limit the specific form of the action flag, as long as the flag can indicate that the action node is creating a snapshot; the present invention does not limit the registration position of the action flag in the storage volume, and the description of the registration position of the activity flag in the storage volume in the above embodiment can be referred to, which will not be repeated here; the embodiments of the present invention do not limit the specific cycle duration of the action node sending heartbeat information to the distributed storage system, which can be set according to actual application requirements.
[0070] In a possible case, after starting the snapshot creation, the action node in the distributed storage system may further include:
[0071] Step 41: The action node registers the action flag in the storage volume, and periodically sends the second heartbeat information to the distributed storage system;
[0072] Step 42: The distributed storage system determines whether the second heartbeat information can be received periodically; if so, the process proceeds to step 42; if not, the process proceeds to step 43;
[0073] Step 43: The distributed storage system removes the action flag and returns an exception notification to the active process;
[0074] Step 44: When receiving the exception notification, the active process detects whether the action flag is removed, and resumes the IO operation when it is determined that the action flag is removed.
[0075] Based on the above embodiment, in the present invention, when multiple active processes in the client use the multipath mechanism to establish a connection with the distributed storage system, the corresponding active flags will be registered in the storage volume corresponding to the system to retain the necessary communication information in the storage volume; and when the action node starts the snapshot creation, the communication information can be read in the storage volume, and the blocking notification can be sent to the corresponding active process by using this information, so that the active process blocks the IO operation between the storage volume and the storage volume, avoiding the influence of the IO operation on the snapshot creation process; after determining that the active process has completed the IO blocking, the action node can complete the snapshot creation without being disturbed; finally, when the creation is completed, the action node will return a recovery notification to the active process, so that the active process resumes the IO operation and ends the snapshot creation process. In other words, the present invention can save the communication information of the active process in the storage volume of the distributed storage system, so that the action node can use the information to communicate with the active process, and realize the scheduling between the active process and the action node through the notification mechanism, so that during the snapshot creation process, the multiple processes of the client and the action nodes in the distributed storage system can be effectively scheduled to ensure the smooth progress of the snapshot creation process.
[0076] The snapshot creation system and computer-readable storage medium provided in the embodiments of the present invention are introduced below. The snapshot creation system and computer-readable storage medium described below and the snapshot creation method described above can be referred to each other.
[0077] Please refer to Figure 2 , Figure 2 The structure diagram of a snapshot creation system provided by an embodiment of the present invention is as follows. The system may include: multiple active processes 211 in a client 210, and an action node 221 in a distributed storage system 220, wherein:
[0078] The active process 211 is used to establish a connection with the distributed storage system 220 by using a multipath mechanism, and register an activity flag corresponding to the active process 211 in the corresponding storage volume in the distributed storage system 220; the activity flag includes communication information of the active process 211; upon receiving a blocking notification returned by the action node 221, the IO operation between the active process 211 and the storage volume is blocked, and a blocking success notification is returned to the action node 221; upon receiving a recovery notification returned by the action node 221, the IO operation is resumed;
[0079] The action node 221 is used to obtain the activity flag from the storage volume when starting the snapshot creation, and send a blocking notification to the active process 211 according to the communication information; when receiving the blocking success notification, create a snapshot for the storage volume, and return a recovery notification to the active process 211 when the creation is completed.
[0080] Optionally,
[0081] The active process 211 is also used to access the storage volume using the iscsi server in the path used by the connection and obtain the operation handle of the storage volume; search for the metadata object of the storage volume according to the operation handle, and register the active flag on the metadata object.
[0082] Optionally,
[0083] The action node 221 is also used to determine whether the blocking success notification of all active processes 211 can be received within a preset time period; if so, the step of creating a snapshot for the storage volume is entered; if not, the step of returning a recovery notification to the active process 211 is entered.
[0084] Optionally,
[0085] The active process 211 is further used to return a blocking success notification to the distributed storage system 220 , so that the distributed storage system 220 forwards the blocking success notification to the action node 221 .
[0086] Optionally,
[0087] The active process 211 is further used to periodically send first heartbeat information to the distributed storage system 220;
[0088] The distributed storage system 220 is further used to determine whether the first heartbeat information can be received periodically; if not, remove the activity flag.
[0089] Optionally,
[0090] The action node 221 is further used to register the action flag in the storage volume and periodically send the second heartbeat information to the distributed storage system 220;
[0091] The distributed storage system 220 is further used to determine whether the second heartbeat information can be received periodically; if not, remove the action flag and return an abnormal notification to the active process 211;
[0092] The active process 211 is further used to detect whether the action flag is removed when receiving an abnormal notification, and to resume the IO operation when it is determined that the action flag is removed.
[0093] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the snapshot creation method in any of the above embodiments are implemented.
[0094] Since the embodiments of the computer-readable storage medium part and the embodiments of the snapshot creation method part correspond to each other, the embodiments of the storage medium part refer to the description of the embodiments of the snapshot creation method part, which will not be repeated here.
[0095] The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0096] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0097] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0098] The above is a detailed introduction to a snapshot creation method, system and computer-readable storage medium provided by the present invention. This article uses specific examples to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present invention, the present invention can also be improved and modified in a number of ways, and these improvements and modifications also fall within the scope of protection of the claims of the present invention.
Claims
1. A snapshot creation method, characterized in that: include: Multiple active processes in the client establish a connection with the distributed storage system using a multipath mechanism, and register an activity flag corresponding to the active process in a corresponding storage volume in the distributed storage system; the activity flag includes communication information of the active process; When starting snapshot creation, the action node in the distributed storage system obtains the activity flag from the storage volume and sends a blocking notification to the active process according to the communication information; When receiving the blocking notification, the active process blocks the IO operation with the storage volume and returns a blocking success notification to the action node; When receiving the blocking success notification, the action node creates a snapshot for the storage volume, and returns a recovery notification to the active process when the creation is completed; When receiving the resumption notification, the active process resumes the IO operation.
2. The snapshot creation method according to claim 1, characterized in that: The registering the activity flag corresponding to the active process in the corresponding storage volume in the distributed storage system includes: The active process uses the iscsi server in the path used by the connection to access the storage volume and obtain an operation handle of the storage volume; The metadata object of the storage volume is searched according to the operation handle, and the activity flag is registered on the metadata object.
3. The snapshot creation method according to claim 1, characterized in that: Before creating a snapshot for the storage volume, the following steps are also included: The action node determines whether the blocking success notification of all the active processes can be received within a preset time period; If yes, proceed to the step of creating a snapshot for the storage volume; If not, the process proceeds to the step of returning the resumption notification to the active process.
4. The snapshot creation method according to claim 1, characterized in that: The returning a blocking success notification to the action node includes: The active process returns the blocking success notification to the distributed storage system, so that the distributed storage system forwards the blocking success notification to the action node.
5. The snapshot creation method according to any one of claims 1 to 4, characterized in that: After registering the activity flag corresponding to the active process in the corresponding storage volume in the distributed storage system, the method further includes: The active process periodically sends first heartbeat information to the distributed storage system; The distributed storage system determines whether the first heartbeat information can be periodically received; If not, the distributed storage system removes the activity flag.
6. The snapshot creation method according to claim 5, characterized in that: After the action node in the distributed storage system starts creating a snapshot, the action node further includes: The action node registers an action flag in the storage volume, and periodically sends a second heartbeat message to the distributed storage system; The distributed storage system determines that the second heartbeat information can be periodically received; If not, the distributed storage system removes the action flag and returns an exception notification to the active process; When receiving the exception notification, the active process detects whether the action flag is removed, and when determining that the action flag is removed, resumes the IO operation.
7. A snapshot creation system, characterized in that: include: Multiple active processes in the client and action nodes in the distributed storage system, where The active process is used to establish a connection with the distributed storage system using a multipath mechanism, and register an activity flag corresponding to the active process in a corresponding storage volume in the distributed storage system; the activity flag includes communication information of the active process; upon receiving a blocking notification returned by the action node, the IO operation between the storage volume is blocked, and a blocking success notification is returned to the action node; upon receiving a recovery notification returned by the action node, the IO operation is resumed; The action node is used to obtain the activity flag from the storage volume when starting the snapshot creation, and send a blocking notification to the active process according to the communication information; when receiving the blocking success notification, create a snapshot for the storage volume, and return a recovery notification to the active process when the creation is completed.
8. The snapshot creation system according to claim 7, characterized in that: The active process is also used to access the storage volume using the iscsi server in the path used by the connection and obtain the operation handle of the storage volume; search for the metadata object of the storage volume according to the operation handle, and register the active flag on the metadata object.
9. The snapshot creation system according to claim 7, characterized in that: The action node is further used to determine whether the blocking success notification of all the active processes can be received within a preset time period; if so, enter the step of creating a snapshot for the storage volume; if not, enter the step of returning the recovery notification to the active process.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are loaded and executed by the processor, the snapshot creation method according to any one of claims 1 to 6 is implemented.
