Hard disk firmware upgrading method and device, storage medium and electronic equipment

By obtaining the status information of the hard disk firmware in the distributed storage system, determining the target hard disk firmware and upgrading it online one by one in its idle state, the problems of input/output blockage and risk during the hard disk firmware upgrade process are solved, and efficient and safe upgrade effect.

CN119025141APending Publication Date: 2024-11-26INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411170697.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-23
Publication Date
2024-11-26

AI Technical Summary

Technical Problem

In distributed storage systems, the upgrade of hard disk firmware is ineffective in responding to input/output, resulting in blockage. The existing technology adopts closing nodes to upgrade, which has a long upgrade time and high risk.

Method used

By obtaining the operating status of the distributed storage cluster and the read and write status information of the hard disk firmware, when the target hard disk firmware is in a normal state and is in an upgraded state, write its identifier to the list to be upgraded, and the hard disk firmware is in an idle state in the order of the list. When upgrading online one by one.

Benefits of technology

Ensure the normal operation of other hard disk firmware and distributed storage clusters during the upgrade process, and achieve efficient and secure hard disk firmware upgrades.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119025141A_ABST
    Figure CN119025141A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a hard disk firmware upgrading method and device, a storage medium and electronic device.The method comprises the steps that first running state information of a distributed storage cluster and read-write state information of each hard disk firmware are obtained, and multiple pieces of read-write state information are obtained; detecting multiple pieces of read-write state information under the condition that the distributed storage cluster is determined to be in a normal operation state based on the first operation state information, so as to determine target read-write state information from the multiple pieces of read-write state information; when it is determined that the current firmware version of the target hard disk firmware is in a to-be-upgraded state, writing a target firmware identifier of the target hard disk firmware into a to-be-upgraded list; and when the target hard disk firmware is in an idle state, upgrading the current firmware version of the target hard disk firmware according to the storage sequence of the target firmware identifier in the to-be-upgraded list. Through the method and the device, the problem that hard disk firmware cannot be efficiently and safely upgraded in related technologies can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the computer field, and specifically, to a hard disk firmware upgrade method and device, a storage medium, and an electronic device. Background Art

[0002] With the rapid development of cutting-edge technologies such as cloud computing, big data, and artificial intelligence, distributed storage is increasingly used as a scenario for storing massive data. The amount of stored data is increasing, and the number of hard disk firmware used is increasing, which places higher requirements on the stability of hard disk firmware. When the hard disk firmware is upgraded in time to improve the stability of the hard disk firmware, there is a situation where the input / output in the distributed storage system cannot respond, resulting in a large amount of input / output being blocked. The related technology uses manual shutdown of a node's distributed storage service, stops all read and write access to the node, and then upgrades the hard disk firmware, but there are problems such as long upgrade time and high upgrade risk. Summary of the invention

[0003] The embodiments of the present application provide a method and device for upgrading hard disk firmware, a storage medium, and an electronic device, so as to at least solve the problem in the related art that the hard disk firmware cannot be upgraded efficiently and safely.

[0004] According to an embodiment of the present application, a hard disk firmware upgrade method is provided, which is applied to an upgrade device, wherein the upgrade device is connected to a distributed storage cluster, and the distributed storage cluster includes multiple hard disk firmwares. The method includes: obtaining first operating status information of the distributed storage cluster and read-write status information of each of the hard disk firmwares to obtain multiple read-write status information, wherein one hard disk firmware corresponds to one read-write status information; in the case where it is determined based on the first operating status information that the distributed storage cluster is in a normal operating state, detecting multiple read-write status information to determine target read-write status information from the multiple read-write status information, wherein the target read-write status information is used to indicate that the corresponding target hard disk firmware is in a normal read-write state, and the target hard disk firmware is one or more hard disks in the multiple hard disk firmwares; in the case where it is determined that the current firmware version of the target hard disk firmware is in a state to be upgraded, writing the target firmware identifier of the target hard disk firmware into a list to be upgraded; when the target hard disk firmware is in an idle state, upgrading the current firmware version of the target hard disk firmware in the order in which the target firmware identifiers are stored in the list to be upgraded.

[0005] In an exemplary embodiment, the upgrade device includes a first status judgment service, which obtains the first operating status information of the distributed storage cluster and the read-write status information of each hard disk firmware, and obtains multiple read-write status information, including: sending a first status acquisition instruction to the distributed storage cluster through the first status judgment service, wherein the first status acquisition instruction is used to obtain the first operating status information of the distributed storage cluster; receiving the first operating status information sent by the distributed storage cluster in response to the first status instruction through the first status judgment service; sending a second status acquisition instruction to each hard disk firmware through the first status judgment service, wherein the second status acquisition instruction is used to obtain the read-write status information of each hard disk firmware; receiving the read-write status information sent by each hard disk firmware in response to the second status acquisition instruction through the first status judgment service, and obtaining multiple read-write status information.

[0006] In an exemplary embodiment, the upgrade device includes a second status judgment service. When it is determined that the distributed storage cluster is in a normal operating state based on the first operating state information, multiple read-write status information are detected to determine the target read-write status information from the multiple read-write status information. The method also includes: extracting the number of blocked processes in the distributed storage cluster from the first operating state information through the second status judgment service, wherein the blocked processes are used to represent abnormal processes existing in the distributed storage cluster; when the number of blocked processes is less than a first threshold and the first operating state information includes normal first operating state information, it is determined that the distributed storage cluster is in a normal operating state.

[0007] In an exemplary embodiment, the upgrade device includes a third status judgment service. When it is determined that the distributed storage cluster is in a normal operating state based on the first operating state information, multiple read-write status information are detected to determine target read-write status information from the multiple read-write status information, including: performing the following operations for each of the read-write status information to determine the target read-write status information from the multiple read-write status information: performing a filtering operation on the read-write status information through the third status judgment service to extract performance parameter information and sector information of the hard disk firmware from the read-write status information, wherein the performance parameter information includes the firmware state of the hard disk firmware, and the sector information includes the physical channel of the hard disk firmware; when it is determined that the performance parameter information meets the second threshold and the sector information meets the third threshold from the performance parameter information and the sector information of the hard disk firmware through the third status judgment service, the read-write status information is determined as the target read-write status information.

[0008] In an exemplary embodiment, the upgrade device includes a first hard disk firmware judgment service and a first hard disk firmware upgrade service, the first hard disk firmware upgrade service is not connected to the first hard disk firmware judgment service, and when it is determined that the current firmware version of the target hard disk firmware is in a state to be upgraded, the target firmware identifier of the target hard disk firmware is written into a list to be upgraded, including: sending a version acquisition instruction to the distributed storage cluster through the first hard disk firmware judgment service to obtain the current firmware version number and the version range to be upgraded of the target hard disk firmware, wherein one target hard disk firmware corresponds to one current firmware version number, and one target hard disk firmware corresponds to one version range to be upgraded; The first hard disk firmware judgment service calls a judgment statement to judge whether the current firmware version number meets the version range to be upgraded; when the current firmware version number meets the version range to be upgraded, the first hard disk firmware judgment service calls a write statement to write the target firmware identifier of the target hard disk firmware into the list to be upgraded; when it is determined that the current firmware version of the target hard disk firmware is in a state to be upgraded, after writing the target firmware identifier of the target hard disk firmware into the list to be upgraded, the target firmware identifier is sent to the first hard disk firmware upgrade service through the first hard disk firmware judgment service and based on the storage order of the target firmware identifier in the list to be upgraded.

[0009] In an exemplary embodiment, the upgrade device includes a second hard disk firmware upgrade service. When the target hard disk firmware is in an idle state, before upgrading the current firmware version of the target hard disk firmware in the order in which the target firmware identifier is stored in the list to be upgraded, the method further includes: sending a service stop instruction to a hard disk firmware service component through the second hard disk firmware upgrade service and based on the target firmware identifier to stop the hard disk firmware service of the target hard disk firmware, wherein the hard disk firmware service component is used to store and manage data in each of the hard disk firmwares; monitoring the read and write input and output operations of the target hard disk firmware through the second hard disk firmware upgrade service and based on the target firmware identifier; and determining that the target hard disk firmware is in the idle state when it is determined that the hard disk firmware service of the target hard disk firmware has stopped performing the read and write input and output operations.

