CN112947957A - Method, system and medium for upgrading hard disk firmware and collecting information - Google Patents

Method, system and medium for upgrading hard disk firmware and collecting information Download PDF

Info

Publication number
CN112947957A
CN112947957A CN202110098920.1A CN202110098920A CN112947957A CN 112947957 A CN112947957 A CN 112947957A CN 202110098920 A CN202110098920 A CN 202110098920A CN 112947957 A CN112947957 A CN 112947957A
Authority
CN
China
Prior art keywords
solid state
firmware
state disk
disk
upgrading
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
CN202110098920.1A
Other languages
Chinese (zh)
Inventor
王帆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202110098920.1A priority Critical patent/CN112947957A/en
Publication of CN112947957A publication Critical patent/CN112947957A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a method for upgrading hard disk firmware and collecting information, which comprises the following steps: writing an upgrade package, acquiring bus numbers of a plurality of solid state disks, and acquiring the current capacity and disk identifier of the solid state disks; downloading an upgrade package and activating; detecting whether the firmware version of the solid state disk meets the requirement of firmware upgrading or not, and acquiring a field of the solid state disk; according to the method, the firmware upgrading of the solid state disk in the server can be realized remotely, whether the upgraded firmware is the latest version firmware can be judged after upgrading, one instruction can be operated repeatedly in the upgrading process, and the operation of upgrading the firmware of all the solid state disks on the server can be completed.

Description

