CN115309335A - Multi-port solid state disk management method, device, equipment and storage medium - Google Patents

Multi-port solid state disk management method, device, equipment and storage medium Download PDF

Info

Publication number
CN115309335A
CN115309335A CN202210937746.XA CN202210937746A CN115309335A CN 115309335 A CN115309335 A CN 115309335A CN 202210937746 A CN202210937746 A CN 202210937746A CN 115309335 A CN115309335 A CN 115309335A
Authority
CN
China
Prior art keywords
node
event
nodes
solid state
block
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210937746.XA
Other languages
Chinese (zh)
Inventor
黄正
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202210937746.XA priority Critical patent/CN115309335A/en
Publication of CN115309335A publication Critical patent/CN115309335A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • G06F16/275Synchronous replication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0614Improving the reliability of storage systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • Data Mining & Analysis (AREA)
  • Computing Systems (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application discloses a method, a device, equipment and a storage medium for managing a multi-port solid state disk, and relates to the field of solid state disk management. The method comprises the following steps: acquiring a block equipment state event reported by a storage performance development kit in the node; synchronizing the block device state event to other nodes in the system, so that each node in the system updates cluster hard disk devices used for system sharing access according to the block device state event, and synchronizes derived event information generated in the updating process to other nodes in the system; acquiring an operation instruction aiming at cluster hard disk equipment and sent by an application layer, and judging whether the node meets an operation execution condition; and if the operation execution condition is not met, executing corresponding operation on the multi-port solid state disk through the internal storage performance development kits of the rest nodes in the system according to the operation instruction. The performance of the storage performance development kit and the reliability value of multiple ports can be simultaneously exerted.

Description

Multi-port solid state disk management method, device, equipment and storage medium
Technical Field
The invention relates to the field of solid state disk management, in particular to a method, a device, equipment and a storage medium for multi-port solid state disk management.
Background
At present, in order to solve the disadvantage of single point failure of a single port hard disk, a multi-port hard disk is adopted, that is, a plurality of nodes (controllers with CPUs) in a storage system are all connected with the multi-port hard disk, so that when a certain node fails, services can be continuously provided through other nodes, thereby ensuring that services are not interrupted and realizing service redundancy. The SPDK (Storage Performance Development Kit) is a high Performance NVMe (NVM Express, non-volatile memory host controller interface specification) hard disk Development Kit, and the use Performance of the hard disk is improved by using new technologies such as thread lock-free, lock-bound and large page. However, the SPDK currently only supports single-port hard disks and does not support multi-port hard disks.
Disclosure of Invention
In view of the above, an object of the present invention is to provide a method, an apparatus, a device and a medium for managing a multi-port solid state disk, which can fully utilize the performance of a storage performance development kit and also can utilize the reliability value of multiple ports. The specific scheme is as follows:
in a first aspect, the present application discloses a method for managing a multi-port solid state disk, including:
acquiring a block equipment state event reported by a storage performance development kit in the node; the block equipment state event is a block equipment state change event corresponding to the multi-port solid state disk connected with the node;
synchronizing the block device state event to other nodes in the system, so that each node in the system updates cluster hard disk devices used for system sharing access according to the block device state event, and synchronizes derived event information generated in the updating process to other nodes in the system;
acquiring an operation instruction aiming at the cluster hard disk equipment and sent by an application layer, and judging whether the node meets an operation execution condition;
and if the operation execution condition is not met, executing corresponding operation on the multi-port solid state disk through the internal storage performance development kits of the other nodes in the system according to the operation instruction.
Optionally, the updating, according to the block device state event, the cluster hard disk device used for system sharing access, and synchronizing the derived event information generated in the updating process to the other nodes in the system includes:
updating cluster hard disk equipment used for system sharing access according to the block equipment state event, and generating an equipment updating derived event after the updating is finished; the block device state event comprises block device access, block device removal, block device failure and block device reset;
and synchronizing the equipment updating derived events to the rest nodes in the system so that each node in the system contains cluster hard disk equipment information of the rest nodes in the system.
Optionally, the executing, according to the operation instruction, corresponding operations on the multi-port solid state disk through the internal storage performance development kits of the other nodes in the system includes:
determining a target node according to the operation instruction and cluster hard disk device information of other nodes in the system stored by the node;
and sending the operation instruction to the target node so as to execute corresponding operation on the multi-port solid state disk through a memory performance development kit of the target node.
Optionally, the synchronizing the block device status event to the rest of the nodes in the system includes:
if the node is a main node in the system, synchronizing the block equipment state event to a local log, and broadcasting the block equipment state event to a slave node in the system so that the slave node updates respective logs according to the block equipment state event;
if the node is a slave node in the system, reporting the block equipment state event to a master node in the system, synchronizing the block equipment state event to a log of the master node in the system, and broadcasting the block equipment state event to the slave node in the system so that the slave node updates the respective log according to the block equipment state event.
Optionally, the method for managing a multi-port solid state disk further includes:
after the node is started, temporarily defaulting the node to be a slave node, and starting a lease timer;
if lease information sent by the main node is acquired within a lease period corresponding to the lease timer, setting the node type as a slave node;
if the lease information sent by the main node is not acquired within the lease period corresponding to the lease timer, initiating an arbitration information acquisition request to an arbitration disk of the multi-port solid state disk;
and if the arbitration information sent by the arbitration disk is acquired, setting the node type as a main node.
Optionally, after determining whether the node meets the operation execution condition, the method further includes:
and if the operation execution condition is met, executing corresponding operation on the multi-port solid state disk through the storage performance development kit in the node according to the operation instruction.
Optionally, the determining whether the node meets the operation execution condition includes:
judging whether a communication link between the storage performance development kit and the multi-port solid state disk in the node has a fault or not;
if the fault exists, the node is judged to be not in accordance with the operation execution condition, otherwise, the node is judged to be in accordance with the operation execution condition.
In a second aspect, the present application discloses a multi-port solid state disk management device, including:
the event acquisition module is used for acquiring a block device state event reported by a storage performance development suite in the node; the block equipment state event is a block equipment state change event corresponding to the multi-port solid state disk connected with the node;
the event synchronization module is used for synchronizing the block device state event to other nodes in the system so that each node in the system can update cluster hard disk devices used for system sharing access according to the block device state event and synchronize derived event information generated in the updating process to other nodes in the system;
the instruction acquisition module is used for acquiring an operation instruction which is sent by an application layer and aims at the cluster hard disk equipment and judging whether the node meets an operation execution condition or not;
and the instruction execution module is used for executing corresponding operation on the multi-port solid state disk through the internal storage performance development kits of other nodes in the system according to the operation instruction if the operation execution condition is not met.
In a third aspect, the present application discloses an electronic device, comprising:
a memory for storing a computer program;
and the processor is used for executing the computer program to realize the multi-port solid state disk management method.
In a fourth aspect, the present application discloses a computer readable storage medium for storing a computer program; wherein the computer program realizes the multi-port solid state disk management method when being executed by a processor.
In the method, a block device state event reported by a storage performance development suite in a node is acquired; the block equipment state event is a block equipment state change event corresponding to the multi-port solid state disk connected with the node; synchronizing the block device state event to other nodes in the system, so that each node in the system updates cluster hard disk devices used for system sharing access according to the block device state event, and synchronizes derived event information generated in the updating process to other nodes in the system; acquiring an operation instruction aiming at the cluster hard disk equipment and sent by an application layer, and judging whether the node meets an operation execution condition; and if the operation execution condition is not met, executing corresponding operation on the multi-port solid state disk through the internal storage performance development kits of the other nodes in the system according to the operation instruction. Therefore, according to the block device state events reported by the storage performance development kit, a cluster hard disk device object used for system shared access is created and updated in real time, the node event is synchronized to the rest nodes in the system, cluster hard disk device information of the rest nodes is stored in any node in the system, consistency of the node events among different nodes is achieved, after an operation instruction of an application layer for the cluster hard disk device is obtained, if the node cannot execute the operation instruction, corresponding operation is executed on the multi-port solid state disk through the storage performance development kit of the rest nodes in the system according to the operation instruction, and therefore the use scene of the storage performance development kit is expanded to the multi-port solid state disk, performance of the storage performance development kit can be fully played, and reliability value of the multi-port can be played.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a flowchart of a multi-port solid state disk management method provided in the present application;
fig. 2 is a specific dual-port solid state disk management architecture diagram provided in the present application;
FIG. 3 is a flowchart illustrating a specific inter-node log synchronization process provided herein;
FIG. 4 is a specific cluster hard disk device assembly structure provided in the present application;
FIG. 5 is a flow chart illustrating message transmission among subcomponents within a particular cluster hard disk device assembly, according to the present disclosure;
FIG. 6 is a flow chart illustrating a specific state jump of a state machine according to the present application;
FIG. 7 is a schematic structural diagram of a specific control page component provided in the present application;
FIG. 8 is a block diagram illustrating a specific data page component according to the present application;
FIG. 9 is a schematic structural diagram of a multi-port solid state disk management apparatus according to the present application;
fig. 10 is a block diagram of an electronic device provided in the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the prior art, the SPDK only supports a single-port hard disk and does not support a multi-port hard disk, and in order to overcome the technical problems, the application provides a dual-port NVMe hard disk management method based on a storage performance development kit, which can fully exert the performance of the storage performance development kit and also exert the reliability value of the multi-port.
The embodiment of the application discloses a method for managing a multi-port solid state disk, which can comprise the following steps as shown in figure 1:
step S11: acquiring a block equipment state event reported by a storage performance development kit in the node; and the block equipment state event is a block equipment state change event corresponding to the multi-port solid state disk connected with the node.
First, a dual-port solid state disk management architecture shown in fig. 2 is used for explanation, a block device component (bdev component), a link transport layer (NVMe host transport) and a user dynamic driver (PCIe user driver) in a storage performance development kit in fig. 2 are components currently included in the SPDK, where a cluster hard disk device component (cdev, cluster dev) is newly added in this embodiment, and the multi-port solid state disk management method disclosed in this embodiment is integrated into the above cluster hard disk device component, that is, the cluster hard disk device component has a characteristic of 2-node shared access, and provides redundant hard disk devices for services (apps). The dual-port solid state disk can be specifically an NVMe solid state disk.
In this embodiment, a block device state event reported by a block device component of a storage performance development suite in a node is first obtained, where the block device state event is a block device state change event corresponding to a multi-port solid state disk connected to the node, and the block device state event includes, but is not limited to, a block device access event, a block device removal event, a block device failure event, a block device reset event, and the like, that is, when the block device component detects that a block device connected to the local node changes, the corresponding block device state event is reported to the cluster hard disk device component.
Step S12: and synchronizing the block device state event to other nodes in the system, so that each node in the system updates cluster hard disk devices used for system shared access according to the block device state event, and synchronizes derived event information generated in the updating process to other nodes in the system.
After receiving the block device state event, the node synchronizes the event through the cluster hard disk device components of the node and the other nodes, so that each node in the system creates or deletes the cluster hard disk device object supporting system shared access according to the block device state event, and synchronizes the generated derived event to the other nodes in the update process of the cluster hard disk device, thereby realizing the consistency of the cluster hard disk device states in different nodes. If yes, after all nodes of the system receive the creation event, creating cluster hard disk devices, namely, creating cluster hard disk devices corresponding to the block devices if sharing is supported according to whether the accessed block devices support system sharing; specifically, after the hard disk is accessed, PCIE interruption is generated, the SPDK determines address information of the hard disk, basic information (manufacturer, capacity, and other information) of the hard disk is acquired according to an NVMe protocol used by the hard disk, the block device component creates a corresponding block device object according to the information corresponding to the hard disk, and reports the block device object based on the created block device object to the cluster hard disk device component of the node, and broadcasts the block device object to all nodes through the master node, so that each node creates a corresponding cluster hard disk device object.
In this embodiment, the synchronizing the block device state event to the rest of the nodes in the system may include: if the node is a main node in the system, synchronizing the block equipment state event to a local log, and broadcasting the block equipment state event to a slave node in the system so that the slave node updates respective logs according to the block equipment state event; if the node is a slave node in the system, reporting the block equipment state event to a master node in the system, synchronizing the block equipment state event to a log of the master node in the system, and broadcasting the block equipment state event to the slave nodes in the system so that the slave nodes update respective logs according to the block equipment state event. The sending logic of the event adopts the sequence of log (log) as shown in fig. 3 to send in turn, the master node (master) sends the event, the slave node (slave) responds, namely the master node sends the event to the master node, the master node adds the event to the event log (log) after receiving the event, and the master node sends the event to the slave node; and if the message of the slave node fails, the lease can be over-term, and after the lease is over, the slave node can be kicked out of the cluster and restart the node. If the slave node is successfully sent, the slave node records the event into the event log of the slave node and keeps consistent with the master node.
In this embodiment, the method for managing a multi-port solid state disk may further include: after the node is started, temporarily defaulting the node to be a slave node, and starting a lease timer; if lease information sent by the master node is acquired within a lease period corresponding to the lease timer, setting the node type as a slave node; if the lease information sent by the main node is not acquired within the lease period corresponding to the lease timer, initiating an arbitration information acquisition request to an arbitration disk of the multi-port solid state disk; and if the arbitration information sent by the arbitration disk is acquired, setting the node type as a main node. The arbitration disk is mutually exclusive, only one node can simultaneously acquire arbitration information and determine a master node in the system, specifically, the node is set as a slave node after the node, and a lease timer is started so as to periodically acquire master node information.
In this embodiment, the updating, according to the block device state event, the cluster hard disk device used for system sharing access, and synchronizing the derived event information generated in the updating process to the other nodes in the system may include: updating cluster hard disk equipment used for system sharing access according to the block equipment state event, and generating an equipment updating derived event after the updating is finished; the block equipment state event comprises block equipment access, block equipment removal, block equipment failure and block equipment reset; and synchronizing the equipment updating derived events to the rest nodes in the system so that each node in the system contains cluster hard disk equipment information of the rest nodes in the system.
Step S13: and acquiring an operation instruction aiming at the cluster hard disk equipment and sent by an application layer, and judging whether the node meets the operation execution condition.
In this embodiment, after the cluster hard disk device object is created, the cluster hard disk device component receives an application layer, that is, an operation instruction sent by a user and directed to the cluster hard disk device, where the operation instruction includes, but is not limited to, a partition area, a file system creation, a power-on event, a power-off event, and other hardware events, and meanwhile, determines whether the node meets an operation execution condition, that is, whether the operation instruction can be executed.
In this embodiment, the determining whether the node meets the operation execution condition may include: judging whether a communication link between the storage performance development kit and the multi-port solid state disk in the node has a fault or not; if the fault exists, the node is judged to be not in accordance with the operation execution condition, otherwise, the node is judged to be in accordance with the operation execution condition. That is, whether a communication link between the node and the multi-port solid state disk has a fault is determined, and currently, the current load capacity of the node can also be used as one of the operation execution conditions, that is, if the current node has an excessive load, other nodes can be selected to execute the operation.
Step S14: and if the operation instruction does not meet the operation execution condition, executing corresponding operation on the multi-port solid state disk through the memory performance development kits of the rest nodes in the system according to the operation instruction.
When the operation execution conditions are not met, the cluster hard disk device assembly of the node communicates with the cluster hard disk device assembly of the other node, and the corresponding operation is executed on the multi-port solid state disk by utilizing the internal storage performance development kits of the other nodes.
In this embodiment, after determining whether the node meets the operation execution condition, the method may further include: and if the operation execution condition is met, executing corresponding operation on the multi-port solid state disk through the storage performance development kit in the node according to the operation instruction. If the node can execute the operation, the node executes the operation first, so that the consumption caused by the operation such as instruction forwarding and the like is avoided.
In this embodiment, the executing, according to the operation instruction, corresponding operations on the multi-port solid state disk through the internal storage performance development kits of the other nodes in the system may include: determining a target node according to the operation instruction and cluster hard disk device information of other nodes in the system stored by the node; and sending the operation instruction to the target node so as to execute corresponding operation on the multi-port solid state disk through a memory performance development kit of the target node. The method comprises the steps that an access path for accessing the current target storage through other nodes is determined according to cluster hard disk device information of the other nodes stored in a data layer of the node, and then an operation instruction is sent to a target node through cluster hard disk device components of the node and the target node, so that the target node executes corresponding operation on a multi-port solid state disk through a self-internal storage performance development kit. That is to say, each node can access its corresponding block device through the SPDK, but the block devices accessed by different nodes are all the same hard disk as seen from the physical medium, but for the block device component, IO reading can only be performed at its own node, and therefore, in this embodiment, by constructing the cluster hard disk device component, the cluster hard disk device component of a certain node can perform IO reading on the physical medium through other nodes.
Further, the present application discloses a specific cluster hard disk device component structure, for example, as shown in fig. 4, the specific cluster hard disk device component structure may specifically include four sub-components, where a state machine (cdev _ state _ machine) is responsible for conversion processing of a cdev state, a cluster event processing component (cluster _ event _ machine) is responsible for processing of a cluster event reported by bdev, and a control plane (cdev ctrl plane) is responsible for processing of creation, deletion, hot plug, and the like of a cdev device; the data plane (cdev data plane) is responsible for cdev IO command processing. As shown in fig. 5, after bdev is created, a block device state event, such as a block device access event, is sent to indicate that a bdev device has access. The cluster processing component sends the event to the cluster processing component of the 2 nd node of the system through a consistency protocol, the node calls a state machine to process the event after receiving the event, and the state machine is responsible for consistency of the cdev states of the 2 nodes of the system by sending a derived event. For example, fig. 6 shows a state jump schematic diagram of a state machine, where INIT represents that a cdev state machine registers a cluster event machine event response (respond) interface, REPORT _ IN represents a bdev reporting device access event, REPORT _ OUT represents a bdev reporting device removal event, FAULT represents a bdev reporting device failure event, and RESERTING represents a bdev reporting device reset event. For example, when the cdev state machine is initialized, the state is transferred to the INIT state, and an event response interface is registered; receiving a device access event reported by bdev, and sending a cdev derived cluster creating event to all nodes of the system; after all nodes of the system receive the creation event, cdev equipment is created; after all nodes create cdev equipment, sending equipment update (update) derived events; after all nodes receive the update event, sending the cdev event of the node to an update cluster event; and updating the cdev equipment information by all the nodes, wherein the cdev comprises the cdev information of other nodes, such as path information and the like after the implementation of the step.
For example, a specific structural diagram of a control page component shown in fig. 7 includes a cdev cluster event interface (cdev event), a cdev device management (cdev managed) for device creation, deletion, and failure, a cdev hdm for hardware device management (cdev hdm) for hardware information query, point-to-point and reset, and a cdev device health monitoring (cdev hm) for routing inspection and failure prediction. Namely, the cdev event registers an event interface to a cluster event machine, after a secondary derivative event generated by a state machine is received, the cdev management is responsible for managing cdev equipment, and if a hardware event aiming at the cdev and issued by an application layer is received, a cdev hdm component is called for processing; the cdev equipment is initialized, and the cdev hm module starts a background health management function. For example, fig. 8 is a schematic structural diagram of a specific data page component, which includes an IO Device (IO Device) corresponding to cdev and used for registering IO operation and IO blocking information; an IO error processing module (IO erp), an IO statistical module (IO stat) and an IO channel (IO channel). It can be understood that, after the cdev IO device receives the corresponding IO request (read, write), the IO device hangs the IO to the corresponding IO channel, the poll group of the IO channel is performed, if the IO returns an error, the IO erp is performed according to a preset error policy, that is, the IO is accessed through the rest of nodes, and the IO statistical information in the IO stat is updated after the IO is completed. That is to say, an application layer operation instruction received by the node is issued to the data plane through the control plane, an access path is determined by using the data plane, if the node supports direct access, the node directly accesses the data plane, and if the node does not support access, a target node is determined according to recorded cluster hard disk device information of other nodes, and the request is forwarded to the data plane of the target node. Therefore, the cluster hard disk device components which are pre-established on the upper layer of the SDPK between different nodes are used for carrying out communication among the components, and information synchronization and access among the components are realized.
As can be seen from the above, in this embodiment, the block device state event reported by the storage performance development kit in the node is obtained; the block equipment state event is a block equipment state change event corresponding to the multi-port solid state disk connected with the node; synchronizing the block device state event to other nodes in the system, so that each node in the system updates cluster hard disk devices used for system sharing access according to the block device state event, and synchronizes derived event information generated in the updating process to other nodes in the system; acquiring an operation instruction aiming at the cluster hard disk equipment and sent by an application layer, and judging whether the node meets an operation execution condition; and if the operation execution condition is not met, executing corresponding operation on the multi-port solid state disk through the internal storage performance development kits of the other nodes in the system according to the operation instruction. Therefore, according to the block device state events reported by the storage performance development kit, a cluster hard disk device object used for system shared access is created and updated in real time, the node event is synchronized to the rest nodes in the system, cluster hard disk device information of the rest nodes is stored in any node in the system, consistency of the node events among different nodes is achieved, after an operation instruction of an application layer for the cluster hard disk device is obtained, if the node cannot execute the operation instruction, corresponding operation is executed on the multi-port solid state disk through the storage performance development kit of the rest nodes in the system according to the operation instruction, and therefore the use scene of the storage performance development kit is expanded to the multi-port solid state disk, performance of the storage performance development kit can be fully played, and reliability value of the multi-port can be played.
Correspondingly, an embodiment of the present application further discloses a multi-port solid state disk management device, as shown in fig. 9, the device includes:
an event obtaining module 11, configured to obtain a block device state event reported by a storage performance development kit in the node; the block equipment state event is a block equipment state change event corresponding to the multi-port solid state disk connected with the node;
an event synchronization module 12, configured to synchronize the block device state event to the other nodes in the system, so that each node in the system updates, according to the block device state event, a cluster hard disk device used for system sharing access, and synchronizes derived event information generated in an updating process to the other nodes in the system;
the instruction obtaining module 13 is configured to obtain an operation instruction, which is sent by an application layer and is for the cluster hard disk device, and determine whether the node meets an operation execution condition;
and the instruction execution module 14 is configured to, if the operation execution condition is not met, execute a corresponding operation on the multi-port solid state disk through the memory performance development kit of the other nodes in the system according to the operation instruction.
As can be seen from the above, in this embodiment, the block device state event reported by the storage performance development kit in the node is obtained; the block device state event is a block device state change event corresponding to the multi-port solid state disk connected with the node; synchronizing the block device state event to other nodes in the system, so that each node in the system updates cluster hard disk devices used for system sharing access according to the block device state event, and synchronizes derived event information generated in the updating process to other nodes in the system; acquiring an operation instruction aiming at the cluster hard disk equipment and sent by an application layer, and judging whether the node meets an operation execution condition; and if the operation instruction does not meet the operation execution condition, executing corresponding operation on the multi-port solid state disk through the memory performance development kits of the rest nodes in the system according to the operation instruction. Therefore, according to the block device state events reported by the storage performance development kit, a cluster hard disk device object used for system shared access is created and updated in real time, the node event is synchronized to the rest nodes in the system, cluster hard disk device information of the rest nodes is stored in any node in the system, consistency of the node events among different nodes is achieved, after an operation instruction of an application layer for the cluster hard disk device is obtained, if the node cannot execute the operation instruction, corresponding operation is executed on the multi-port solid state disk through the storage performance development kit of the rest nodes in the system according to the operation instruction, and therefore the use scene of the storage performance development kit is expanded to the multi-port solid state disk, performance of the storage performance development kit can be fully played, and reliability value of the multi-port can be played.
In some specific embodiments, the event synchronization module 12 may specifically include:
the updating unit is used for updating cluster hard disk equipment used for system sharing access according to the block equipment state event and generating an equipment updating derived event after the updating is finished; the block device state event comprises block device access, block device removal, block device failure and block device reset;
and the derived event synchronization unit is used for synchronizing the equipment updating derived events to other nodes in the system, so that each node in the system contains cluster hard disk equipment information of other nodes in the system.
In some specific embodiments, the instruction execution module 14 may specifically include:
the target node determining unit is used for determining a target node according to the operation instruction and cluster hard disk device information of other nodes in the system stored by the node;
and the operation execution unit is used for sending the operation instruction to the target node so as to execute corresponding operation on the multi-port solid state disk through the internal storage performance development suite of the target node.
In some specific embodiments, the event synchronization module 12 may specifically include:
a first event synchronization unit, configured to synchronize the block device state event to a local log if the node is a master node in the system, and broadcast the block device state event to slave nodes in the system, so that the slave nodes update their respective logs according to the block device state event;
and a second event synchronization unit, configured to report the block device state event to a master node in the system if the node is a slave node in the system, where the master node in the system synchronizes the block device state event to its own log, and broadcasts the block device state event to the slave nodes in the system, so that the slave nodes update their respective logs according to the block device state event.
In some specific embodiments, the multi-port solid state disk management apparatus may specifically include:
the timer starting unit is used for temporarily defaulting the node to be a slave node after the node is started and starting a lease timer;
a lease information obtaining unit, configured to set a node type as a slave node if lease information sent by the master node is obtained within a lease period corresponding to the lease timer;
the arbitration information request unit is used for initiating an arbitration information acquisition request to an arbitration disk of the multi-port solid state disk if lease information sent by the main node is not acquired within a lease period corresponding to the lease timer;
and the arbitration information acquisition unit is used for setting the node type as a main node if acquiring the arbitration information sent by the arbitration disk.
In some specific embodiments, the multi-port solid state disk management apparatus may specifically include:
and the local instruction execution unit is used for executing corresponding operation on the multi-port solid state disk through the storage performance development kit in the node according to the operation instruction if the operation execution condition is met.
In some specific embodiments, the instruction obtaining module 13 may specifically include:
the fault judgment unit is used for judging whether a communication link between the storage performance development kit and the multi-port solid state disk in the node has a fault or not;
and the operation execution condition judging unit is used for judging that the node does not accord with the operation execution condition if the fault exists, and otherwise, judging that the node accords with the operation execution condition.
Further, the embodiment of the present application also discloses an electronic device, which is shown in fig. 10, and the content in the drawing cannot be considered as any limitation to the application scope.
Fig. 10 is a schematic structural diagram of an electronic device 20 according to an embodiment of the present disclosure. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input output interface 25, and a communication bus 26. The memory 22 is configured to store a computer program, and the computer program is loaded and executed by the processor 21 to implement relevant steps in the multi-port solid state disk management method disclosed in any of the foregoing embodiments.
In this embodiment, the power supply 23 is configured to provide a working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and an external device, and a communication protocol followed by the communication interface is any communication protocol applicable to the technical solution of the present application, and is not specifically limited herein; the input/output interface 25 is configured to acquire external input data or output data to the outside, and a specific interface type thereof may be selected according to specific application requirements, which is not specifically limited herein.
In addition, the storage 22 is used as a carrier for resource storage, and may be a read-only memory, a random access memory, a magnetic disk or an optical disk, etc., and the resources stored thereon include an operating system 221, a computer program 222, data 223 including a block device state event, etc., and the storage may be a transient storage or a permanent storage.
The operating system 221 is used for managing and controlling each hardware device and the computer program 222 on the electronic device 20, so as to realize the operation and processing of the mass data 223 in the memory 22 by the processor 21, and may be Windows Server, netware, unix, linux, and the like. The computer programs 222 may further include computer programs that can be used to perform other specific tasks in addition to the computer programs that can be used to perform the multi-port solid state disk management method performed by the electronic device 20 disclosed in any of the foregoing embodiments.
Further, an embodiment of the present application further discloses a computer storage medium, where computer-executable instructions are stored in the computer storage medium, and when the computer-executable instructions are loaded and executed by a processor, the steps of the multi-port solid state disk management method disclosed in any of the foregoing embodiments are implemented.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or apparatus that comprises the element.
The method, the device, the equipment and the medium for managing the multi-port solid state disk provided by the invention are described in detail, specific examples are applied to explain the principle and the implementation mode of the invention, and the description of the embodiments is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A multi-port solid state disk management method is applied to nodes in a system and comprises the following steps:
acquiring a block equipment state event reported by a storage performance development kit in the node; the block equipment state event is a block equipment state change event corresponding to the multi-port solid state disk connected with the node;
synchronizing the block device state event to other nodes in the system, so that each node in the system updates cluster hard disk devices used for system shared access according to the block device state event, and synchronizing derivative event information generated in the updating process to other nodes in the system;
acquiring an operation instruction aiming at the cluster hard disk equipment and sent by an application layer, and judging whether the node meets an operation execution condition;
and if the operation execution condition is not met, executing corresponding operation on the multi-port solid state disk through the internal storage performance development kits of the other nodes in the system according to the operation instruction.
2. The method for multi-port solid state disk management according to claim 1, wherein the updating cluster hard disk devices for system shared access according to the block device state event and synchronizing derivative event information generated in the updating process to the rest of nodes in the system comprises:
updating cluster hard disk equipment used for system sharing access according to the block equipment state event, and generating an equipment updating derived event after the updating is finished; the block equipment state event comprises block equipment access, block equipment removal, block equipment failure and block equipment reset;
and synchronizing the equipment updating derived events to the rest nodes in the system so that each node in the system contains cluster hard disk equipment information of the rest nodes in the system.
3. The method for managing the multi-port solid state disk according to claim 2, wherein the executing the corresponding operation on the multi-port solid state disk through the internal storage performance development kit of the rest nodes in the system according to the operation instruction comprises:
determining a target node according to the operation instruction and cluster hard disk device information of other nodes in the system stored by the node;
and sending the operation instruction to the target node so as to execute corresponding operation on the multi-port solid state disk through a memory performance development kit of the target node.
4. The method for multi-port solid state disk management according to claim 1, wherein the synchronizing the block device status event to the rest of the nodes in the system comprises:
if the node is a master node in the system, synchronizing the block equipment state event to a local log, and broadcasting the block equipment state event to slave nodes in the system so that the slave nodes update respective logs according to the block equipment state event;
if the node is a slave node in the system, reporting the block equipment state event to a master node in the system, synchronizing the block equipment state event to a log of the master node in the system, and broadcasting the block equipment state event to the slave node in the system so that the slave node updates the respective log according to the block equipment state event.
5. The multi-port solid state disk management method according to claim 4, further comprising:
after the node is started, temporarily defaulting the node to be a slave node, and starting a lease timer;
if lease information sent by the main node is acquired within a lease period corresponding to the lease timer, setting the node type as a slave node;
if the lease information sent by the main node is not acquired within the lease period corresponding to the lease timer, initiating an arbitration information acquisition request to an arbitration disk of the multi-port solid state disk;
and if the arbitration information sent by the arbitration disk is acquired, setting the node type as a main node.
6. The method for managing a multi-port solid state disk according to claim 1, wherein after determining whether the node meets the operation execution condition, the method further comprises:
and if the operation execution condition is met, executing corresponding operation on the multi-port solid state disk through the storage performance development suite in the node according to the operation instruction.
7. The method for managing the multi-port solid state disk according to any one of claims 1 to 6, wherein the determining whether the node meets the operation execution condition includes:
judging whether a communication link between the storage performance development kit and the multi-port solid state disk in the node has a fault or not;
if the fault exists, the node is judged to be not in accordance with the operation execution condition, otherwise, the node is judged to be in accordance with the operation execution condition.
8. A multi-port solid state disk management device is applied to nodes in a system and comprises the following components:
the event acquisition module is used for acquiring a block device state event reported by a storage performance development suite in the node; the block equipment state event is a block equipment state change event corresponding to the multi-port solid state disk connected with the node;
the event synchronization module is used for synchronizing the block device state event to other nodes in the system so that each node in the system can update cluster hard disk devices used for system sharing access according to the block device state event and synchronize derived event information generated in the updating process to other nodes in the system;
the instruction acquisition module is used for acquiring an operation instruction which is sent by an application layer and aims at the cluster hard disk equipment and judging whether the node meets an operation execution condition or not;
and the instruction execution module is used for executing corresponding operation on the multi-port solid state disk through the internal storage performance development kits of other nodes in the system according to the operation instruction if the operation execution condition is not met.
9. An electronic device, comprising:
a memory for storing a computer program;
a processor for executing the computer program to implement the multi-port solid state disk management method according to any one of claims 1 to 7.
10. A computer-readable storage medium for storing a computer program; the multi-port solid state disk management method according to any one of claims 1 to 7, wherein the computer program is executed by a processor.
CN202210937746.XA 2022-08-05 2022-08-05 Multi-port solid state disk management method, device, equipment and storage medium Pending CN115309335A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210937746.XA CN115309335A (en) 2022-08-05 2022-08-05 Multi-port solid state disk management method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210937746.XA CN115309335A (en) 2022-08-05 2022-08-05 Multi-port solid state disk management method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115309335A true CN115309335A (en) 2022-11-08

Family

ID=83860687

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210937746.XA Pending CN115309335A (en) 2022-08-05 2022-08-05 Multi-port solid state disk management method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115309335A (en)

Similar Documents

Publication Publication Date Title
CN109347675B (en) Server configuration method and device and electronic equipment
WO2017162173A1 (en) Method and device for establishing connection of cloud server cluster
US7840662B1 (en) Dynamically managing a network cluster
US20150106822A1 (en) Method and system for supporting resource isolation in multi-core architecture
WO2019119212A1 (en) Method and device for identifying osd sub-health, and data storage system
CN111917846A (en) Kafka cluster switching method, device and system, electronic equipment and readable storage medium
CN110597910A (en) Remote data synchronization method, device and system
US11445013B2 (en) Method for changing member in distributed system and distributed system
CN110888889A (en) Data information updating method, device and equipment
CN111049928A (en) Data synchronization method, system, electronic device and computer readable storage medium
US7499987B2 (en) Deterministically electing an active node
CN114064414A (en) High-availability cluster state monitoring method and system
CN112052230A (en) Multi-machine room data synchronization method, computing equipment and storage medium
CN113434340B (en) Server and cache cluster fault rapid recovery method
US20240054054A1 (en) Data Backup Method and System, and Related Device
CN113746641A (en) ODX protocol processing method based on distributed storage
CN104052799A (en) Method for achieving high availability storage through resource rings
US20170046304A1 (en) Computing system management using shared memory
CN112052104A (en) Message queue management method based on multi-computer-room realization and electronic equipment
CN115470303B (en) Database access method, device, system, equipment and readable storage medium
CN115309335A (en) Multi-port solid state disk management method, device, equipment and storage medium
CN113596195B (en) Public IP address management method, device, main node and storage medium
CN111208949B (en) Method for determining data rollback time period in distributed storage system
CN108614873B (en) Data processing method and device
CN109150941B (en) Data center physical resource floating method

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