[0010] In an exemplary embodiment, the upgrade device includes a third hard disk firmware upgrade service. When the target hard disk firmware is in an idle state, the current firmware version of the target hard disk firmware is upgraded in the order in which the target firmware identifier is stored in the to-be-upgraded list, including: calling the target hard disk firmware upgrade component through the third hard disk firmware upgrade service and based on the model information of the target hard disk firmware, so as to upgrade the current firmware version of the target hard disk firmware through the target hard disk firmware upgrade component and in accordance with the target firmware identifier, wherein the model information of the target hard disk firmware and the target hard disk firmware upgrade component are in a one-to-one correspondence; the upgrade device also includes a second hard disk firmware judgment service and a fourth status judgment service, the third hard disk firmware upgrade service is not connected to the second hard disk firmware judgment service, and the second hard disk firmware judgment service is not connected to the fourth status judgment service. When the target hard disk firmware is in an idle state, after upgrading the current firmware version of the target hard disk firmware in the order in which the target firmware identifier is stored in the to-be-upgraded list, the method also includes: calling the target hard disk firmware upgrade component through the third hard disk firmware upgrade service and based on the model information of the target hard disk firmware, so as to upgrade the current firmware version of the target hard disk firmware through the target hard disk firmware upgrade component and in accordance with the target firmware identifier. The third hard disk firmware upgrade service sends a service start instruction to the hard disk firmware service component based on the above-mentioned target firmware identifier to start the hard disk firmware service of the above-mentioned target hard disk firmware, wherein the above-mentioned hard disk firmware service component is used to store and manage data in multiple hard disk firmwares; through the above-mentioned third hard disk firmware upgrade service and based on the above-mentioned target firmware identifier, the read and write input and output operations of the above-mentioned target hard disk firmware are restored; through the above-mentioned second hard disk firmware judgment service, a version acquisition instruction is sent to the above-mentioned distributed storage cluster to obtain the upgrade firmware version number of the above-mentioned target hard disk firmware, wherein the above-mentioned upgrade firmware version number is the version number after the above-mentioned target hard disk firmware is upgraded; through the above-mentioned fourth status judgment service, a second status acquisition instruction is sent to the above-mentioned distributed storage cluster, wherein the above-mentioned second status acquisition instruction is used to obtain the second operating status information of the above-mentioned distributed storage cluster; when the above-mentioned upgrade firmware version number is the target upgrade firmware version number, and based on the above-mentioned second operating status information, it is determined that the above-mentioned distributed storage cluster is in a normal operating state, an upgrade message is printed, wherein the above-mentioned upgrade message is used to describe the upgrade status of the above-mentioned target hard disk firmware.

[0011] According to another embodiment of the present application, there is provided a hard disk firmware upgrade device, which is applied to an upgrade device, wherein the upgrade device is connected to a distributed storage cluster, wherein the distributed storage cluster includes a plurality of hard disk firmwares, and the device includes: a first acquisition module, which is used to acquire first operation status information of the distributed storage cluster and read / write status information of each hard disk firmware, and obtain a plurality of the read / write status information, wherein one hard disk firmware corresponds to one read / write status information; a first detection module, which is used to detect a plurality of the read / write status information when it is determined based on the first operation status information that the distributed storage cluster is in a normal operation state, so as to determine target read / write status information from the plurality of the read / write status information, wherein the target read / write status information is used to indicate that the corresponding target hard disk firmware is in a normal read / write state, and the target hard disk firmware is one or more hard disks of the plurality of hard disk firmwares; a first writing module, which is used to write a target firmware identifier of the target hard disk firmware into a to-be-upgraded list when it is determined that the current firmware version of the target hard disk firmware is in a to-be-upgraded state; and a first upgrade module, which is used to upgrade the current firmware version of the target hard disk firmware according to the order in which the target firmware identifiers are stored in the to-be-upgraded list when the target hard disk firmware is in an idle state.

[0012] In an exemplary embodiment, the upgrade device includes a first status judgment service, and the first acquisition module includes: a first sending submodule, used to send a first status acquisition instruction to the distributed storage cluster through the first status judgment service, wherein the first status acquisition instruction is used to obtain the first operating status information of the distributed storage cluster; a first receiving submodule, used to receive the first operating status information sent by the distributed storage cluster in response to the first status instruction through the first status judgment service; a second sending submodule, used to send a second status acquisition instruction to each hard disk firmware through the first status judgment service, wherein the second status acquisition instruction is used to obtain the read-write status information of each hard disk firmware; a second receiving submodule, used to receive the read-write status information sent by each hard disk firmware in response to the second status acquisition instruction through the first status judgment service, to obtain multiple read-write status information.

[0013] In an exemplary embodiment, the upgrade device includes a second status judgment service, and the device also includes: a first extraction module, which is used to detect multiple read-write status information when it is determined that the distributed storage cluster is in a normal operating state based on the first operating status information, so as to extract the number of blocked processes in the distributed storage cluster from the first operating status information through the second status judgment service before determining the target read-write status information from the multiple read-write status information, wherein the blocked process is used to represent the abnormal process existing in the distributed storage cluster; a first determination module, which is used to determine that the distributed storage cluster is in a normal operating state when the number of blocked processes is less than a first threshold and the first operating status information includes normal first operating status information.

[0014] In an exemplary embodiment, the upgrade device includes a third status judgment service, and the first detection module performs the following operations for each of the read-write status information to determine the target read-write status information from the multiple read-write status information, including: a first execution submodule, used to perform a screening operation on the read-write status information through the third status judgment service to extract the performance parameter information and sector information of the hard disk firmware from the read-write status information, wherein the performance parameter information includes the firmware status of the hard disk firmware, and the sector information includes the physical channel of the hard disk firmware; a second determination submodule, used to determine the read-write status information as the target read-write status information when the performance parameter information and the sector information of the hard disk firmware are determined to meet the second threshold and the sector information meets the third threshold from the performance parameter information and the sector information of the hard disk firmware through the third status judgment service.

[0015] In an exemplary embodiment, the upgrade device includes a first hard disk firmware judgment service and a first hard disk firmware upgrade service, the first hard disk firmware upgrade service is not connected to the first hard disk firmware judgment service, and the first write module includes: a third sending submodule, used to send a version acquisition instruction to the distributed storage cluster through the first hard disk firmware judgment service to obtain the current firmware version number and the version range to be upgraded of the target hard disk firmware, wherein one target hard disk firmware corresponds to one current firmware version number, and one target hard disk firmware corresponds to one version range to be upgraded; a first judgment submodule, used to call a judgment statement through the first hard disk firmware judgment service to judge whether the current firmware whether the firmware version number meets the above-mentioned version range to be upgraded; a first writing submodule, used to call a write statement through the above-mentioned first hard disk firmware judgment service when the above-mentioned current firmware version number meets the above-mentioned version range to be upgraded, so as to write the target firmware identifier of the above-mentioned target hard disk firmware into the above-mentioned list to be upgraded; the above-mentioned device also includes: a first sending module, used to write the target firmware identifier of the above-mentioned target hard disk firmware into the list to be upgraded after determining that the current firmware version of the above-mentioned target hard disk firmware is in a state to be upgraded, and then send the above-mentioned target firmware identifier to the above-mentioned first hard disk firmware upgrade service through the above-mentioned first hard disk firmware judgment service and based on the storage order of the above-mentioned target firmware identifier in the above-mentioned list to be upgraded.

[0016] In an exemplary embodiment, the upgrade device includes a second hard disk firmware upgrade service, and the device also includes: a second sending module, which is used to send a service stop instruction to the hard disk firmware service component through the second hard disk firmware upgrade service and based on the target firmware identifier before upgrading the current firmware version of the target hard disk firmware when the target hard disk firmware is in an idle state, in accordance with the order in which the target firmware identifier is stored in the list to be upgraded, so as to stop the hard disk firmware service of the target hard disk firmware, wherein the hard disk firmware service component is used to store and manage data in each of the hard disk firmware; a first monitoring module, which is used to monitor the read and write input and output operations of the target hard disk firmware through the second hard disk firmware upgrade service and based on the target firmware identifier; a second determination module, which is used to determine that the target hard disk firmware is in the idle state when it is determined that the hard disk firmware service of the target hard disk firmware has stopped performing the read and write input and output operations.