Method, system and medium for upgrading hard disk firmware and collecting information
Technical Field
The invention relates to the technical field of server hard disks, in particular to a method, a system and a medium for upgrading hard disk firmware and collecting information.
Background
The SSD NVMe-Harding is a solid state disk with low positioning power consumption, high cost performance and enterprise level, when the solid state disk is developed at the final stage, operations such as version burning, firmware upgrading, disk information checking and the like need to be carried out on the solid state disk, and information of the solid state disk can only be checked through a terminal window at present, so the following problems exist:
at present, a server is generally 12 or 10 slot positions, each slot position needs to be provided with a solid state disk, when firmware is upgraded, a bus number, slot position information, drive letter information and solid state disk capacity information need to be checked manually, firmware is downloaded and activated one by one to each solid state disk, and hot reboot loading is carried out on the firmware according to a reset instruction.
After the firmware of the solid state disk is upgraded, each field of each solid state disk needs to be checked and screened through a terminal window, because 12 or 10 solid state disks are arranged on a server, each solid state disk is checked through the terminal window, and the check fields of different hard disks have certain difference, the comprehensiveness and the certainty of field checking and screening are difficult to guarantee through manual execution;
moreover, when the solid state disk is checked and screened, the information and the field information of the solid state disk cannot be recorded, which is not beneficial to the management of the solid state disk and the screening of the solid state disk of the same type.
Disclosure of Invention
The invention mainly solves the problem that the detection process is too complicated in the detection process of the server power supply firmware.
In order to solve the technical problems, the invention adopts a technical scheme that: the method for upgrading the hard disk firmware and collecting the information comprises the following steps: obtaining an upgrade package, and obtaining bus numbers, current capacities and disk identifiers of a plurality of solid state disks;
downloading and activating the upgrade package, and upgrading the firmware of the solid state disk through the upgrade package;
detecting whether the firmware version of the solid state disk meets the requirement of firmware upgrading, and if so, acquiring a field of the solid state disk;
screening a plurality of key indexes of the solid state disk according to the fields, judging whether the key indexes meet an index threshold value, and storing the key indexes which do not meet the index threshold value into an archive file;
creating a form beautification library that displays the key indicators within the archived file.
Further, the downloading and activating the upgrade package, and the step of completing the firmware upgrade of the solid state disk by the upgrade package further includes:
a downloading step: obtaining the drive letter and the current capacity by using a downloading instruction, and downloading the upgrade package to the solid state disk;
an activation step: activating the upgrade package using an activation instruction;
and (3) circulating step: the downloading step and the activating step are repeatedly performed using loop instructions.
Further, the step of detecting whether the firmware version of the solid state disk meets the requirement of firmware upgrade, and if so, the step of acquiring the field of the solid state disk further includes:
acquiring a serial number of the solid state disk by using an ID acquisition instruction, acquiring the firmware version of the solid state disk by using a disk list instruction, inquiring whether the firmware version is consistent with the firmware version contained in the upgrade package according to the serial number, and if so, judging that the firmware version of the solid state disk meets the requirement of firmware upgrade; if not, judging that the firmware version of the solid state disk does not meet the requirement of firmware upgrading, and displaying the bus number of the solid state disk.
Further, the step of screening a plurality of key indexes of the solid state disk according to the field, judging whether the key indexes meet an index threshold value, and storing the key indexes which do not meet the index threshold value into an archive file further comprises:
the key indexes comprise warning instructions, wear leveling counts, bad blocks and commit-ids, whether the warning instructions, the wear leveling counts, the bad blocks and the commit-ids meet the index threshold or not is judged by using judgment instructions, and the warning instructions, the wear leveling counts, the bad blocks and the commit-ids which do not meet the index threshold are stored in the archive file.
Further, the step of creating a beautification of form library that displays the key indicators in the archived file further comprises: the table beautification library generates tables with column names of serial numbers, wear leveling counts, firmware versions, bad blocks, and commit-ids, and populates the archive file into the tables.
Further, the step of obtaining the upgrade package and obtaining the bus numbers, the current capacities and the disk identifiers of the plurality of solid state disks further comprises:
and acquiring bus numbers of the solid state disks by using the equipment instruction, and acquiring the current capacity of the solid state disks by using the total capacity instruction.
The invention also provides a system for upgrading the hard disk firmware and collecting information, which is applied to the server and comprises the following components:
the device comprises a control module, a checking module and a display module;
the control module is used for storing an upgrade package, acquiring a bus number, a disk identifier and the current capacity of the solid state disk of the server, and upgrading the firmware of the solid state disk;
the verification module is used for verifying the firmware version of the solid state disk, acquiring key indexes of the solid state disk and screening the key indexes;
the display module is used for displaying the screened key indexes.
Further, the control module comprises a downloading unit and an activating unit;
the downloading unit downloads the upgrade package to the solid state disk according to the disk identifier of the solid state disk and the current capacity;
the activation unit is used for activating the upgrade package downloaded to the solid state disk.
Further, the checking module comprises a consistency detection unit and a field acquisition unit, and the checking module is provided with an index threshold;
the consistency detection unit detects whether the firmware version of the solid state disk is consistent with the firmware version of the upgrade package, and if so, the consistency detection unit informs a field acquisition unit to acquire key indexes;
the field acquisition unit acquires the key indexes of the solid state disk, judges whether the key indexes are contained in the index threshold value, and if not, sends the key indexes which are not contained to the display module.
The invention also provides a computer readable storage medium, which stores a computer program, wherein the computer program is used for realizing any method steps of hard disk firmware upgrading and information collection when being executed by a processor.
The invention has the beneficial effects that:
1. the method for upgrading the firmware of the hard disk and collecting the information can realize the remote firmware upgrading of the solid state disk in the server, judge whether the upgraded firmware is the latest version firmware after upgrading, and realize the repeated operation of one instruction cycle in the upgrading process to finish the firmware upgrading operation of all the solid state disks on the server.
2. The system for upgrading the firmware of the hard disk and collecting the information can acquire the current capacity and the drive letter of the solid state disk, download and activate the firmware package and the upgrading script through the current capacity and the drive letter, acquire the key indexes after the firmware is upgraded and store the key indexes.
3. The medium for upgrading the hard disk firmware and collecting the information can realize the detection of the consistency of the firmware version numbers, and after the detection is successful, the key indexes of the solid state disk are obtained, and the key indexes are judged and selectively displayed.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic diagram of a method for upgrading a hard disk firmware and collecting information according to embodiment 1 of the present invention;
FIG. 2 is a schematic diagram of a system for upgrading firmware of a hard disk and collecting information according to embodiment 2 of the present invention;
fig. 3 is a structural topology diagram of a control module of the system for upgrading hard disk firmware and collecting information according to embodiment 2 of the present invention;
fig. 4 is a structural topology diagram of a verification module of the system for upgrading hard disk firmware and collecting information according to embodiment 2 of the present invention;
fig. 5 is a structural topology diagram of a display module of the system for upgrading the hard disk firmware and collecting information according to embodiment 2 of the present invention.
Detailed Description
The technical solutions of the present invention will be described clearly and completely with reference to the accompanying drawings, and it should be understood that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that, in the description of the present invention, ssh (secure shell) is a secure shell protocol.
Example 1
The embodiment of the present invention provides a method for upgrading a hard disk firmware and collecting information, please refer to fig. 1, which includes the following steps;
s100, upgrading firmware;
the servers are connected to the same local area network when leaving a factory, each server needs to be connected with 10 or 12 solid state disks, so that a terminal window of the hard disks is remotely logged in through a sshpass login tool of a secure shell protocol SSH, a new firmware package and an upgrade script of the solid state disks, which need firmware upgrade, are stored in the servers, the bus numbers of all the solid state disks connected with the servers are obtained through a Linux lspci command, the bus numbers corresponding to the solid state disks are clearly known through the bus numbers, and the current capacity of each solid state disk is obtained through a get-capacity command,
the method comprises the steps of obtaining disk symbols of the solid state disk, downloading and matching a new firmware package and an upgrading script for firmware upgrading through fw-download according to the current capacity of the solid state disk, activating the new firmware package and the upgrading script for firmware upgrading through fw-activate, carrying out firmware upgrading operation, obtaining the disk symbols of all the solid state disks on a server through a for-loop instruction, upgrading the firmware of all the solid state disks through the mode, and achieving the remote multi-disk automatic firmware upgrading process.
S200, checking information of the solid state disk;
s201, acquiring firmware version information of the solid state disk through an nvme list instruction, acquiring serial number information of the solid state disk through id-ctrl, checking whether the current firmware version of the solid state disk is consistent with the upgrading version in the step S100 according to the serial number of the solid state disk, judging whether the firmware of the solid state disk is successfully upgraded, if the firmware upgrade requirement of the solid state disk is met, performing the step S202, if the firmware upgrade requirement is not met, reporting an error, and displaying a bus number of the hard disk so that a maintainer can conveniently overhaul;
s202, obtaining relevant fields of disk information of each solid state disk on a server through a terminal window by using sshpass of SSH, wherein the relevant fields comprise smart-log, vendor-extended-log and smart-vendor, screening out information such as warning information, pe, bad blocks, commit-id and the like of the server hard disk from the smart-log, vendor-extended-log and smart-vendor, setting a threshold, and judging whether the relevant fields meet threshold requirements or not through a conditional instruction if else;
s203, outputting the relevant fields of the disc information that do not meet the requirements to a drop.
S300, generating a table according to drop.log;
in order to facilitate the maintenance personnel to manage the disc information which does not meet the requirements, a pretttytable library is created, the pretttytable library is a table beautifying library, the pretttytable library generates tables with column names of serial numbers, firmware versions, wear leveling counts, bad blocks and commit-ids according to the drop.
Example 2
The embodiment of the present invention provides a system for upgrading a hard disk firmware and collecting information, which is applied to a server, please refer to fig. 2, and the system includes;
the device comprises a control module, a checking module and a display module;
the control module is provided with a sshpass tool of a secure shell protocol SSH, the sshpass tool interacts with a solid state disk on a server through a remote shell protocol, after the control module interacts with the server, a repairman inputs a new firmware package and a script required for upgrading, the repairman needs to upgrade the firmware of the solid state disk of the server, acquires bus numbers of all the solid state disks in the server through a linux lspci command unit in the control module, acquires the current capacity of each solid state disk through a get-capacity command unit, the repairman acquires a drive letter of the solid state disk of the server through the control module, the maintainer uses a fw-download command unit in the control module, matches the new firmware package and the script required for upgrading through the current capacity of the solid state disk and downloads the new firmware package and the script required for upgrading, the repairman uses a fw-activate command unit in the control module to activate the new firmware package and the script required for upgrading, and the tester uses the for-loop instruction unit to execute the same operation on each solid state disk on the server, and executes the same operation on each solid state disk to upgrade the firmware.
When the control module finishes upgrading the firmware of the solid state disk of the server, the verification module performs integrity verification on the upgraded firmware, the firmware version information of the solid state disk is obtained through the nvme list unit, the serial number of the solid state disk is obtained through the id-ctrl unit, the verification module compares the serial number of a new firmware package after upgrading the firmware of the solid state disk with the serial number of the new firmware package, whether the updated firmware version is the successfully-upgraded firmware version is judged, if yes, the fields of all the hard disks in the server are continuously obtained, the index file name of the firmware fields of the solid state disk is obtained through the smart-log unit, the vendor expanded field unit and the smart-vendor index unit screen and obtain the warning information, the edge equipment, the bad block, the commit-id and the like of the firmware upgrade of the solid state disk of the server, and the branch judgment unit is used for judging the warning information, the edge equipment, the bad block, the commit-id and the commit, And whether the bad block, the commit-id and the like meet the requirements of the preset field of the check module, and outputting the information of the solid state disk which does not meet the requirements to a drop.
The display module reads data in the drop log filing file unit, the display module is provided with a pretttyTable library, a table with the column names of the serial number, the firmware version, the wear balance count, the bad block and the commit-id of the solid state disk is generated through the pretttyTable library, and the data in the drop log filing file unit is displayed in the pretttyTable library table.
Based on the same inventive concept as the method in the foregoing embodiments, the embodiments of this specification further provide a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the multi-operating system fast switching method as disclosed in the foregoing are implemented.
The numbers of the embodiments disclosed in the embodiments of the present invention are merely for description, and do not represent the merits of the embodiments.
It will be understood by those skilled in the art that all or part of the steps of implementing the above embodiments may be implemented by hardware, and a program that can be implemented by the hardware and can be instructed by the program to be executed by the relevant hardware may be stored in a computer readable storage medium, where the storage medium may be a read-only memory, a magnetic or optical disk, and the like.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes performed by the present specification and drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A method for upgrading hard disk firmware and collecting information is characterized by comprising the following steps:
obtaining an upgrade package, and obtaining bus numbers, current capacities and disk identifiers of a plurality of solid state disks;
downloading and activating the upgrade package, and upgrading the firmware of the solid state disk through the upgrade package;
detecting whether the firmware version of the solid state disk meets the requirement of firmware upgrading, and if so, acquiring a field of the solid state disk;
screening a plurality of key indexes of the solid state disk according to the fields, judging whether the key indexes meet an index threshold value, and storing the key indexes which do not meet the index threshold value into an archive file;
creating a form beautification library that displays the key indicators within the archived file.
2. The method of claim 1, wherein the method comprises: the step of downloading and activating the upgrade package, and completing the firmware upgrade of the solid state disk through the upgrade package further comprises:
a downloading step: obtaining the drive letter and the current capacity by using a downloading instruction, and downloading the upgrade package to the solid state disk;
an activation step: activating the upgrade package using an activation instruction;
and (3) circulating step: the downloading step and the activating step are repeatedly performed using loop instructions.
3. The method of claim 1, wherein the method comprises: the step of detecting whether the firmware version of the solid state disk meets the requirement of firmware upgrade, and if so, acquiring the field of the solid state disk further includes:
acquiring a serial number of the solid state disk by using an ID acquisition instruction, acquiring the firmware version of the solid state disk by using a disk list instruction, inquiring whether the firmware version is consistent with the firmware version contained in the upgrade package according to the serial number, and if so, judging that the firmware version of the solid state disk meets the requirement of firmware upgrade; if not, judging that the firmware version of the solid state disk does not meet the requirement of firmware upgrading, and displaying the bus number of the solid state disk.
4. The method of claim 1, wherein the method comprises: the step of screening a plurality of key indexes of the solid state disk according to the field, judging whether the key indexes meet an index threshold value, and storing the key indexes which do not meet the index threshold value into an archive file further comprises the following steps:
the key indexes comprise warning instructions, wear leveling counts, bad blocks and commit-ids, whether the warning instructions, the wear leveling counts, the bad blocks and the commit-ids meet the index threshold or not is judged by using judgment instructions, and the warning instructions, the wear leveling counts, the bad blocks and the commit-ids which do not meet the index threshold are stored in the archive file.
5. The method of claim 1, wherein the method comprises: the step of creating a form beautification library that displays the key indicators within the archived file further comprises: the table beautification library generates tables with column names of serial numbers, wear leveling counts, firmware versions, bad blocks, and commit-ids, and populates the archive file into the tables.
6. The method of claim 1, wherein the method comprises: the steps of obtaining the upgrade package and obtaining the bus numbers, the current capacity and the disk identifiers of the plurality of solid state disks further comprise:
and acquiring bus numbers of the solid state disks by using the equipment instruction, and acquiring the current capacity of the solid state disks by using the total capacity instruction.
7. A system for upgrading hard disk firmware and collecting information is applied to a server, and is characterized by comprising:
the device comprises a control module, a checking module and a display module;
the control module is used for storing an upgrade package, acquiring a bus number, a disk identifier and the current capacity of the solid state disk of the server, and upgrading the firmware of the solid state disk;
the verification module is used for verifying the firmware version of the solid state disk, acquiring key indexes of the solid state disk and screening the key indexes;
the display module is used for displaying the screened key indexes.
8. The system for hard disk firmware upgrade and information collection according to claim 7, wherein: the control module comprises a downloading unit and an activating unit;
the downloading unit downloads the upgrade package to the solid state disk according to the disk identifier of the solid state disk and the current capacity;
the activation unit is used for activating the upgrade package downloaded to the solid state disk.
9. The system for hard disk firmware upgrade and information collection according to claim 7, wherein: the checking module comprises a consistency detection unit and a field acquisition unit, and is provided with an index threshold;
the consistency detection unit detects whether the firmware version of the solid state disk is consistent with the firmware version of the upgrade package, and if so, the consistency detection unit informs a field acquisition unit to acquire key indexes;
the field acquisition unit acquires the key indexes of the solid state disk, judges whether the key indexes are contained in the index threshold value, and if not, sends the key indexes which are not contained to the display module.
10. A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, carries out the method steps of firmware upgrade and information collection of a hard disk according to any one of claims 1 to 6.
CN202110098920.1A 2021-01-25 2021-01-25 Method, system and medium for upgrading hard disk firmware and collecting information Withdrawn CN112947957A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110098920.1A CN112947957A (en) 2021-01-25 2021-01-25 Method, system and medium for upgrading hard disk firmware and collecting information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110098920.1A CN112947957A (en) 2021-01-25 2021-01-25 Method, system and medium for upgrading hard disk firmware and collecting information

