A distributed block storage multi-path iSCSI lock implementation method, system and device

By synchronizing ISCSI lock information in a distributed storage system and disconnecting the failed nodes in an abnormal state, the synchronization and data persistence of multi-path ISCSI locks are solved, and the ease of use and reliability of the system is improved.

CN114035969BActive Publication Date: 2025-08-19JINAN INSPUR DATA TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111268261.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-29
Publication Date
2025-08-19
Estimated Expiration
2041-10-29

AI Technical Summary

Technical Problem

In a distributed storage system, how to realize the synchronization and data persistence of multi-path ISCSI locks to improve the reliability and ease of use of the system.

Method used

The lock information in memory is updated through the ISCSI client and synchronously save it to the distributed storage cluster, and sent to the other ISCSI servers for data synchronization. The faulty node will be automatically disconnected under abnormal conditions to ensure that the lock information is not lost.

Benefits of technology

It realizes synchronization of SCSI lock information between multiple nodes and persists data, improving the ease of use and reliability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114035969B_ABST
    Figure CN114035969B_ABST
Patent Text Reader

Abstract

The present application discloses a method for implementing a distributed block storage multi-path ISCSI lock, the method comprising: performing an initialization operation on the current ISCSI server based on a received ISCSI connection request; performing a lock operation through the ISCSI client, updating the lock information in the memory, and synchronously saving the lock information to the distributed storage cluster; sending the updated lock information and file data to the remaining ISCSI servers in the storage cluster, which then perform data synchronization operations. This method not only synchronizes SCSI lock information between multiple nodes, but also achieves data persistence. Furthermore, it also monitors abnormal status. When a server fails, the normal server no longer synchronizes messages to the failed node, thereby improving the system's usability and reliability. The present application also discloses a system, device, and computer-readable storage medium for implementing a distributed block storage multi-path ISCSI lock, which have the above beneficial effects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computers, and in particular to a method, system and device for implementing a distributed block storage multi-path ISCSI lock. Background Art

[0002] Distributed storage systems store data across multiple independent devices. Traditional network storage systems use centralized storage servers to store all data. These servers are the focal point for data reliability and security, but also become a bottleneck for system performance. As data storage volumes continue to increase, centralized network storage systems are no longer able to meet the needs of large-scale storage applications. Distributed network storage systems utilize a scalable system architecture, sharing the storage load across multiple storage servers. This not only improves system reliability, availability, and access efficiency, but also facilitates scalability.

[0003] SCSI locks are typically used to control access rights when multiple clients access the same physical device. Simply put, clients with the appropriate permissions can access the device, while clients without permissions must preempt or wait until a client with permissions releases them before they can regain access. Multipathing technology is commonly used in distributed systems to improve data throughput and reliability. However, for SCSI locks in distributed systems, data synchronization is a major challenge in existing technologies because SCSI commands may be received on multiple links. Summary of the Invention

[0004] The purpose of the present invention is to provide a method, system and device for implementing distributed block storage multi-path iSCSI lock, which executes different action sequences through different nodes respectively and realizes synchronization of SCSI lock information among multiple nodes.

[0005] To achieve the above objectives, the present invention discloses the following technical solutions:

[0006] In one aspect, the present invention provides a method for implementing a distributed block storage multipath iSCSI lock, the method comprising the following steps:

[0007] Based on the received iSCSI connection request, the current iSCSI server performs initialization operations;

[0008] Perform lock operations through the iSCSI client, update the lock information in memory, and synchronize the lock information to the distributed storage cluster;

[0009] After the lock information is saved, the updated lock information and file data are sent to the remaining iSCSI servers in the storage cluster, and the remaining iSCSI servers perform data synchronization operations.

[0010] Based on the above solution, further, the current iSCSI server performs an initialization operation, including the following steps:

[0011] After receiving the iSCSI connection request, the current iSCSI server registers the corresponding processing function;