[0017] In an exemplary embodiment, the upgrade device includes a third hard disk firmware upgrade service, and the first upgrade module includes: a first upgrade submodule, which is used to call the target hard disk firmware upgrade component through the third hard disk firmware upgrade service and based on the model information of the target hard disk firmware, so as to upgrade the current firmware version of the target hard disk firmware through the target hard disk firmware upgrade component and according to the target firmware identifier, wherein the model information of the target hard disk firmware and the target hard disk firmware upgrade component are in a one-to-one correspondence; the upgrade device also includes a second hard disk firmware judgment service and a fourth status judgment service, the third hard disk firmware upgrade service is not connected to the second hard disk firmware judgment service, and the second hard disk firmware judgment service is not connected to the fourth status judgment service, and the device also includes: a third sending module, which is used to send a service to the hard disk firmware service component through the third hard disk firmware upgrade service and based on the target firmware identifier after upgrading the current firmware version of the target hard disk firmware when the target hard disk firmware is in an idle state according to the order in which the target firmware identifier is stored in the to-be-upgraded list. A start instruction is used to start the hard disk firmware service of the above-mentioned target hard disk firmware, wherein the above-mentioned hard disk firmware service component is used to store and manage data in multiple hard disk firmwares; a first recovery module is used to restore the read and write input and output operations of the above-mentioned target hard disk firmware through the above-mentioned third hard disk firmware upgrade service and based on the above-mentioned target firmware identifier; a fourth sending module is used to send a version acquisition instruction to the above-mentioned distributed storage cluster through the above-mentioned second hard disk firmware judgment service to obtain the upgrade firmware version number of the above-mentioned target hard disk firmware, wherein the above-mentioned upgrade firmware version number is the version number after the above-mentioned target hard disk firmware is upgraded; a seventh sending module is used to send a second status acquisition instruction to the above-mentioned distributed storage cluster through the above-mentioned fourth status judgment service, wherein the above-mentioned second status acquisition instruction is used to obtain the second operating status information of the above-mentioned distributed storage cluster; a first printing module is used to print an upgrade message when the above-mentioned upgrade firmware version number is the target upgrade firmware version number and the above-mentioned distributed storage cluster is determined to be in a normal operating state based on the above-mentioned second operating status information, wherein the above-mentioned upgrade message is used to describe the upgrade status of the above-mentioned target hard disk firmware.

[0018] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any one of the above method embodiments when running.

[0019] According to another embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0020] According to another embodiment of the present application, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.

[0021] Through this application, when it is determined based on the first operating status information that the distributed storage cluster is in a normal operating state, the read-write status information of the hard disk firmware is detected to determine the target hard disk firmware in a normal read-write state. When it is determined that the current firmware version of the target hard disk firmware is in a state to be upgraded, the target firmware identifier of the target hard disk firmware is written into a list to be upgraded. When the target hard disk firmware is in an idle state, the target hard disk firmware is upgraded in the order in which the target firmware identifiers are stored in the list to be upgraded. Since this application adopts a strategy of online upgrading of a single hard disk firmware one by one, the normal operation of other hard disk firmware and the distributed storage cluster during the upgrade process is ensured. Therefore, the problem that the hard disk firmware cannot be upgraded efficiently and safely in the related technology can be solved, and the effect of upgrading the hard disk firmware efficiently and safely is achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 It is a hardware structure block diagram of a server device of a hard disk firmware upgrade method according to an embodiment of the present application;

[0023] Figure 2 is a flow chart of a hard disk firmware upgrade method according to an embodiment of the present application;

[0024] Figure 3 is a structural diagram of a hard disk firmware upgrade method according to a specific embodiment of the present application;

[0025] Figure 4 is a flow chart of a method for upgrading hard disk firmware according to a specific embodiment of the present application;

[0026] Figure 5 It is a structural block diagram of a hard disk firmware upgrade device according to an embodiment of the present application. DETAILED DESCRIPTION

[0027] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0029] The method embodiments provided in the embodiments of the present application can be executed in a server device or a similar computing device. Taking running on a server device as an example, Figure 1FIG. 1 is a hardware structure block diagram of a server device of a hard disk firmware upgrade method according to an embodiment of the present application. Figure 1 As shown, the server device may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a microprocessor MCU or a processing device such as a programmable logic device FPGA) and a memory 104 for storing data, wherein the above-mentioned server device may also include a transmission device 106 and an input and output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above server device. Figure 1 More or fewer components shown in the figure, or with different Figure 1 Different configurations are shown.

[0030] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as a computer program corresponding to a method for upgrading hard disk firmware in an embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory set relative to the processor 102 process, and these process memories may be connected to a server device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0031] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the server device. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0032] In this embodiment, a hard disk firmware upgrade method is provided, which is applied to an upgrade device, the upgrade device is connected to a distributed storage cluster, and the distributed storage cluster includes multiple hard disk firmwares. Figure 2 is a flowchart of a method for upgrading hard disk firmware according to an embodiment of the present application, such as Figure 2 As shown, the process includes the following steps:

[0033] Step S202, obtaining first operation status information of the distributed storage cluster and read / write status information of each hard disk firmware, and obtaining a plurality of read / write status information, wherein one hard disk firmware corresponds to one read / write status information;

[0034] Alternatively, distributed storage clusters usually adopt a centralized management approach, using one or more management nodes to configure, monitor and schedule all storage devices and resources in the cluster. For example, real-time monitoring of the operating status of hard disk firmware and monitoring of hard disk performance indicators can be performed to achieve efficient, reliable and flexible storage management.

[0035] Optionally, the first operating status information is used to describe whether the distributed storage cluster is in a normal operating state, including but not limited to storage usage information, node health status information, performance indicator information, cluster health status information, and blocking status information of the distributed storage cluster.

[0036] Optionally, the read / write status information is used to describe whether the hard disk firmware is in a normal read / write state, and may be the self-monitoring, analysis and reporting technology (smart) information of the hard disk firmware, wherein the smart information includes but is not limited to the performance indicator information of the hard disk firmware and the storage usage information.

[0037] Step S204, in the case where it is determined based on the first running status information that the distributed storage cluster is in a normal running state, detecting multiple read-write status information to determine target read-write status information from the multiple read-write status information, wherein the target read-write status information is used to indicate that the corresponding target hard disk firmware is in a normal read-write state, and the target hard disk firmware is one or more hard disks among the multiple hard disk firmwares;

[0038] Step S206, when it is determined that the current firmware version of the target hard disk firmware is in a state to be upgraded, the target firmware identifier of the target hard disk firmware is written into a list to be upgraded;

[0039] Optionally, the target firmware identifier is used to uniquely identify the target hard disk firmware in the distributed storage cluster, including but not limited to an object storage device (Object Storage Device, OSD for short) identifier.

[0040] Step S208: when the target hard disk firmware is in an idle state, the current firmware version of the target hard disk firmware is upgraded according to the order in which the target firmware identifiers are stored in the to-be-upgraded list.

[0041] Through the above steps, when it is determined based on the first operating status information that the distributed storage cluster is in a normal operating state, the read-write status information of the hard disk firmware is detected to determine the target hard disk firmware in a normal read-write state. When it is determined that the current firmware version of the target hard disk firmware is in a state to be upgraded, the target firmware identifier of the target hard disk firmware is written into a list to be upgraded. When the target hard disk firmware is in an idle state, the target hard disk firmware is upgraded in the order in which the target firmware identifiers are stored in the list to be upgraded. Since the present application adopts a strategy of online upgrading of a single hard disk firmware one by one, the normal operation of other hard disk firmware and the distributed storage cluster during the upgrade process is ensured. Therefore, the problem that the hard disk firmware cannot be upgraded efficiently and safely in the related technology can be solved, and the effect of upgrading the hard disk firmware efficiently and safely is achieved.

