CN114564153B - Volume mapping relieving method, device, equipment and storage medium - Google Patents
Volume mapping relieving method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN114564153B CN114564153B CN202210189950.8A CN202210189950A CN114564153B CN 114564153 B CN114564153 B CN 114564153B CN 202210189950 A CN202210189950 A CN 202210189950A CN 114564153 B CN114564153 B CN 114564153B
- Authority
- CN
- China
- Prior art keywords
- volume
- request
- mapping
- logic
- relieved
- 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
Links
- 238000013507 mapping Methods 0.000 title claims abstract description 94
- 238000000034 method Methods 0.000 title claims abstract description 60
- 238000004891 communication Methods 0.000 claims abstract description 34
- 238000012544 monitoring process Methods 0.000 claims description 25
- 230000006870 function Effects 0.000 claims description 24
- 230000008569 process Effects 0.000 claims description 18
- 238000004590 computer program Methods 0.000 claims description 12
- 238000001514 detection method Methods 0.000 claims description 3
- 230000003578 releasing effect Effects 0.000 description 5
- 238000010586 diagram Methods 0.000 description 4
- 230000009286 beneficial effect Effects 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 230000006399 behavior Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/067—Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0614—Improving the reliability of storage systems
- G06F3/0617—Improving the reliability of storage systems in relation to availability
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0629—Configuration or reconfiguration of storage systems
- G06F3/0632—Configuration or reconfiguration of storage systems by initialisation or re-initialisation of storage systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0638—Organizing or formatting or addressing of data
- G06F3/0644—Management of space entities, e.g. partitions, extents, pools
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
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 application relates to a volume mapping relieving method, a device, equipment and a storage medium, wherein the method comprises the steps of connecting a client side with an iscsi server side in a communication way, and registering a logical volume of a latch in any storage node; determining a logical volume to be relieved, and acquiring a metadata object associated with the logical volume to be relieved; the metadata object sends a request to be deleted to a storage node which is arranged corresponding to the logical volume to be relieved; the storage node de-maps the volume based on the request to be deleted. The volume mapping canceling method can realize the parallel execution of the volume mapping canceling operation among the multiple storage nodes, reduce the resource competition and effectively improve the usability and the reliability of the system.
Description
Technical Field
The present application relates to the technical field of storage devices, and in particular, to a method, an apparatus, a device, and a storage medium for volume mapping cancellation.
Background
The distributed storage system disperses and stores data on a plurality of independent devices. The traditional network storage system adopts a centralized storage server to store all data, and the storage server becomes a bottleneck of system performance, is also a focus of reliability and safety, and cannot meet the requirements of large-scale storage application. The distributed network storage system adopts an expandable system structure, and utilizes a plurality of storage servers to share the storage load, so that the reliability, availability and access efficiency of the system are improved, and the system is easy to expand.
In distributed scenarios, SCSI server programs generally use multipath configuration, where the configuration is stored in a cluster, and one master node is responsible for management operations. For management operations such as creating a modified volume map, the configuration only needs to be updated into the cluster, and the configuration is updated when the client accesses. A synchronization notification is required for the demapping operation to each iSCSI server program to execute. In a common scenario, the de-volume mapping may require that each iSCSI server node separately execute a corresponding de-volume mapping command. Under the condition that the number of the nodes is large, firstly, the number of the nodes needing to be determined to be operated is large, and secondly, the sequential execution efficiency is low.
Therefore, there is an urgent need to propose a volume mapping de-mapping method that reduces resource contention among nodes and can implement parallel de-volume mapping among multiple nodes.
Disclosure of Invention
In order to solve the technical problems, the application provides a volume mapping canceling method, a device, equipment and a storage medium, which can realize that volume mapping canceling operation is executed in parallel among multiple storage nodes, reduce resource competition among the storage nodes, and improve usability and reliability of an application system.
In order to achieve the above object, the present application proposes a first technical solution:
the volume mapping relieving method is applied to a distributed block memory system, wherein the distributed block memory system comprises a client, an iscsi server and a storage device, and the method comprises the following steps of:
step S1, the client side and the iscsi server side are connected in a communication mode, and a logic volume of a latch in any storage node is registered;
s2, determining a logical volume to be relieved, and acquiring a metadata object associated with the logical volume to be relieved;
step S3, the metadata object sends a request to be deleted to a storage node which is arranged corresponding to the logical volume to be relieved;
and S4, the storage node releases the volume mapping based on the to-be-deleted request.
In one embodiment of the present application, the sending, by the metadata object, a request to be deleted to a storage node corresponding to the logical volume to be relieved includes: the metadata object sends a broadcast request to be deleted to a storage process; and the storage process sends a request to be deleted to a storage node which is arranged corresponding to the logical volume to be relieved.
In one embodiment of the present application, before the storage node de-maps the volume based on the to-be-deleted request, the storage node further includes: acquiring a storage node corresponding to the logical volume to be relieved, setting the logical volume corresponding to the storage node to be in an offline state, and judging whether the logical volume has an unreturned IO request or not; if the logic volume has an unreturned IO request, a release calling function is set; and if the logic volume does not have the unreturned IO request, calling the release calling function.
In one embodiment of the application, the method further comprises: monitoring the state of a cluster, if the cluster is in a stable state, connecting the client and the iscsi server in a communication way, and registering a logic volume of a latch on any storage node, or determining a logic volume to be relieved, and acquiring a metadata object associated with the logic volume to be relieved; if the cluster is not in a stable state, suspending communication to connect the client and the iscsi server, and registering a logic volume of a latch on any storage node, or suspending determining a logic volume to be released, and acquiring a metadata object associated with the logic volume to be released.
In one embodiment of the application, the method further comprises: monitoring the volume mapping state; the volume mapping status monitoring includes: and monitoring whether the volume mapping is released or not by any one of the logic volumes to be released, and if the volume mapping is released by any one of the logic volumes to be released, returning a volume mapping release result to the client.
In one embodiment of the application, the monitoring whether the volume map removal has been completed by the any one of the logical volumes to be removed comprises: and detecting address information and path information of the metadata object based on the metadata object, and completing volume mapping when the address information and the path information of the metadata object are not detected.
In order to achieve the above object, the present application further proposes a second technical solution:
a volume mapping de-mapping apparatus applied to a distributed block storage system, the distributed block storage system including a client, an iscsi server and a storage device, the apparatus comprising: an initialization unit, configured to communicatively connect the client and the iscsi server, and register a logical volume of a latch to any storage node, so as to initialize a logical volume resource; the volume mapping removing unit is in communication connection with the initializing unit, and is used for determining a logical volume to be removed, obtaining a metadata object associated with the logical volume to be removed, sending a request to be deleted to a storage node corresponding to the logical volume to be removed based on the metadata object, and removing volume mapping by the storage node based on the request to be deleted.
In one embodiment of the application, the apparatus further comprises: the control unit is in communication connection with the volume mapping relieving unit and is used for acquiring storage nodes corresponding to the logical volumes to be relieved, and setting the logical volumes corresponding to the storage nodes to be in an offline state; the detection unit is in communication connection with the volume mapping relieving unit and is used for judging whether the logic volume has unreturned IO requests or not; if the logic volume has an unreturned IO request, a release calling function is set; if the logic volume does not have the unreturned IO request, calling the release calling function; the monitoring unit is respectively in communication connection with the initializing unit and the volume mapping relieving unit and is used for monitoring the state of the cluster.
In order to achieve the above object, the present application proposes a third technical solution:
a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of:
step S1, the client side and the iscsi server side are connected in a communication mode, and a logic volume of a latch in any storage node is registered;
s2, determining a logical volume to be relieved, and acquiring a metadata object associated with the logical volume to be relieved;
step S3, the metadata object sends a request to be deleted to a storage node which is arranged corresponding to the logical volume to be relieved;
and S4, the storage node releases the volume mapping based on the to-be-deleted request.
In order to achieve the above object, the present application proposes a fourth technical solution:
a computer-readable storage medium storing a program that, when executed by a processor, causes the processor to perform the steps of:
step S1, the client side and the iscsi server side are connected in a communication mode, and a logic volume of a latch in any storage node is registered;
s2, determining a logical volume to be relieved, and acquiring a metadata object associated with the logical volume to be relieved;
step S3, the metadata object sends a request to be deleted to a storage node which is arranged corresponding to the logical volume to be relieved;
and S4, the storage node releases the volume mapping based on the to-be-deleted request.
Compared with the prior art, the technical scheme of the application has the following advantages:
the application relates to a volume mapping de-mapping method, a device, equipment and a storage medium, wherein the method comprises the steps of initializing logical volume resources and de-mapping volumes; the initializing logical volume resources includes: the client is in communication connection with the iscsi server, and registers a logic volume of a latch in any storage node; the de-volume mapping includes: determining a logical volume to be relieved, and acquiring a metadata object associated with the logical volume to be relieved; the metadata object sends a request to be deleted to a storage node which is arranged corresponding to the logical volume to be relieved; the storage node de-maps the volume based on the request to be deleted. The volume mapping canceling method can realize the parallel execution of the volume mapping canceling operation among multiple storage nodes; on one hand, the operation thread of the volume mapping canceling method is a service thread of a system, and has the beneficial effect of reducing resource competition; on the other hand, the volume mapping canceling method has wide application range, most of the distributed book block storage systems can be matched with the volume mapping canceling method, and the usability and the reliability of the system can be effectively improved based on the volume mapping canceling method.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a method in one embodiment;
FIG. 2 is a flow chart of a method in one embodiment;
FIG. 3 is a block diagram of an apparatus in one embodiment;
fig. 4 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
Embodiment one:
the volume mapping canceling method of the present embodiment is applied to a distributed block memory system, and the method includes the following steps: the logical volume resources are initialized and the volume mapping is de-initialized. Initializing logical volume resources and de-volume mapping are performed by the master node. It should be appreciated that in creating the volume map, the master node configures the logical volume corresponding to any storage node to the cluster based on any storage node. The volume mapping canceling method of the present application is also based on the master node.
In one embodiment, the distributed block storage system includes a client, an iscsi server, and a storage device. It should be understood that the storage nodes and the storage devices in the present application are in a one-to-one correspondence, that is, in an actual distributed block storage system, the storage devices may be regarded as storage nodes.
In one embodiment, the initializing logical volume resources includes: the client is in communication connection with the iscsi server, and registers a logic volume of a latch in any storage node; the de-volume mapping includes: acquiring a logical volume metadata storage position, sending a message notification to a storage process corresponding to the logical volume metadata, and notifying an active path to release logical volume resources; and deleting the path configuration information after the logical volume resources are released successfully, namely when the connection information is empty. It should be understood that the master node and the storage node in the present application play roles of a manager and a managed in the whole system, and the master node may be defined as a super machine, any storage node may be defined as a normal machine, and the behavior of any storage node is controlled by the master node corresponding to the master node.
Specifically, sending a message notification to a storage process corresponding to the logical volume metadata, the notifying the active path to release the logical volume resource includes: the metadata object sends a broadcast request to be deleted to a storage process; and the storage process sends a request to be deleted to a storage node which is arranged corresponding to the logical volume to be relieved.
In one embodiment, when the active path receives information of releasing the logical volume resources, the logical volume resource releasing action is performed based on a thread where the corresponding logical volume is located, and the corresponding logical volume resources are marked as unavailable in the processing process, and whether the logical volume has an unreturned IO request is checked.
In one embodiment, if the logic volume has an unreturned IO request, a release calling function is set, the release calling function is processed based on the IO request, and if the IO request is processed, the release calling function is called; and if the logic volume does not have the unreturned IO request, calling the release calling function. The release call function is used for releasing the logic volume resources, and the release call function is set in the application, namely, the unreturned IO request exists in the logic volume, so that the release call function is set to call the release call function again to release the logic volume resources when the unreturned IO request does not exist in the logic volume.
Under a common scenario, the volume mapping needs to be removed from any storage node in the iscsi server to execute the corresponding volume mapping removal operation independently, firstly, the storage nodes needing to remove the volume mapping need to be confirmed, and secondly, the volume mapping removal operation is sequentially executed based on the storage nodes, so that the volume mapping removal process is very complicated, and under the condition that the number of the storage nodes is large, the execution efficiency is low, and the resource occupancy rate is increased. The volume mapping canceling method can realize the parallel canceling of the volume mapping of the multiple storage nodes, is realized based on service threads, and can achieve the beneficial effect of reducing resource competition.
Embodiment two:
referring to fig. 1, fig. 1 is a flowchart of a method according to a second embodiment.
The volume mapping canceling method of the present embodiment is applied to a distributed block storage system, where the distributed block storage system includes a client, an iscsi server and a storage device, and the volume mapping canceling method of the present embodiment includes the following steps: s1, initializing logical volume resources; s2, removing volume mapping.
In one embodiment, the initializing logical volume resources includes: and the client is in communication connection with the iscsi server, and registers a logic volume of a latch in any storage node. The de-volume mapping includes: determining a logical volume to be relieved, and acquiring a metadata object associated with the logical volume to be relieved; the metadata object sends a request to be deleted to a storage node which is arranged corresponding to the logical volume to be relieved; the storage node de-maps the volume based on the request to be deleted.
In one embodiment, the sending, by the metadata object, the to-be-deleted request to the storage node corresponding to the to-be-relieved logical volume includes: the metadata object sends a broadcast request to be deleted to a storage process; and the storage process sends a request to be deleted to a storage node which is arranged corresponding to the logical volume to be relieved.
In one embodiment, as shown in fig. 2, before the storage node de-maps the volume based on the to-be-deleted request, the storage node further includes: acquiring a storage node corresponding to the logical volume to be relieved, setting the logical volume corresponding to the storage node to be in an offline state, and judging whether the logical volume has an unreturned IO request or not; if the logic volume has an unreturned IO request, a release calling function is set; and if the logic volume does not have the unreturned IO request, calling the release calling function.
In one embodiment, the method further comprises: monitoring the state of a cluster, if the cluster is in a stable state, connecting the client and the iscsi server in a communication way, and registering a logic volume of a latch on any storage node, or determining a logic volume to be relieved, and acquiring a metadata object associated with the logic volume to be relieved; if the cluster is not in a stable state, suspending communication to connect the client and the iscsi server, and registering a logic volume of a latch on any storage node, or suspending determining a logic volume to be released, and acquiring a metadata object associated with the logic volume to be released.
In one embodiment, the volume mapping cancellation method further includes: monitoring the volume mapping state; the volume mapping status monitoring includes: and monitoring whether the volume mapping is released or not by any one of the logic volumes to be released, and if the volume mapping is released by any one of the logic volumes to be released, returning a volume mapping release result to the client.
In one embodiment, the monitoring whether the volume map removal has been completed by the any one of the logical volumes to be removed comprises: and detecting address information and path information of the metadata object based on the metadata object, and completing volume mapping when the address information and the path information of the metadata object are not detected.
It should be understood that, although the steps in the flowcharts of fig. 1-2 are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in fig. 1-2 may include multiple sub-steps or phases that are not necessarily performed at the same time, but may be performed at different times, nor does the order in which the sub-steps or phases are performed necessarily occur sequentially, but may be performed alternately or alternately with at least a portion of the sub-steps or phases of other steps or other steps.
Embodiment III:
referring to fig. 3, fig. 3 is a device configuration diagram of a third embodiment.
The apparatus of the present embodiment is applied to a distributed block storage system, where the distributed block storage system includes a client, an iscsi server and a storage device, and the apparatus of the present embodiment includes: an initialization unit, configured to communicatively connect the client and the iscsi server, and register a logical volume of a latch to any storage node, so as to initialize a logical volume resource; the volume mapping removing unit is in communication connection with the initializing unit, and is used for determining a logical volume to be removed, obtaining a metadata object associated with the logical volume to be removed, sending a request to be deleted to a storage node corresponding to the logical volume to be removed based on the metadata object, and removing volume mapping by the storage node based on the request to be deleted.
In one embodiment, the apparatus further comprises: the control unit is in communication connection with the volume mapping relieving unit and is used for acquiring storage nodes corresponding to the logical volumes to be relieved, and setting the logical volumes corresponding to the storage nodes to be in an offline state; the detection unit is in communication connection with the volume mapping relieving unit and is used for judging whether the logic volume has unreturned IO requests or not; if the logic volume has an unreturned IO request, a release calling function is set; and if the logic volume does not have the unreturned IO request, calling the release calling function.
In one embodiment, the apparatus further comprises: the monitoring unit is respectively in communication connection with the initializing unit and the volume mapping relieving unit and is used for monitoring the state of the cluster.
The specific limitation regarding the volume mapping releasing device may be referred to the limitation regarding the volume mapping releasing method hereinabove, and will not be repeated here. The respective modules in the volume map canceling apparatus described above may be implemented in whole or in part by software, hardware, or a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
Embodiment four:
in one embodiment, a computer device is provided, which may be a server, and the internal structure of which may be as shown in fig. 4. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used to store volume mapping data that has been unwound. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to perform the steps of:
step S1, the client side and the iscsi server side are connected in a communication mode, and a logic volume of a latch in any storage node is registered;
s2, determining a logical volume to be relieved, and acquiring a metadata object associated with the logical volume to be relieved;
step S3, the metadata object sends a request to be deleted to a storage node which is arranged corresponding to the logical volume to be relieved;
and S4, the storage node releases the volume mapping based on the to-be-deleted request.
In one embodiment, the processor when executing the computer program further performs the steps of:
the client is in communication connection with the iscsi server, and registers a logic volume of a latch in any storage node; determining a logical volume to be relieved, and acquiring a metadata object associated with the logical volume to be relieved; the metadata object sends a broadcast request to be deleted to a storage process; and the storage process sends a request to be deleted to a storage node which is arranged corresponding to the logical volume to be relieved.
In one embodiment, the processor when executing the computer program further performs the steps of: acquiring a storage node corresponding to the logical volume to be relieved, setting the logical volume corresponding to the storage node to be in an offline state, and judging whether the logical volume has an unreturned IO request or not; if the logic volume has an unreturned IO request, a release calling function is set; and if the logic volume does not have the unreturned IO request, calling the release calling function.
In one embodiment, the processor when executing the computer program further performs the steps of: monitoring the state of a cluster, if the cluster is in a stable state, connecting the client and the iscsi server in a communication way, and registering a logic volume of a latch on any storage node, or determining a logic volume to be relieved, and acquiring a metadata object associated with the logic volume to be relieved; if the cluster is not in a stable state, suspending communication to connect the client and the iscsi server, and registering a logic volume of a latch on any storage node, or suspending determining a logic volume to be released, and acquiring a metadata object associated with the logic volume to be released.
In one embodiment, the processor when executing the computer program further performs the steps of: and monitoring whether the volume mapping is released or not by any one of the logic volumes to be released, and if the volume mapping is released by any one of the logic volumes to be released, returning a volume mapping release result to the client.
In one embodiment, the processor when executing the computer program further performs the steps of: and detecting address information and path information of the metadata object based on the metadata object, and completing volume mapping when the address information and the path information of the metadata object are not detected.
It will be appreciated by persons skilled in the art that the architecture shown in fig. 4 is merely a block diagram of some of the architecture relevant to the present inventive arrangements and is not limiting as to the computer device to which the present inventive arrangements are applicable, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
Fifth embodiment:
the present embodiment provides a computer-readable storage medium storing a program which, when executed by a processor, implements the steps of:
step S1, the client side and the iscsi server side are connected in a communication mode, and a logic volume of a latch in any storage node is registered;
s2, determining a logical volume to be relieved, and acquiring a metadata object associated with the logical volume to be relieved;
step S3, the metadata object sends a request to be deleted to a storage node which is arranged corresponding to the logical volume to be relieved;
and S4, the storage node releases the volume mapping based on the to-be-deleted request.
In one embodiment, the following steps are implemented when a program is executed by a processor: the metadata object sends a broadcast request to be deleted to a storage process; and the storage process sends a request to be deleted to a storage node which is arranged corresponding to the logical volume to be relieved.
In one embodiment, the following steps are implemented when a program is executed by a processor: acquiring a storage node corresponding to the logical volume to be relieved, setting the logical volume corresponding to the storage node to be in an offline state, and judging whether the logical volume has an unreturned IO request or not; if the logic volume has an unreturned IO request, a release calling function is set; and if the logic volume does not have the unreturned IO request, calling the release calling function.
In one embodiment, the following steps are implemented when a program is executed by a processor: monitoring the state of a cluster, if the cluster is in a stable state, connecting the client and the iscsi server in a communication way, and registering a logic volume of a latch on any storage node, or determining a logic volume to be relieved, and acquiring a metadata object associated with the logic volume to be relieved; if the cluster is not in a stable state, suspending communication to connect the client and the iscsi server, and registering a logic volume of a latch on any storage node, or suspending determining a logic volume to be released, and acquiring a metadata object associated with the logic volume to be released.
In one embodiment, the following steps are implemented when a program is executed by a processor: and monitoring whether the volume mapping is released or not by any one of the logic volumes to be released, and if the volume mapping is released by any one of the logic volumes to be released, returning a volume mapping release result to the client.
In one embodiment, the following steps are implemented when a program is executed by a processor: and detecting address information and path information of the metadata object based on the metadata object, and completing volume mapping when the address information and the path information of the metadata object are not detected.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples illustrate only a few embodiments of the application, which are described in detail and are not to be construed as limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of protection of the present application is to be determined by the appended claims.
Claims (9)
1. The method is characterized by being applied to a distributed block memory system, wherein the distributed block memory system comprises a client, an iscsi server and a storage device, and comprises the following steps:
the client is in communication connection with the iscsi server, and registers a logic volume of a latch in any storage device;
determining a logical volume to be relieved, and acquiring a metadata object associated with the logical volume to be relieved;
the metadata object sends a request to be deleted to storage equipment which is arranged corresponding to the logical volume to be relieved;
the metadata object sending a to-be-deleted request to the storage device corresponding to the to-be-relieved logical volume includes:
the metadata object sends a broadcast request to be deleted to a storage process;
the storage process sends a request to be deleted to storage equipment which is arranged corresponding to the logical volume to be relieved;
the storage device de-maps the volume based on the to-be-deleted request.
2. The volume map canceling method according to claim 1, wherein said storage device, based on said request to be deleted, further comprises, before canceling volume map:
acquiring a storage device corresponding to the logical volume to be relieved, setting the logical volume corresponding to the storage device to be in an offline state, and judging whether an unreturned IO request exists in the logical volume or not;
if the logic volume has an unreturned IO request, a release calling function is set;
and if the logic volume does not have the unreturned IO request, calling the release calling function.
3. The volume map canceling method according to claim 1, characterized in that said method further comprises:
monitoring the state of a cluster, if the cluster is in a stable state, connecting the client and the iscsi server in a communication way, and registering a logic volume of a latch on any storage device, or determining a logic volume to be relieved, and acquiring a metadata object associated with the logic volume to be relieved;
if the cluster is not in a stable state, suspending communication to connect the client and the iscsi server, and registering a logic volume of a latch in any storage device, or suspending determining a logic volume to be released, and acquiring a metadata object associated with the logic volume to be released.
4. A volume map canceling method according to claim 1 or 3, characterized in that said method further comprises: monitoring the volume mapping state;
the volume mapping status monitoring includes: monitoring whether any logic volume to be released has completed volume mapping release, and if the logic volume to be released has completed volume mapping release, returning a volume mapping release result to the client.
5. The volume demapping method of claim 4, wherein monitoring whether any one of the logical volumes to be demapped has completed volume demapping comprises:
and detecting address information and path information of the metadata object based on the metadata object, and completing volume mapping when the address information and the path information of the metadata object are not detected.
6. A volume mapping de-apparatus, applied to a distributed block storage system, where the distributed block storage system includes a client, an iscsi server, and a storage device, the apparatus comprising:
the initialization unit is used for connecting the client side and the iscsi server side in a communication way, and registering a logic volume of a latch in any storage device so as to initialize logic volume resources;
the volume mapping removing unit is in communication connection with the initializing unit, and is used for determining a logical volume to be removed, acquiring a metadata object associated with the logical volume to be removed, sending a request to be deleted to a storage device corresponding to the logical volume to be removed based on the metadata object, and removing volume mapping by the storage device based on the request to be deleted;
the volume mapping relieving unit is specifically configured to send a broadcast request to be deleted to a storage process based on the metadata object; and the storage process sends a request to be deleted to a storage device which is arranged corresponding to the logical volume to be relieved.
7. The volume map canceling apparatus according to claim 6, characterized in that said apparatus further comprises:
the control unit is in communication connection with the volume mapping relieving unit and is used for acquiring a storage device which is arranged corresponding to the logical volume to be relieved and setting the logical volume corresponding to the storage device into an offline state;
the detection unit is in communication connection with the volume mapping relieving unit and is used for judging whether the logic volume has unreturned IO requests or not; if the logic volume has an unreturned IO request, a release calling function is set; if the logic volume does not have the unreturned IO request, calling the release calling function;
the monitoring unit is respectively in communication connection with the initializing unit and the volume mapping relieving unit and is used for monitoring the state of the cluster.
8. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any one of claims 1-5 when the computer program is executed by the processor.
9. A computer readable storage medium, wherein the computer readable storage medium stores a program which, when executed by a processor, causes the processor to perform the steps of the method according to any one of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210189950.8A CN114564153B (en) | 2022-02-28 | 2022-02-28 | Volume mapping relieving method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210189950.8A CN114564153B (en) | 2022-02-28 | 2022-02-28 | Volume mapping relieving method, device, equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114564153A CN114564153A (en) | 2022-05-31 |
CN114564153B true CN114564153B (en) | 2023-08-18 |
Family
ID=81716497
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210189950.8A Active CN114564153B (en) | 2022-02-28 | 2022-02-28 | Volume mapping relieving method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114564153B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115334000B (en) * | 2022-07-20 | 2023-08-11 | 苏州浪潮智能科技有限公司 | Data transmission method, device, equipment and medium based on multi-control storage system |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101097501A (en) * | 2006-06-29 | 2008-01-02 | 国际商业机器公司 | Method and system for repositioning logical volume |
CN101477444A (en) * | 2008-12-29 | 2009-07-08 | 成都市华为赛门铁克科技有限公司 | Virtual memory method and apparatus |
CN101840308A (en) * | 2009-10-28 | 2010-09-22 | 创新科存储技术有限公司 | Hierarchical memory system and logical volume management method thereof |
CN103180852A (en) * | 2012-08-09 | 2013-06-26 | 华为技术有限公司 | Distributed data processing method and apparatus |
US8972656B1 (en) * | 2012-09-28 | 2015-03-03 | Emc Corporation | Managing accesses to active-active mapped logical volumes |
CN112395264A (en) * | 2020-11-26 | 2021-02-23 | 深圳市杉岩数据技术有限公司 | Processing method for mapping between logical target and volume in distributed storage system |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010049522A (en) * | 2008-08-22 | 2010-03-04 | Hitachi Ltd | Computer system and method for managing logical volumes |
US9779003B2 (en) * | 2013-06-12 | 2017-10-03 | International Business Machines Corporation | Safely mapping and unmapping host SCSI volumes |
-
2022
- 2022-02-28 CN CN202210189950.8A patent/CN114564153B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101097501A (en) * | 2006-06-29 | 2008-01-02 | 国际商业机器公司 | Method and system for repositioning logical volume |
CN101477444A (en) * | 2008-12-29 | 2009-07-08 | 成都市华为赛门铁克科技有限公司 | Virtual memory method and apparatus |
CN101840308A (en) * | 2009-10-28 | 2010-09-22 | 创新科存储技术有限公司 | Hierarchical memory system and logical volume management method thereof |
CN103180852A (en) * | 2012-08-09 | 2013-06-26 | 华为技术有限公司 | Distributed data processing method and apparatus |
US8972656B1 (en) * | 2012-09-28 | 2015-03-03 | Emc Corporation | Managing accesses to active-active mapped logical volumes |
CN112395264A (en) * | 2020-11-26 | 2021-02-23 | 深圳市杉岩数据技术有限公司 | Processing method for mapping between logical target and volume in distributed storage system |
Also Published As
Publication number | Publication date |
---|---|
CN114564153A (en) | 2022-05-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109788068B (en) | Heartbeat state information reporting method, device and equipment and computer storage medium | |
EP3563525A1 (en) | Methods and devices for switching a virtual internet protocol address | |
CN115328663A (en) | Method, device, equipment and storage medium for scheduling resources based on PaaS platform | |
CN112052230B (en) | Multi-machine room data synchronization method, computing device and storage medium | |
WO2016177130A1 (en) | Method and device for selecting communication node | |
CN106034137A (en) | Intelligent scheduling method for distributed system, and distributed service system | |
CN111880956A (en) | Data synchronization method and device | |
US10243869B2 (en) | System and method for providing a distributed queue in a distributed data grid | |
CN111541762A (en) | Data processing method, management server, device and storage medium | |
CN114564153B (en) | Volume mapping relieving method, device, equipment and storage medium | |
CN111917588A (en) | Edge device management method, device, edge gateway device and storage medium | |
CN105205160A (en) | Data write-in method and device | |
CN112711606A (en) | Database access method and device, computer equipment and storage medium | |
CN104699527A (en) | Critical resource management method and device in cloud storage system | |
CN113254226B (en) | Asymmetric distributed lock system for asymmetric service scene and implementation method | |
CN106020975B (en) | Data operation method, device and system | |
CN110543357A (en) | Method, related device and system for managing application program object | |
CN117478299B (en) | Block chain consensus algorithm switching method, device and computer equipment | |
CN110928684B (en) | Method and system for realizing connection pool under multi-HiveServer 2 server scene | |
CN115334000B (en) | Data transmission method, device, equipment and medium based on multi-control storage system | |
CN114201117B (en) | Processing method and device for cache data, computer equipment and storage medium | |
CN114422333B (en) | Message consumption method and system based on message middleware back pressure | |
CN111953535B (en) | Network fault positioning method, terminal and storage medium | |
CN109376014B (en) | Distributed lock manager implementation method and system | |
CN118778876A (en) | Data transfer method, device, equipment and computer readable storage medium |
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 |