[0012] The current iSCSI server reads the SCSI lock information corresponding to each LUN in the distributed storage cluster and updates it to the memory.

[0013] Furthermore, after the lock information is saved, the updated lock information and file data are sent to the remaining iSCSI servers in the storage cluster, and the remaining iSCSI servers perform data synchronization operations, including the following steps:

[0014] After the data lock information is saved, the updated lock information and file data are sent to the other iSCSI servers in the storage cluster.

[0015] The remaining iSCSI servers perform data synchronization operations. The iSCSI server that succeeds in the synchronization operation returns a success message to the current server; the iSCSI server that fails in the synchronization operation returns a failure message to the current server.

[0016] Furthermore, in the above-mentioned distributed block storage multi-path iSCSI lock implementation method, if a node abnormality is detected between the server and the client, the faulty node is automatically disconnected and the server stops service.

[0017] Another aspect of the present invention provides a distributed block storage multi-path ISCSI lock implementation system, the system comprising a client and a storage cluster;

[0018] The client sends an iSCSI connection request to the storage cluster, and performs a lock operation after the current iSCSI server of the storage cluster is initialized, updates the lock information in the memory, and synchronously saves the lock information to the storage cluster;

[0019] The current ISCSI server of the storage cluster performs an initialization operation after receiving the ISCSI connection request sent by the client, and after the lock information is updated and saved, the updated lock information and file data are sent to the remaining ISCSI servers of the storage cluster, and the remaining ISCSI servers perform data synchronization operations.

[0020] Based on the above system, further, the current ISCSI server of the storage cluster performs initialization operations, including: after the current ISCSI server receives the ISCSI connection request sent by the client, it registers the corresponding processing function, and reads the SCSI lock information corresponding to each LUN in the distributed storage cluster and updates it to the memory.

[0021] Furthermore, the remaining ISCSI servers of the storage cluster perform data synchronization operations, and the ISCSI server whose synchronization operation succeeds returns a success message to the current server; the ISCSI server whose synchronization operation fails returns a failure message to the current server.

[0022] The present invention also provides a device for implementing a distributed block storage multi-path ISCSI lock, the device comprising: at least one processor, and at least one memory communicatively connected to the processor;

[0023] The memory stores program instructions that can be executed on the processor;

[0024] The processor calls the program instructions to execute the steps of the method for implementing a distributed block storage multi-path ISCSI lock as described in the first aspect.

[0025] In addition, the present invention also 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 method for implementing a distributed block storage multi-path ISCSI lock as described in the first aspect are implemented.

[0026] The effects provided in the summary of the invention are only the effects of the embodiments, not all the effects of the invention. One of the above technical solutions has the following advantages or beneficial effects:

[0027] An embodiment of the present application provides a method for implementing a distributed block storage multi-path ISCSI lock. First, the current ISCSI server performs an initialization operation based on a received ISCSI connection request. Then, the ISCSI client performs a lock operation, updates the lock information in memory, and synchronizes the lock information to the distributed storage cluster. Next, the updated lock information and file data are sent to the remaining ISCSI servers in the storage cluster, which then perform data synchronization operations. This method not only synchronizes SCSI lock information between multiple nodes, but also achieves data persistence. In the event of a power outage or other failure, the persistent locking information will not be lost. In addition, abnormal status monitoring is performed. When a server fails, the normal server will no longer synchronize messages to the failed node, thereby improving the system's usability and reliability.

[0028] The embodiments of the present application provide a distributed block storage multi-path iSCSI lock implementation system, device, and computer-readable storage medium, which can implement the above-mentioned distributed block storage multi-path iSCSI lock implementation method and achieve the technical effects described above. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0030] Figure 1 A flow chart of a method for implementing a distributed block storage multi-path iSCSI lock provided in an embodiment of the present application;

[0031] Figure 2 for Figure 1 Schematic diagram of the implementation process of some steps in the method;

[0032] Figure 3 This is a system architecture diagram for implementing a distributed block storage multi-path iSCSI lock provided in an embodiment of the present application.