[0042] In an exemplary embodiment, the upgrade device includes a first status judgment service, which obtains the first operating status information of the distributed storage cluster and the read-write status information of each hard disk firmware, and obtains multiple read-write status information, including: sending a first status acquisition instruction to the distributed storage cluster through the first status judgment service, wherein the first status acquisition instruction is used to obtain the first operating status information of the distributed storage cluster; receiving the first operating status information sent by the distributed storage cluster in response to the first status instruction through the first status judgment service; sending a second status acquisition instruction to each hard disk firmware through the first status judgment service, wherein the second status acquisition instruction is used to obtain the read-write status information of each hard disk firmware; receiving the read-write status information sent by each hard disk firmware in response to the second status acquisition instruction through the first status judgment service, and obtaining multiple read-write status information.

[0043] Alternatively, if Figure 3 As shown, the upgrade device includes a status judgment service, wherein the status judgment service can be a first status judgment service, the first status judgment service sends a first status acquisition instruction: icfs-s to the distributed storage cluster, and the distributed storage cluster responds to the first status acquisition instruction: icfs-s, and feeds back the first operation status information of the distributed storage cluster: cluster health status information and blocking status information to the first status judgment service. The first status judgment service sends a second status acquisition instruction to each hard disk firmware, and the hard disk firmware responds to the second status acquisition instruction and feeds back the hard disk firmware's self-monitoring, analysis and reporting technology smart information to the first status judgment service, wherein the smart information includes but is not limited to the hard disk firmware's performance indicator information and storage usage information.

[0044] Optionally, when the read and write status information of all hard disk firmware is stored in the distributed storage cluster, the first status determination service may also directly send a second status acquisition instruction to the distributed storage cluster to acquire the read and write status information of all hard disk firmware.

[0045] This embodiment obtains the status information of the distributed storage cluster and the hard disk firmware to determine the executable environment when upgrading the hard disk firmware, thereby avoiding problems such as process blocking and insufficient resources when upgrading the hard disk firmware, thereby achieving the purpose of reducing upgrade risks and improving upgrade efficiency.

[0046] In an exemplary embodiment, the upgrade device includes a second status judgment service. When it is determined that the distributed storage cluster is in a normal operating state based on the first operating state information, multiple read-write status information are detected to determine the target read-write status information from the multiple read-write status information. The method also includes: extracting the number of blocked processes in the distributed storage cluster from the first operating state information through the second status judgment service, wherein the blocked processes are used to represent abnormal processes existing in the distributed storage cluster; when the number of blocked processes is less than a first threshold and the first operating state information includes normal first operating state information, it is determined that the distributed storage cluster is in a normal operating state.

[0047] Optionally, the second status judgment service is used to determine whether the distributed storage cluster is in a normal operating state. The second status judgment service may be the first status judgment service described above, or may be Figure 3 For example, the second status judgment service extracts the number of blocked read and write processes as 5 from the first running status information of distributed storage cluster A: cluster health status information-healthy status is good, blocking status information-number of blocked read and write processes: 5, and the number of blocked read and write processes is less than the first threshold value 10 of the blocking alarm of distributed storage cluster A, and the cluster health status information is in good health, so it is determined that the distributed storage cluster A is in a normal operating state. For example, the second status judgment service extracts the number of blocked read and write processes as 1 from the first running status information of distributed storage cluster B: cluster health status information-healthy status alarm, blocking status information-number of blocked read and write processes: 1, and although the number of processes is less than the first threshold value 5 of the blocking alarm of distributed storage cluster B, the cluster health status information is a health status alarm, so it is determined that the distributed storage cluster B is in an abnormal operating state. This embodiment determines that the distributed storage cluster is in normal operation, then detects the read and write status information of the hard disk firmware, and then performs subsequent hard disk firmware upgrade operations, thereby reducing the risk of input and output blocking during the upgrade process and ensuring the continuity of the upgrade process.

[0048] In an exemplary embodiment, the upgrade device includes a third status judgment service. When it is determined that the distributed storage cluster is in a normal operating state based on the first operating state information, multiple read-write status information are detected to determine target read-write status information from the multiple read-write status information, including: performing the following operations for each of the read-write status information to determine the target read-write status information from the multiple read-write status information: performing a filtering operation on the read-write status information through the third status judgment service to extract performance parameter information and sector information of the hard disk firmware from the read-write status information, wherein the performance parameter information includes the firmware state of the hard disk firmware, and the sector information includes the physical channel of the hard disk firmware; when it is determined that the performance parameter information meets the second threshold and the sector information meets the third threshold from the performance parameter information and the sector information of the hard disk firmware through the third status judgment service, the read-write status information is determined as the target read-write status information.

[0049] Optionally, the performance parameter information includes but is not limited to the operating status of the hard disk firmware, read and write error rate, start / stop times, and average access time. Sector information includes but is not limited to remapped sector counts and known bad sector counts. The third status judgment service is used to judge the read and write status information of multiple hard disk firmwares and determine the target hard disk firmware that meets the target read and write status information. The third status judgment service can be the first status judgment service mentioned above, which can be Figure 3For example, the first status judgment service obtains the smart information of hard disk firmware A, hard disk firmware B, and hard disk firmware C managed by distributed storage cluster A. The smart information of hard disk firmware is filtered to obtain performance parameter information and sector information: hard disk firmware A: operating status-working, read and write error rate-0.001%, start / stop times-20,000 times, average access time-15 milliseconds, known bad sector count-0; hard disk firmware B: operating status-working, read and write error rate-0.002%, start / stop times-50,000 times, average access time-20 milliseconds, known bad sector count-0; hard disk firmware C: operating status-stop, read and write error rate-0.001%, start / stop times-150,000 times, average access time-40 milliseconds, known bad sector count-1. Assume that the second threshold is: operating status - working, read / write error rate less than 0.005%, start / stop times less than 100,000 times, and average access time less than 30 milliseconds, and the third threshold is: known bad sector count less than 5, then the smart information of hard disk firmware A, the smart information of hard disk firmware B, and the smart information of hard disk firmware C meet the second threshold, and the hard disk firmware A and hard disk firmware B meet the third threshold. The target read / write status information is hard disk firmware A: operating status - working, read / write error rate - 0.001%, start / stop times - 20,000 times, average access time - 15 milliseconds, known bad sector count - 0; hard disk firmware B: operating status - working, read / write error rate - 0.002%, start / stop times - 50,000 times, average access time - 20 milliseconds, known bad sector count - 0. This embodiment determines to detect the read and write status information of the hard disk firmware, screens the performance parameters that meet the specific threshold, identifies the hard disk firmware that meets the upgrade conditions, and then performs subsequent upgrade operations, thereby reducing the risk of input and output blocking during the upgrade process and ensuring the continuity of the upgrade process.

[0050] In an exemplary embodiment, the upgrade device includes a first hard disk firmware judgment service and a first hard disk firmware upgrade service, the first hard disk firmware upgrade service is not connected to the first hard disk firmware judgment service, and when it is determined that the current firmware version of the target hard disk firmware is in a state to be upgraded, the target firmware identifier of the target hard disk firmware is written into a list to be upgraded, including: sending a version acquisition instruction to the distributed storage cluster through the first hard disk firmware judgment service to obtain the current firmware version number and the version range to be upgraded of the target hard disk firmware, wherein one target hard disk firmware corresponds to one current firmware version number, and one target hard disk firmware corresponds to one version range to be upgraded; The first hard disk firmware judgment service calls a judgment statement to judge whether the current firmware version number meets the version range to be upgraded; when the current firmware version number meets the version range to be upgraded, the first hard disk firmware judgment service calls a write statement to write the target firmware identifier of the target hard disk firmware into the list to be upgraded; when it is determined that the current firmware version of the target hard disk firmware is in a state to be upgraded, after writing the target firmware identifier of the target hard disk firmware into the list to be upgraded, the target firmware identifier is sent to the first hard disk firmware upgrade service through the first hard disk firmware judgment service and based on the storage order of the target firmware identifier in the list to be upgraded.