Publications (1)

Publication Number Publication Date
CN112947957A true CN112947957A (en) 2021-06-11

Family

ID=76236589

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110098920.1A Withdrawn CN112947957A (en) 2021-01-25 2021-01-25 Method, system and medium for upgrading hard disk firmware and collecting information

Country Status (1)

Country Link
CN (1) CN112947957A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113918197A (en) * 2021-12-13 2022-01-11 苏州浪潮智能科技有限公司 Firmware upgrading method, system, storage medium and equipment
CN114443074A (en) * 2022-01-23 2022-05-06 苏州浪潮智能科技有限公司 Method, system, equipment and storage medium for remotely burning firmware
CN118132118A (en) * 2024-04-30 2024-06-04 苏州元脑智能科技有限公司 Firmware upgrading method and device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113918197A (en) * 2021-12-13 2022-01-11 苏州浪潮智能科技有限公司 Firmware upgrading method, system, storage medium and equipment
CN114443074A (en) * 2022-01-23 2022-05-06 苏州浪潮智能科技有限公司 Method, system, equipment and storage medium for remotely burning firmware
CN118132118A (en) * 2024-04-30 2024-06-04 苏州元脑智能科技有限公司 Firmware upgrading method and device

Similar Documents

Publication Publication Date Title
CN112947957A (en) Method, system and medium for upgrading hard disk firmware and collecting information
CN102622298B (en) Software testing system and method
CN102736978B (en) A kind of method and device detecting the installment state of application program
US9626271B2 (en) Multivariate metadata based cloud deployment monitoring for lifecycle operations
KR101143679B1 (en) Automated firmware recovery
CN109189430A (en) A kind of power supply firmware upgrade method, device, equipment and storage medium
CN101616018A (en) The method of upgrading network management software and device
CN109165170B (en) Method and system for automatic request test
CN111694760B (en) Server system, flash memory module and method for updating firmware mapping file
CN114115984A (en) Server firmware upgrading method, storage device and terminal
CN104360952A (en) Software test system and software test method
CN115033258A (en) Automatic upgrading and pressure testing method for SD card firmware of camera
CN112994952B (en) Distributed base station upgrading processing method and system
CN112083972B (en) BMC system configuration method, device, equipment and readable storage medium
CN112416803A (en) Automatic testing method and device
CN111258608A (en) Software upgrading method and device for terminal equipment and electronic system
EP3260981B1 (en) Information processing apparatus, information processing system, and information processing method for updating firmware
CN113157307A (en) Software version upgrading method and device
CN109614279B (en) Industrial personal computer self-checking system and control method thereof and related equipment
CN113434353B (en) Method and device for testing server, electronic equipment and storage medium
CN115455431A (en) Method, device, terminal and medium for automatic code security detection and vulnerability repair
CN109245920B (en) Automatic switch configuration method and device, switch and storage medium
CN111538509B (en) OS installation test method, device and related equipment
CN109254899B (en) Server monitoring method and device
CN115291925A (en) BMC upgrading method, system, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20210611