[0033] Figure 4 A schematic diagram of the hardware structure of a distributed block storage multi-path iSCSI lock implementation device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0034] To help those skilled in the art better understand the technical solutions of the present invention, the following will provide a clear and complete description of the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work should fall within the scope of protection of the present invention.

[0035] To facilitate understanding of the embodiments, the abbreviations and key terms involved in the embodiments are explained and illustrated below.

[0036] SCSI: Small Computer System Interface, small computer system interface;

[0037] ISCSI: Internet Small Computer System Interface, Internet small computer system interface;

[0038] LUN: Logical Unit Number.

[0039] Figure 1 A flow chart of a method for implementing a distributed block storage multi-path ISCSI lock provided by an embodiment of the present invention is shown.

[0040] Reference Figure 1 The method of this embodiment includes the following steps:

[0041] S1. Based on the received iSCSI connection request, the current iSCSI server performs initialization operations;

[0042] Specifically, in this step, the current iSCSI server performs initialization operations, including:

[0043] After receiving the iSCSI connection request, the current iSCSI server registers the corresponding processing function;

[0044] The current iSCSI server reads the SCSI lock information corresponding to each LUN in the distributed storage cluster and updates it to the memory.

[0045] S2. Perform a lock operation through the iSCSI client, update the lock information in the memory, and synchronize the lock information to the distributed storage cluster;

[0046] S3. After the lock information is saved, the updated lock information and file data are sent to the remaining iSCSI servers in the storage cluster, and the remaining iSCSI servers perform data synchronization operations.

[0047] This step specifically includes:

[0048] After the data is saved, the update message is sent to the other iSCSI servers in the storage cluster;

[0049] The remaining iSCSI servers perform data synchronization operations. The iSCSI server that succeeds in the synchronization operation returns a success message to the current server; the iSCSI server that fails in the synchronization operation returns a failure message to the current server.

[0050] For the specific implementation process of steps S2 and S3, refer to Figure 2 shown.

[0051] In this embodiment, iSCSI commands are sent to any server, and data is synchronously updated to every server on every path. Even after a power outage or other fault recovery, the persistent locking information is not lost. If a node anomaly is detected between the server and client, the faulty node is automatically disconnected, and the server stops service, improving the system's usability and reliability.

[0052] The present invention also provides a distributed block storage multi-path ISCSI lock implementation system, which can be used to implement a distributed block storage multi-path ISCSI lock implementation method. The system described below can be used in conjunction with the method described above.

[0053] Figure 3 The following is a diagram showing the system architecture for implementing a distributed block storage multi-path iSCSI lock provided by an embodiment of the present invention.

[0054] Reference Figure 3 , the system of this embodiment includes a client 1 and a storage cluster 2;

[0055] Client 1 sends an iSCSI connection request to storage cluster 2. After the current iSCSI server of storage cluster 2 is initialized, it performs a lock operation, updates the lock information in memory, and saves the lock information to the storage cluster synchronously.

[0056] After receiving the iSCSI connection request from client 1, the current iSCSI server of storage cluster 2 performs initialization operations. After the lock information is updated and saved, the updated lock information and file data are sent to the remaining iSCSI servers of the storage cluster, and the remaining iSCSI servers perform data synchronization operations.

[0057] Specifically, the current ISCSI server of the storage cluster 2 performs initialization operations, including: after receiving the ISCSI connection request sent by the client 1, the current ISCSI server registers the corresponding processing function, and reads the SCSI lock information corresponding to each LUN in the distributed storage cluster and updates it to the memory.

[0058] The remaining iSCSI servers in storage cluster 2 perform data synchronization operations. The iSCSI servers that succeed in the synchronization operation return a success message to the current server; the iSCSI servers that fail in the synchronization operation return a failure message to the current server.

[0059] The present invention also provides a device for implementing a distributed block storage multi-path ISCSI lock. Similarly, the device described below can be referenced in correspondence with the method described above.