[0051] Optionally, the first hard disk firmware determination service is used to determine whether the current firmware version number of the target hard disk firmware meets the version range to be upgraded, and the first hard disk firmware upgrade service is used to save the target firmware identifier of the target hard disk firmware that meets the version range to be upgraded. Figure 3As shown, the upgrade device includes a hard disk firmware judgment service and a hard disk firmware upgrade service connected to each other, wherein the hard disk firmware judgment service may be a first hard disk firmware judgment service, and the hard disk firmware upgrade service may be a first hard disk firmware upgrade service. For example, the first hard disk firmware judgment service sends a version acquisition instruction to the distributed storage cluster, and acquires the current firmware version number of the target hard disk firmware A - CC23.1-150622, the version range to be upgraded - the starting version: CC23.1-150101 (inclusive), the end version: CC24.0-170101 (exclusive), the current firmware version number of the target hard disk firmware B - CC23.1-150628, the version range to be upgraded - the starting version: CC23.1-150528 (inclusive), the end version: CC24.0-170106 (exclusive), and determines through an if judgment statement that the target hard disk firmware A and the target hard disk firmware B meet the version range to be upgraded, and writes the target firmware identifier -1 of the target hard disk firmware A and the target firmware identifier -3 of the target hard disk firmware B into the list to be upgraded. Then, according to the order of the target firmware identifiers in the to-be-upgraded list from small to large, the target firmware identifier-1 and the target firmware identifier-3 are sent to the hard disk firmware upgrade service in sequence. This embodiment avoids unnecessary upgrades to the hard disk firmware that is already the latest version or does not meet the upgrade conditions by judging whether the current firmware version number of the target hard disk firmware meets the to-be-upgraded version range, thereby achieving the purpose of accurately upgrading the hard disk firmware.

[0052] In an exemplary embodiment, the upgrade device includes a second hard disk firmware upgrade service. When the target hard disk firmware is in an idle state, before upgrading the current firmware version of the target hard disk firmware in the order in which the target firmware identifier is stored in the list to be upgraded, the method further includes: sending a service stop instruction to a hard disk firmware service component through the second hard disk firmware upgrade service and based on the target firmware identifier to stop the hard disk firmware service of the target hard disk firmware, wherein the hard disk firmware service component is used to store and manage data in each of the hard disk firmwares; monitoring the read and write input and output operations of the target hard disk firmware through the second hard disk firmware upgrade service and based on the target firmware identifier; and determining that the target hard disk firmware is in the idle state when it is determined that the hard disk firmware service of the target hard disk firmware has stopped performing the read and write input and output operations.

[0053] Optionally, the second hard disk firmware upgrade service is used to determine that the target hard disk firmware meets the upgrade condition, which may be the first hard disk firmware upgrade service, which may be Figure 3The hard disk firmware upgrade service is obtained from the hard disk firmware upgrade service, and the hard disk firmware service component is used to store and manage the data in each hard disk firmware, such as the OSD service component. For example, the second hard disk firmware upgrade service receives the target firmware identification sent by the first hard disk firmware judgment service in the order of target firmware identification-1 and target firmware identification-3, first sends a service stop instruction to the OSD service component based on the target firmware identification-1, and the OSD service component stops the OSD service of the target hard disk firmware based on the target firmware identification-1, and then monitors the read and write input and output operations of the target hard disk firmware to zero, and then determines that the target hard disk firmware is in an idle state and performs an upgrade operation on the target hard disk firmware; then sends a service stop instruction to the OSD service component based on the target firmware identification-3, and the OSD service component stops the OSD service of the target hard disk firmware based on the target firmware identification-3, and then monitors the read and write input and output operations of the target hard disk firmware to zero, and then determines that the target hard disk firmware is in an idle state and performs an upgrade operation on the target hard disk firmware. In this embodiment, the target hard disk firmware is upgraded after it is in an idle state, thereby avoiding upgrading the target hard disk firmware that is still in the read and write input and output operation, and achieving the purpose of accurately upgrading the hard disk firmware.

[0054] In an exemplary embodiment, the upgrade device includes a third hard disk firmware upgrade service. When the target hard disk firmware is in an idle state, the current firmware version of the target hard disk firmware is upgraded in the order in which the target firmware identifier is stored in the to-be-upgraded list, including: calling the target hard disk firmware upgrade component through the third hard disk firmware upgrade service and based on the model information of the target hard disk firmware, so as to upgrade the current firmware version of the target hard disk firmware through the target hard disk firmware upgrade component and in accordance with the target firmware identifier, wherein the model information of the target hard disk firmware and the target hard disk firmware upgrade component are in a one-to-one correspondence; the upgrade device also includes a second hard disk firmware judgment service and a fourth status judgment service, the third hard disk firmware upgrade service is not connected to the second hard disk firmware judgment service, and the second hard disk firmware judgment service is not connected to the fourth status judgment service. When the target hard disk firmware is in an idle state, after upgrading the current firmware version of the target hard disk firmware in the order in which the target firmware identifier is stored in the to-be-upgraded list, the method also includes: calling the target hard disk firmware upgrade component through the third hard disk firmware upgrade service and based on the model information of the target hard disk firmware, so as to upgrade the current firmware version of the target hard disk firmware through the target hard disk firmware upgrade component and in accordance with the target firmware identifier. The third hard disk firmware upgrade service sends a service start instruction to the hard disk firmware service component based on the above-mentioned target firmware identifier to start the hard disk firmware service of the above-mentioned target hard disk firmware, wherein the above-mentioned hard disk firmware service component is used to store and manage data in multiple hard disk firmwares; through the above-mentioned third hard disk firmware upgrade service and based on the above-mentioned target firmware identifier, the read and write input and output operations of the above-mentioned target hard disk firmware are restored; through the above-mentioned second hard disk firmware judgment service, a version acquisition instruction is sent to the above-mentioned distributed storage cluster to obtain the upgrade firmware version number of the above-mentioned target hard disk firmware, wherein the above-mentioned upgrade firmware version number is the version number after the above-mentioned target hard disk firmware is upgraded; through the above-mentioned fourth status judgment service, a second status acquisition instruction is sent to the above-mentioned distributed storage cluster, wherein the above-mentioned second status acquisition instruction is used to obtain the second operating status information of the above-mentioned distributed storage cluster; when the above-mentioned upgrade firmware version number is the target upgrade firmware version number, and based on the above-mentioned second operating status information, it is determined that the above-mentioned distributed storage cluster is in a normal operating state, an upgrade message is printed, wherein the above-mentioned upgrade message is used to describe the upgrade status of the above-mentioned target hard disk firmware.

[0055] Optionally, the third hard disk firmware upgrade service is used to upgrade the target hard disk firmware, and may be the second hard disk firmware upgrade service or the first hard disk firmware upgrade service. Figure 3The hard disk firmware upgrade service in. After determining that the target hard disk firmware is in an idle state, the target hard disk firmware upgrade component is called to upgrade the firmware version of the hard disk based on the model information of the target hard disk firmware through an if judgment statement. Assume that there are two target hard disk firmwares with model information: target hard disk firmware A and target hard disk firmware B. Each model of hard disk uses a different upgrade tool: if it is target hard disk firmware A, upgrade tool_A is called; if it is target hard disk firmware B, upgrade tool_B is called. In this embodiment, by selecting a specific upgrade tool according to the model information of the target hard disk firmware, it is ensured that the most appropriate method and firmware image are used to upgrade the target hard disk firmware, thereby achieving the purpose of ensuring compatibility and upgrade success rate.

