CN-121979548-A - Firmware upgrading method, device, electronic equipment and readable storage medium
Abstract
The application discloses a firmware upgrading method, a device, electronic equipment and a readable storage medium, wherein the method comprises the steps of constructing all hard disks on first storage nodes into a hard disk array aiming at each first storage node in a distributed storage system, determining target storage nodes which are upgraded in parallel each time from all second storage nodes to be upgraded in each round of circulation, upgrading firmware on a single hard disk to be upgraded in the hard disk array aiming at each target storage node, dynamically executing consistency check tasks on all the hard disks according to loads of the target storage nodes after the firmware is upgraded, entering a next round of circulation after the consistency check tasks of all the target storage nodes are executed until all the second storage nodes to be upgraded are upgraded, ensuring stable operation of front-end business in the firmware upgrading process, and improving the upgrading efficiency.
Inventors
- ZENG JIANLI
Assignees
- 天翼云科技有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20251202
Claims (10)
- 1. A method of firmware upgrade, the method comprising: For each first storage node in a distributed storage system, constructing all hard disks on the first storage node into a hard disk array; In each round of circulation, determining a target storage node of each parallel upgrade from all second storage nodes to be upgraded; updating firmware on a single hard disk to be updated in the hard disk array aiming at each target storage node, and dynamically executing a consistency check task on all the hard disks according to the load of the target storage node after the firmware is updated; And after the consistency check task of all the target storage nodes is executed, entering a next round of circulation until all the second storage nodes to be upgraded are upgraded.
- 2. The method of claim 1, wherein dynamically performing a consistency check task on all hard disks based on the load of the target storage node after the firmware upgrade is completed, comprises: initializing resource occupation parameters of the consistency check task to the target storage node after the firmware upgrade is completed; executing consistency check tasks on all the hard disks according to the resource occupation parameters; periodically monitoring the input/output load of the target storage node, and suspending the consistency check task under the condition that the input/output load is greater than or equal to a preset load threshold value; And reducing the resource occupation parameter, and re-executing the consistency check task.
- 3. The method of claim 2, wherein said reducing the resource occupancy parameter and re-executing the consistency check task comprises: reducing the resource occupation parameter and re-executing the consistency check task under the condition that the current resource occupation parameter is larger than a preset minimum value, wherein the preset minimum value is the preset minimum value of the resource occupation parameter; And re-executing the consistency check task after the pause time of the consistency check task reaches the preset time under the condition that the current resource occupation parameter is smaller than or equal to the preset minimum value.
- 4. The method according to claim 2, wherein the method further comprises: Counting the accumulated times of the input/output load being greater than or equal to the preset load threshold; And stopping the consistency check task and generating prompt information when the accumulated times are greater than or equal to preset times, wherein the prompt information is used for indicating manual intervention.
- 5. The method of claim 1, wherein determining the target storage node for each parallel upgrade from all the second storage nodes to be upgraded in each round of rotation comprises: determining the second storage node which does not execute the consistency check task as a candidate storage node; Determining the candidate storage nodes as the target storage nodes under the condition that the first number of the candidate storage nodes is smaller than or equal to the preset node number, wherein the preset node number is a preset upper limit of the number of storage nodes of each parallel upgrade; And under the condition that the first number of the candidate storage nodes is larger than the preset number of nodes, selecting the candidate storage nodes with the preset number of nodes from the candidate storage nodes, and determining the candidate storage nodes as the target storage nodes.
- 6. The method of claim 1, wherein the upgrading firmware on a single hard disk to be upgraded in the hard disk array for each of the target storage nodes comprises: Determining a second number of hard disks to be upgraded in each target storage node; Stopping upgrading the target storage nodes and eliminating the target storage nodes from the second storage nodes under the condition that the second number is zero; And under the condition that the second number is not zero, selecting one hard disk to be upgraded from the hard disk array, and upgrading the firmware on the hard disk to be upgraded.
- 7. The method of claim 1, wherein the upgrading firmware on a single hard disk to be upgraded in the hard disk array for each of the target storage nodes comprises: switching the state of the single hard disk to be upgraded to an offline state; Upgrading the firmware on the hard disk to be upgraded in the offline state; And after the firmware is upgraded, switching the state of the hard disk to be upgraded into a standby state.
- 8. A firmware upgrade apparatus, the apparatus comprising: The system comprises a building module, a storage module and a storage module, wherein the building module is used for building all hard disks on each first storage node in a distributed storage system into a hard disk array; The node determining module is used for determining a target storage node of each parallel upgrade from all second storage nodes to be upgraded in each round of circulation; The upgrading module is used for upgrading firmware on a single hard disk to be upgraded in the hard disk array aiming at each target storage node, and dynamically executing consistency verification tasks on all the hard disks according to the load of the target storage nodes after the firmware is upgraded; And the circulation module is used for entering the next circulation after the execution of the consistency check tasks of all the target storage nodes is completed until all the second storage nodes to be upgraded are upgraded.
- 9. An electronic device is characterized by comprising a processor; A memory for storing the processor-executable instructions; wherein the processor is configured to execute the instructions to implement the method of any one of claims 1 to 7.
- 10. A readable storage medium, characterized in that instructions in the computer readable storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the method of any one of claims 1 to 7.
Description
Firmware upgrading method, device, electronic equipment and readable storage medium Technical Field The application belongs to the technical field of computers, and particularly relates to a firmware upgrading method, a device, electronic equipment and a readable storage medium. Background With the continuous growth of data size, distributed storage systems have become the core infrastructure of modern data centers due to their high scalability, high reliability, and high performance. In these systems, serial advanced technology attachment solid state disk (SERIAL ADVANCED Technology Attachment Solid STATE DRIVE, SATA SSD) storage media is typically employed. SATA SSDs require periodic firmware updates to repair potential defects, improve performance, or enhance compatibility. In the prior art, when firmware on the SATA SSD is upgraded, service services of the entire storage node or the entire resource pool need to be suspended, and then firmware upgrade is performed on the solid state disk of the node. This approach can result in disruption of business services and failure to meet the high availability requirements of modern data centers. Disclosure of Invention The embodiment of the application aims to provide a firmware upgrading method, a device, electronic equipment and a readable storage medium, which can reduce the influence on normal operation of front-end service and the difficulty in firmware upgrading when firmware on each storage node in a distributed storage system is upgraded. In a first aspect, an embodiment of the present application provides a firmware upgrade method, including: For each first storage node in a distributed storage system, constructing all hard disks on the first storage node into a hard disk array; In each round of circulation, determining a target storage node of each parallel upgrade from all second storage nodes to be upgraded; updating firmware on a single hard disk to be updated in the hard disk array aiming at each target storage node, and dynamically executing a consistency check task on all the hard disks according to the load of the target storage node after the firmware is updated; And after the consistency check task of all the target storage nodes is executed, entering a next round of circulation until all the second storage nodes to be upgraded are upgraded. In a second aspect, an embodiment of the present application provides a firmware upgrade apparatus, including: The system comprises a building module, a storage module and a storage module, wherein the building module is used for building all hard disks on each first storage node in a distributed storage system into a hard disk array; The node determining module is used for determining a target storage node of each parallel upgrade from all second storage nodes to be upgraded in each round of circulation; The upgrading module is used for upgrading firmware on a single hard disk to be upgraded in the hard disk array aiming at each target storage node, and dynamically executing consistency verification tasks on all the hard disks according to the load of the target storage nodes after the firmware is upgraded; And the circulation module is used for entering the next circulation after the execution of the consistency check tasks of all the target storage nodes is completed until all the second storage nodes to be upgraded are upgraded. In a third aspect, an embodiment of the present application provides an electronic device, including a processor, a memory, and a program or instruction stored on the memory and executable on the processor, the program or instruction implementing the steps of the method according to the first aspect when executed by the processor. In a fourth aspect, embodiments of the present application provide a readable storage medium having stored thereon a program or instructions which when executed by a processor perform the steps of the method according to the first aspect. In a fifth aspect, an embodiment of the present application provides a chip, where the chip includes a processor and a communication interface, where the communication interface is coupled to the processor, and where the processor is configured to execute a program or instructions to implement a method according to the first aspect. In the embodiment of the application, aiming at each storage node in the distributed storage system, all the hard disks on the storage node are built into an array logic disk with redundancy, and in the process of upgrading one of the physical hard disks in an offline state, the upper layer service can normally use other physical hard disks in the array logic disk, namely, even if one of the physical hard disks is in the offline state, the upper layer service can normally access the array logic disk. After the firmware on the physical hard disk is upgraded, the state of the physical hard disk is pulled up, the upper layer service is not blocked from accessing the array logic disk in the wh