[0060] Reference Figure 4 In this embodiment, a device for implementing a distributed block storage multi-path iSCSI lock includes an input unit 10, a memory 20, a processor 30, and an output unit 40. The memory 20 stores program instructions that can be executed on the processor 30. The processor 30 invokes the program instructions to execute the method for implementing a distributed block storage multi-path iSCSI lock in the above embodiment. The input unit 10, the memory 20, the processor 30, and the output unit 40 can exchange data with each other via a communication bus. The functions implemented by each unit and their combination, as well as the technical effects achieved, can be found in the description of the corresponding parts of the above method embodiment and will not be repeated here.

[0061] The present invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the method for implementing a distributed block storage multipath iSCSI lock. The detailed implementation process can be referenced to the aforementioned implementation method, system, or device and will not be further described here.

[0062] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, any modifications, improvements and equivalent substitutions made without departing from the principles of the present invention are all included in the scope of protection of the present invention.

Claims

1. A method for implementing a distributed block storage multi-path iSCSI lock, characterized in that: The following steps are involved: Based on the received iSCSI connection request, the current iSCSI server performs initialization operations; Perform lock operations through the iSCSI client, update the lock information in memory, and synchronize the lock information to the distributed storage cluster; After the lock information is saved, the updated lock information and file data are sent to the remaining iSCSI servers in the storage cluster, and the remaining iSCSI servers perform data synchronization operations. The current iSCSI server performs initialization operations, including the following steps: After receiving the iSCSI connection request, the current iSCSI server registers the corresponding processing function; The current iSCSI server reads the SCSI lock information corresponding to each LUN in the distributed storage cluster and updates it to the memory; After the data lock information is saved, the updated lock cancellation information and file data are sent to the remaining iSCSI servers in the storage cluster. The remaining iSCSI servers perform data synchronization operations, including the following steps: After the data lock information is saved, the updated lock cancellation information and file data are sent to the other iSCSI servers in the storage cluster. The remaining iSCSI servers perform data synchronization operations. The iSCSI server that succeeds in the synchronization operation returns a success message to the current server; the iSCSI server that fails in the synchronization operation returns a failure message to the current server. If a node anomaly is detected between the server and the client, the faulty node will be automatically disconnected and the server will stop providing services.

2. A distributed block storage multi-path iSCSI lock implementation system, characterized in that: Includes client and storage cluster; The client sends an iSCSI connection request to the storage cluster, and after the current iSCSI server of the storage cluster is initialized, it performs a lock operation, updates the lock information in the memory, and saves the lock information synchronously to the storage cluster. The current iSCSI server in the storage cluster receives the iSCSI connection request from the client, performs initialization operations, and after the lock information is updated and saved, sends the updated lock information and file data to the remaining iSCSI servers in the storage cluster, which then perform data synchronization operations. The current iSCSI server of the storage cluster performs an initialization operation, including: after the current iSCSI server receives the iSCSI connection request sent by the client, registering a corresponding processing function, and reading the SCSI lock information corresponding to each LUN in the distributed storage cluster and updating it to the memory; The remaining ISCSI servers of the storage cluster perform data synchronization operations, and the ISCSI server whose synchronization operation succeeds returns a success message to the current server; the ISCSI server whose synchronization operation fails returns a failure message to the current server.

3. A distributed block storage multi-path iSCSI lock implementation device, characterized in that: include: at least one processor, and at least one memory communicatively coupled to the processor; The memory stores program instructions that can be executed on the processor; The processor calls the program instructions to execute the steps of the method for implementing a distributed block storage multi-path ISCSI lock according to claim 1.

4. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for implementing a distributed block storage multi-path ISCSI lock according to claim 1 are implemented.

Citation Information

Patent Citations

  • Data synchronization method and apparatus

    CN107295031A

  • Resource access method and device of distributed system

    CN112463757A

  • Distributed lock system architecture

    CN112799836A