[0056] Optionally, the second hard disk firmware determination service is used to determine whether the upgrade firmware version number of the target hard disk firmware is the target upgrade firmware version number, and the fourth status determination service is used to determine whether the distributed storage cluster is in a normal operating state, such as Figure 3 As shown, the upgrade device includes a state judgment service, a hard disk firmware judgment service, and a hard disk firmware upgrade service that are interconnected, wherein the hard disk firmware judgment service may be a second hard disk firmware judgment service, and the state judgment service may be a fourth state judgment service. Taking the upgrade of target hard disk firmware A and target hard disk firmware B as an example, the upgrade tool_A is called to upgrade the target hard disk firmware A. The third hard disk firmware upgrade service sends a service start instruction to the OSD service component based on the target firmware identifier-1 of the target hard disk firmware A. The OSD service component starts the OSD service of the target hard disk firmware A based on the target firmware identifier-1, and then restores the read and write input and output operations of the target hard disk firmware A. At the same time, the cluster reconstruction progress is periodically queried until the reconstruction is completed, and the next target hard disk firmware is upgraded. The upgrade of all target hard disk firmwares is completed in sequence. If a hard disk fails to upgrade during the upgrade process, the failure information is printed and the upgrade process is stopped.

[0057] Optionally, after all target hard disk firmware upgrades are completed, the second hard disk firmware judgment service checks whether the target hard disk firmware upgrade firmware version number is the target upgrade firmware version number. After confirming that all target hard disk firmware are the target upgrade firmware version number, the fourth status judgment service checks the running status of the distributed storage cluster, and prints the upgrade success information when the upgrade firmware version number is the target upgrade firmware version number and the distributed storage cluster is in normal operation. In this embodiment, by periodically querying the reconstruction progress of the distributed storage cluster, the data consistency and integrity during the upgrade process are ensured, and by checking the running status of the distributed storage cluster and the upgrade firmware version number of the target hard disk firmware, the purpose of minimizing business interruption and data risk during the upgrade process is achieved.

[0058] The present application is described below in conjunction with specific embodiments:

[0059] In this specific embodiment, it is necessary to deploy the script program that implements the hard disk firmware upgrade method to the hard disk firmware node of the distributed storage cluster, and upload the target hard disk firmware version to be updated to the node tool directory, and use chmod+x to add executable permissions to the script program to implement online batch upgrade of hard disk firmware. Figure 4 is a flowchart of a method for upgrading hard disk firmware according to a specific embodiment of the present application, such as Figure 4 As shown, the specific steps include:

[0060] S402, start;

[0061] S404, input the path and file name of the hard disk firmware A, B, and C, the status judgment service sends a first status acquisition instruction: icfs-s to the distributed storage cluster, the distributed storage cluster responds to the first status acquisition instruction: icfs-s, and feeds back the first running status information of the distributed storage cluster: cluster health status information and blocking status information to the status judgment service,

[0062] The status judgment service extracts the number of blocked read and write processes as 5 from the first running status information of the distributed storage cluster: cluster health status information-healthy status is good, and blocking status information-number of blocked read and write processes: 5. The number of processes is less than the first threshold value 10 of the blocking alarm of the distributed storage cluster, and the cluster health status information is healthy status is good, and determines that the distributed storage cluster is in normal operation;

[0063] After determining that the distributed storage cluster is in normal operation, the status judgment service obtains the smart information of hard disk firmware A, hard disk firmware B, and hard disk firmware C managed by distributed storage cluster A. The smart information of the hard disk firmware is filtered to obtain performance parameter information and sector information: hard disk firmware A: operation status-working, read and write error rate-0.001%, start / stop times-20,000 times, average access time-15 milliseconds, known bad sector count-0; hard disk firmware B: operation status-working, read and write error rate-0.002%, start / stop times-50,000 times, average access time-20 milliseconds, known bad sector count-0; hard disk firmware C: operation status-stop, read and write error rate-0.001%, start / stop times-150,000 times, average access time-40 milliseconds, known bad sector count-1. Assume that the second threshold is: operating status-working, read / write error rate less than 0.005%, start / stop times less than 100,000 times, average access time less than 30 milliseconds, and the third threshold is: known bad sector count less than 5, then the smart information of hard disk firmware A, the smart information of hard disk firmware B, and the smart information of hard disk firmware C meet the second threshold, and the hard disk firmware A and hard disk firmware B meet the third threshold. The target read / write status information is hard disk firmware A: operating status-working, read / write error rate-0.001%, start / stop times-20,000 times, average access time-15 milliseconds, known bad sector count-0; hard disk firmware B: operating status-working, read / write error rate-0.002%, start / stop times-50,000 times, average access time-20 milliseconds, known bad sector count-0;

[0064] After the status judgment service determines the target hard disk firmware, the hard disk firmware judgment service sends a version acquisition instruction to the distributed storage cluster, and obtains the current firmware version number of the target hard disk firmware A - CC23.1-150622, the version range to be upgraded - the starting version: CC23.1-150101 (inclusive), the end version: CC24.0-170101 (exclusive), the current firmware version number of the target hard disk firmware B - CC23.1-150628, the version range to be upgraded - the starting version: CC23.1-150528 (inclusive), the end version: CC24.0-170106 (exclusive), and through the if judgment statement, it is determined that the target hard disk firmware A and the target hard disk firmware B meet the version range to be upgraded, and the target firmware identifier -1 of the target hard disk firmware A and the target firmware identifier -3 of the target hard disk firmware B are written into the list to be upgraded. Then, according to the order of the target firmware identifiers in the list to be upgraded from small to large, the target firmware identifier -1 and the target firmware identifier -3 are sent to the hard disk firmware upgrade service in sequence;

[0065] S406, the hard disk firmware upgrade service first sends a service stop instruction to the OSD service component based on the target firmware identifier -1, and the OSD service component stops the OSD service of the target hard disk firmware A based on the target firmware identifier -1;

[0066] S408, after the hard disk firmware upgrade service monitors that the read and write input and output operations of the target hard disk firmware A are reduced to zero, it is determined that the target hard disk firmware A is in an idle state, and the upgrade tool_A is called to upgrade the target hard disk firmware A;

[0067] S410, after the upgrade returns successfully, the hard disk firmware upgrade service sends a service start instruction to the OSD service component based on the target firmware identifier -1 of the target hard disk firmware A, and the OSD service component starts the OSD service of the target hard disk firmware A based on the target firmware identifier -1, and then restores the read and write input and output operations of the target hard disk firmware A;

[0068] S412, monitoring the completion of the distributed storage cluster reconstruction, and switching to S406 to upgrade the target hard disk firmware B;

[0069] S414, after the upgrade of the target hard disk firmware A and B is completed, the hard disk firmware judgment service checks the target hard disk firmware A and B to see whether the upgraded firmware version number is the target upgraded firmware version number. After confirming that all target hard disk firmware A and B are the target upgraded firmware version number, the status judgment service checks the running status of the distributed storage cluster. When confirming that the upgraded firmware version number is the target upgraded firmware version number and the distributed storage cluster is in normal running status, the upgrade success information is printed and ends.

[0070] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, disk, CD), including a number of instructions to enable a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0071] In this embodiment, a hard disk firmware upgrade device is also provided, which is applied to the upgrade device. The upgrade device is connected to a distributed storage cluster, and the distributed storage cluster includes multiple hard disk firmwares. The device is used to implement the above-mentioned embodiments and preferred implementations, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware for a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0072] Figure 5 is a structural block diagram of a hard disk firmware upgrade device according to an embodiment of the present application, such as Figure 5 As shown, the device comprises:

[0073] A first acquisition module 502 is used to acquire the first operation status information of the distributed storage cluster and the read / write status information of each hard disk firmware, and obtain a plurality of the read / write status information, wherein one hard disk firmware corresponds to one piece of the read / write status information;

[0074] The first detection module 504 is used to detect the plurality of the read-write status information to determine the target read-write status information from the plurality of the read-write status information when it is determined that the distributed storage cluster is in a normal operating state based on the first operating state information, wherein the target read-write status information is used to indicate that the corresponding target hard disk firmware is in a normal read-write state, and the target hard disk firmware is one or more hard disks in the plurality of the hard disk firmwares;

[0075] The first writing module 506 is used to write the target firmware identifier of the target hard disk firmware into the to-be-upgraded list when determining that the current firmware version of the target hard disk firmware is in a to-be-upgraded state;

[0076] The first upgrading module 508 is configured to upgrade the current firmware version of the target hard disk firmware according to the order in which the target firmware identifiers are stored in the to-be-upgraded list when the target hard disk firmware is in an idle state.

[0077] In an exemplary embodiment, the upgrade device includes a first status judgment service, and the first acquisition module includes: a first sending submodule, used to send a first status acquisition instruction to the distributed storage cluster through the first status judgment service, wherein the first status acquisition instruction is used to obtain the first operating status information of the distributed storage cluster; a first receiving submodule, used to receive the first operating status information sent by the distributed storage cluster in response to the first status instruction through the first status judgment service; a second sending submodule, used to send a second status acquisition instruction to each hard disk firmware through the first status judgment service, wherein the second status acquisition instruction is used to obtain the read-write status information of each hard disk firmware; a second receiving submodule, used to receive the read-write status information sent by each hard disk firmware in response to the second status acquisition instruction through the first status judgment service, to obtain multiple read-write status information.

[0078] In an exemplary embodiment, the upgrade device includes a second status judgment service, and the device also includes: a first extraction module, which is used to detect multiple read-write status information when it is determined that the distributed storage cluster is in a normal operating state based on the first operating status information, so as to extract the number of blocked processes in the distributed storage cluster from the first operating status information through the second status judgment service before determining the target read-write status information from the multiple read-write status information, wherein the blocked process is used to represent the abnormal process existing in the distributed storage cluster; a first determination module, which is used to determine that the distributed storage cluster is in a normal operating state when the number of blocked processes is less than a first threshold and the first operating status information includes normal first operating status information.

[0079] In an exemplary embodiment, the upgrade device includes a third status judgment service, and the first detection module performs the following operations for each of the read-write status information to determine the target read-write status information from the multiple read-write status information, including: a first execution submodule, used to perform a screening operation on the read-write status information through the third status judgment service to extract the performance parameter information and sector information of the hard disk firmware from the read-write status information, wherein the performance parameter information includes the firmware status of the hard disk firmware, and the sector information includes the physical channel of the hard disk firmware; a second determination submodule, used to determine the read-write status information as the target read-write status information when the performance parameter information and the sector information of the hard disk firmware are determined to meet the second threshold and the sector information meets the third threshold from the performance parameter information and the sector information of the hard disk firmware through the third status judgment service.

[0080] In an exemplary embodiment, the upgrade device includes a first hard disk firmware judgment service and a first hard disk firmware upgrade service, the first hard disk firmware upgrade service is not connected to the first hard disk firmware judgment service, and the first write module includes: a third sending submodule, used to send a version acquisition instruction to the distributed storage cluster through the first hard disk firmware judgment service to obtain the current firmware version number and the version range to be upgraded of the target hard disk firmware, wherein one target hard disk firmware corresponds to one current firmware version number, and one target hard disk firmware corresponds to one version range to be upgraded; a first judgment submodule, used to call a judgment statement through the first hard disk firmware judgment service to judge whether the current firmware whether the firmware version number meets the above-mentioned version range to be upgraded; a first writing submodule, used to call a write statement through the above-mentioned first hard disk firmware judgment service when the above-mentioned current firmware version number meets the above-mentioned version range to be upgraded, so as to write the target firmware identifier of the above-mentioned target hard disk firmware into the above-mentioned list to be upgraded; the above-mentioned device also includes: a first sending module, used to write the target firmware identifier of the above-mentioned target hard disk firmware into the list to be upgraded after determining that the current firmware version of the above-mentioned target hard disk firmware is in a state to be upgraded, and then send the above-mentioned target firmware identifier to the above-mentioned first hard disk firmware upgrade service through the above-mentioned first hard disk firmware judgment service and based on the storage order of the above-mentioned target firmware identifier in the above-mentioned list to be upgraded.

[0081] In an exemplary embodiment, the upgrade device includes a second hard disk firmware upgrade service, and the device also includes: a second sending module, which is used to send a service stop instruction to the hard disk firmware service component through the second hard disk firmware upgrade service and based on the target firmware identifier before upgrading the current firmware version of the target hard disk firmware when the target hard disk firmware is in an idle state, in accordance with the order in which the target firmware identifier is stored in the list to be upgraded, so as to stop the hard disk firmware service of the target hard disk firmware, wherein the hard disk firmware service component is used to store and manage data in each of the hard disk firmware; a first monitoring module, which is used to monitor the read and write input and output operations of the target hard disk firmware through the second hard disk firmware upgrade service and based on the target firmware identifier; a second determination module, which is used to determine that the target hard disk firmware is in the idle state when it is determined that the hard disk firmware service of the target hard disk firmware has stopped performing the read and write input and output operations.

[0082] In an exemplary embodiment, the upgrade device includes a third hard disk firmware upgrade service, and the first upgrade module includes: a first upgrade submodule, which is used to call the target hard disk firmware upgrade component through the third hard disk firmware upgrade service and based on the model information of the target hard disk firmware, so as to upgrade the current firmware version of the target hard disk firmware through the target hard disk firmware upgrade component and according to the target firmware identifier, wherein the model information of the target hard disk firmware and the target hard disk firmware upgrade component are in a one-to-one correspondence; the upgrade device also includes a second hard disk firmware judgment service and a fourth status judgment service, the third hard disk firmware upgrade service is not connected to the second hard disk firmware judgment service, and the second hard disk firmware judgment service is not connected to the fourth status judgment service, and the device also includes: a third sending module, which is used to send a service to the hard disk firmware service component through the third hard disk firmware upgrade service and based on the target firmware identifier after upgrading the current firmware version of the target hard disk firmware when the target hard disk firmware is in an idle state according to the order in which the target firmware identifier is stored in the to-be-upgraded list. A start instruction is used to start the hard disk firmware service of the above-mentioned target hard disk firmware, wherein the above-mentioned hard disk firmware service component is used to store and manage data in multiple hard disk firmwares; a first recovery module is used to restore the read and write input and output operations of the above-mentioned target hard disk firmware through the above-mentioned third hard disk firmware upgrade service and based on the above-mentioned target firmware identifier; a fourth sending module is used to send a version acquisition instruction to the above-mentioned distributed storage cluster through the above-mentioned second hard disk firmware judgment service to obtain the upgrade firmware version number of the above-mentioned target hard disk firmware, wherein the above-mentioned upgrade firmware version number is the version number after the above-mentioned target hard disk firmware is upgraded; a seventh sending module is used to send a second status acquisition instruction to the above-mentioned distributed storage cluster through the above-mentioned fourth status judgment service, wherein the above-mentioned second status acquisition instruction is used to obtain the second operating status information of the above-mentioned distributed storage cluster; a first printing module is used to print an upgrade message when the above-mentioned upgrade firmware version number is the target upgrade firmware version number and the above-mentioned distributed storage cluster is determined to be in a normal operating state based on the above-mentioned second operating status information, wherein the above-mentioned upgrade message is used to describe the upgrade status of the above-mentioned target hard disk firmware.

[0083] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or, the above modules are located in different processors in any combination.

[0084] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.

[0085] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.

[0086] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0087] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0088] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.

[0089] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.

[0090] The embodiments of the present application also provide a computer program, which includes computer instructions stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps of any one of the above method embodiments.

[0091] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.

[0092] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by the computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. In this way, the present application is not limited to any specific combination of hardware and software.

[0093] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent substitution, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.

Claims

1. A method for upgrading hard disk firmware, characterized in that: Applied to an upgrade device, the upgrade device is connected to a distributed storage cluster, the distributed storage cluster includes multiple hard disk firmwares, the method includes: Acquire the first operation status information of the distributed storage cluster and the read-write status information of each hard disk firmware to obtain a plurality of the read-write status information, wherein one hard disk firmware corresponds to one read-write status information; in the case where it is determined based on the first operation status information that the distributed storage cluster is in a normal operation state, detect the plurality of the read-write status information to determine the target read-write status information from the plurality of the read-write status information, wherein the target read-write status information is used to indicate that the corresponding target hard disk firmware is in a normal read-write state, and the target hard disk firmware is one or more hard disks among the plurality of the hard disk firmwares; When it is determined that the current firmware version of the target hard disk firmware is in a state to be upgraded, writing the target firmware identifier of the target hard disk firmware into a list to be upgraded; When the target hard disk firmware is in an idle state, the current firmware version of the target hard disk firmware is upgraded according to the page sequence of the target firmware identifiers stored in the to-be-upgraded list.

2. The method according to claim 1, characterized in that The upgrade device includes a first status judgment service, which obtains the first operation status information of the distributed storage cluster and the read-write status information of each hard disk firmware, and obtains a plurality of the read-write status information, including: Sending a first status acquisition instruction to the distributed storage cluster through the first status judgment service, wherein the first status acquisition instruction is used to acquire the first operating status information of the distributed storage cluster; receiving, through the first status judgment service, the first operating status information sent by the distributed storage cluster in response to the first status instruction; Sending a second status acquisition instruction to each of the hard disk firmwares through the first status judgment service, wherein the second status acquisition instruction is used to acquire the read and write status information of each of the hard disk firmwares; The read / write status information sent by each hard disk firmware in response to the second status acquisition instruction is received through the first status judgment service to obtain a plurality of read / write status information.

3. The method according to claim 1, characterized in that The upgrade device includes a second status judgment service. When it is determined based on the first operating status information that the distributed storage cluster is in a normal operating state, before detecting a plurality of the read-write status information to determine the target read-write status information from the plurality of the read-write status information, the method further includes: Extracting the number of blocked processes in the distributed storage cluster from the first running status information through the second status judgment service, wherein the blocked processes are used to represent abnormal processes existing in the distributed storage cluster; When the number of the blocked processes is less than a first threshold and the first running state information includes normal first running state information, it is determined that the distributed storage cluster is in a normal running state.

4. The method according to claim 1, characterized in that: The upgrade device includes a third status judgment service, which detects a plurality of the read-write status information to determine target read-write status information from the plurality of the read-write status information when it is determined based on the first operating status information that the distributed storage cluster is in a normal operating state, including: The following operations are performed for each of the read-write status information to determine the target read-write status information from the plurality of the read-write status information: Performing a screening operation on the read / write status information through the third status judgment service to extract performance parameter information and sector information of the hard disk firmware from the read / write status information, wherein the performance parameter information includes the firmware status of the hard disk firmware, and the sector information includes the physical channel of the hard disk firmware; When the third status judgment service determines from the performance parameter information and the sector information of the hard disk firmware that the performance parameter information meets the second threshold and the sector information meets the third threshold, the read-write status information is determined as the target read-write status information.

5. The method according to claim 1, characterized in that The upgrade device includes a first hard disk firmware judgment service and a first hard disk firmware upgrade service, wherein the first hard disk firmware upgrade service is connected to the first hard disk firmware judgment service, and when it is determined that the current firmware version of the target hard disk firmware is in a state to be upgraded, the target firmware identifier of the target hard disk firmware is written into a list to be upgraded, including: Sending a version acquisition instruction to the distributed storage cluster through the first hard disk firmware judgment service to acquire the current firmware version number and the version range to be upgraded of the target hard disk firmware, wherein one target hard disk firmware corresponds to one current firmware version number, and one target hard disk firmware corresponds to one version range to be upgraded; Calling a judgment statement through the first hard disk firmware judgment service to judge whether the current firmware version number meets the version range to be upgraded; In the case where the current firmware version number meets the to-be-upgraded version range, calling a write statement through the first hard disk firmware judgment service to write the target firmware identifier of the target hard disk firmware into the to-be-upgraded list; When it is determined that the current firmware version of the target hard disk firmware is in a state to be upgraded, after the target firmware identifier of the target hard disk firmware is written into the list to be upgraded, the target firmware identifier is sent to the first hard disk firmware upgrade service through the first hard disk firmware judgment service and based on the storage order of the target firmware identifier in the list to be upgraded.

6. The method according to claim 1, characterized in that The upgrade device includes a second hard disk firmware upgrade service. When the target hard disk firmware is in an idle state, before upgrading the current firmware version of the target hard disk firmware according to the page sequence of the target firmware identifier stored in the to-be-upgraded list, the method further includes: Sending a service stop instruction to a hard disk firmware service component through the second hard disk firmware upgrade service and based on the target firmware identifier to stop the hard disk firmware service of the target hard disk firmware, wherein the hard disk firmware service component is used to store and manage data in each of the hard disk firmwares; Monitoring the read and write input and output operations of the target hard disk firmware through the second hard disk firmware upgrade service and based on the target firmware identifier; In the case where it is determined that the hard disk firmware service of the target hard disk firmware has stopped executing the read / write input / output operation, it is determined that the target hard disk firmware is in the idle state.

7. The method according to claim 1, characterized in that The upgrade device includes a third hard disk firmware upgrade service, which upgrades the current firmware version of the target hard disk firmware according to the page sequence of the target firmware identifier stored in the to-be-upgraded list when the target hard disk firmware is in an idle state, including: By means of the third hard disk firmware upgrade service and based on the model information of the target hard disk firmware, a target hard disk firmware upgrade component is called to upgrade the current firmware version of the target hard disk firmware by means of the target hard disk firmware upgrade component and according to the target firmware identifier, wherein the model information of the target hard disk firmware and the target hard disk firmware upgrade component are in a one-to-one correspondence; The upgrade device further includes a second hard disk firmware judgment service and a fourth status judgment service, the third hard disk firmware upgrade service is connected to the second hard disk firmware judgment service, the second hard disk firmware judgment service is connected to the fourth status judgment service, and when the target hard disk firmware is in an idle state, after upgrading the current firmware version of the target hard disk firmware according to the page sequence of the target firmware identifier stored in the to-be-upgraded list, the method further includes: Sending a service start instruction to a hard disk firmware service component through the third hard disk firmware upgrade service and based on the target firmware identifier to start the hard disk firmware service of the target hard disk firmware, wherein the hard disk firmware service component is used to store and manage data in a plurality of the hard disk firmwares; Restore the read and write input and output operations of the target hard disk firmware through the third hard disk firmware upgrade service and based on the target firmware identifier; Sending a version acquisition instruction to the distributed storage cluster through the second hard disk firmware judgment service to acquire an upgrade firmware version number of the target hard disk firmware, wherein the upgrade firmware version number is the version number of the target hard disk firmware after the upgrade; Sending a second state acquisition instruction to the distributed storage cluster through the fourth state judgment service, wherein the second state acquisition instruction is used to obtain second operating state information of the distributed storage cluster; When the upgrade firmware version number is the target upgrade firmware version number and it is determined based on the second operating status information that the distributed storage cluster is in a normal operating state, an upgrade message is printed, wherein the upgrade message is used to describe the upgrade status of the target hard disk firmware.

8. A hard disk firmware upgrade device, characterized in that: Applied to an upgrade device, the upgrade device is connected to a distributed storage cluster, the distributed storage cluster includes multiple hard disk firmwares, and the device includes: A first acquisition module is used to acquire first operation status information of the distributed storage cluster and read / write status information of each hard disk firmware, and obtain a plurality of the read / write status information, wherein one hard disk firmware corresponds to one piece of the read / write status information; A first detection module is used to detect a plurality of the read-write status information to determine target read-write status information from the plurality of the read-write status information when it is determined based on the first running status information that the distributed storage cluster is in a normal running state, wherein the target read-write status information is used to indicate that the corresponding target hard disk firmware is in a normal read-write state, and the target hard disk firmware is one or more hard disks among the plurality of the hard disk firmwares; A first writing module is used to write the target firmware identifier of the target hard disk firmware into the to-be-upgraded list when determining that the current firmware version of the target hard disk firmware is in a to-be-upgraded state; The first upgrading module is used to upgrade the current firmware version of the target hard disk firmware according to the order in which the target firmware identifiers are stored in the to-be-upgraded list when the target hard disk firmware is in an idle state.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 7 when executed by a processor.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method described in any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Equipment firmware upgrading method and device, storage medium and electronic equipment

    CN120540679A