CN107402753B - Method and device for refreshing hard disk firmware - Google Patents
Method and device for refreshing hard disk firmware Download PDFInfo
- Publication number
- CN107402753B CN107402753B CN201710522683.0A CN201710522683A CN107402753B CN 107402753 B CN107402753 B CN 107402753B CN 201710522683 A CN201710522683 A CN 201710522683A CN 107402753 B CN107402753 B CN 107402753B
- Authority
- CN
- China
- Prior art keywords
- hard disk
- firmware
- list
- refreshing
- information
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 54
- 238000012216 screening Methods 0.000 claims abstract description 25
- 238000000605 extraction Methods 0.000 claims description 8
- 238000012217 deletion Methods 0.000 claims description 6
- 230000037430 deletion Effects 0.000 claims description 6
- 238000012795 verification Methods 0.000 claims 1
- 239000000284 extract Substances 0.000 abstract description 4
- 230000008569 process Effects 0.000 description 10
- 230000009471 action Effects 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000008520 organization Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
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)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The embodiment of the invention provides a method and a device for refreshing hard disk firmware, which are characterized in that hard disk information of all hard disks in a storage system is obtained; extracting hard disk identifiers from the hard disk information to form a first list; screening the first list to obtain a second list; and refreshing the corresponding firmware file to each hard disk of the second list. The embodiment of the invention extracts the hard disk identification from the hard disk information, forms a first list through rough screening, and obtains a second list through precise screening, wherein the second list can comprise all hard disks needing firmware refreshing, and firmware refreshing is carried out according to the second list, so that all necessary hard disks are guaranteed to carry out firmware refreshing, and the firmware refreshing quality is improved.
Description
Technical Field
The invention relates to the technical field of storage systems, in particular to a method and a device for refreshing hard disk firmware.
Background
Storage systems are typically comprised of hard disks that carry large amounts of user data. Under the background of the rapid development of the IT industry, the user scale of the storage system is gradually enlarged, the data security requirement on the storage system is also gradually increased, and the quality requirement on the hard disk is stricter because the hard disk is an important component of the storage system.
In order to ensure the quality of the hard disk and further ensure the stability of the whole storage system, the firmware (english: firmware) of the hard disk needs to be refreshed. The firmware is software which serves as a system foundation and a bottom layer and generally determines the function and performance of a hard disk; the key to ensure the quality of the hard disk is to refresh the firmware of the hard disk.
However, through research, the inventor finds that a storage system usually includes a large number of hard disks, and during a process of firmware refreshing of the hard disks, some hard disks requiring firmware refreshing are likely to miss-refresh, and the refresh quality is poor.
Therefore, how to improve the refresh quality of the hard disk firmware is a technical problem that needs to be solved by those skilled in the art.
Disclosure of Invention
In view of the above drawbacks of the prior art, an object of the present invention is to provide a method and an apparatus for refreshing hard disk firmware, which are used to solve the problem of poor quality of hard disk firmware refresh in the prior art.
To achieve the above and other related objects, according to a first aspect of the present invention, an embodiment of the present invention provides a method for refreshing hard disk firmware, including:
acquiring hard disk information of all hard disks in a storage system;
extracting hard disk identifiers from the hard disk information to form a first list;
screening the first list to obtain a second list;
and refreshing the corresponding firmware file to each hard disk of the second list.
Optionally, the extracting a hard disk identifier from the hard disk information includes:
extracting an information line with a first keyword from the hard disk information lines;
deleting the information lines with the second keywords from the extracted information lines;
and respectively extracting the information blocks at fixed positions from the rest information lines after deletion to obtain hard disk identifiers.
Optionally, the method further comprises:
and deleting the separators which do not match with the preset format from the extracted hard disk identifiers.
Optionally, the screening the first list to obtain a second list includes:
acquiring a firmware version number of the hard disk according to the hard disk identifier;
and when the firmware version number is equal to a preset reference version number, deleting the corresponding hard disk identifier from the first list to obtain a second list.
Optionally, the refreshing the corresponding firmware file to each hard disk of the second list includes:
selecting a firmware file corresponding to the hard disk from the firmware library according to the hard disk identifier in the second list;
and refreshing the selected firmware file to the corresponding hard disk.
Optionally, the refresh method further includes:
acquiring a firmware version number of a hard disk after firmware refreshing;
and when the firmware version number is not equal to the preset reference version number, sending an error message, wherein the error message carries a corresponding hard disk identifier and is used for identifying a corresponding hard disk firmware refresh error.
According to a second aspect of the present invention, an embodiment of the present invention further provides a device for refreshing hard disk firmware, where the device includes:
the acquisition module is used for acquiring hard disk information of all hard disks in the storage system;
the extraction module is used for extracting hard disk identifiers from the hard disk information to form a first list;
the screening module is used for screening the first list to obtain a second list;
and the refreshing module is used for refreshing the corresponding firmware file to each hard disk of the second list.
Optionally, the extraction module is configured to,
extracting an information line with a first keyword from the hard disk information;
deleting the information lines with the second keywords from the extracted information lines;
and respectively extracting the information blocks at fixed positions from the rest information lines after deletion to obtain hard disk identifiers.
Optionally, the screening module is configured to,
acquiring a firmware version number of the hard disk according to the hard disk identifier;
and when the firmware version number is equal to a preset reference version number, deleting the corresponding hard disk identifier from the first list to obtain a second list.
Optionally, the refreshing apparatus further comprises a checking module for,
and when the firmware version number is not equal to the preset reference version number, sending an error message, wherein the error message carries a corresponding hard disk identifier and is used for identifying a corresponding hard disk firmware refresh error.
As described above, the method and apparatus for refreshing hard disk firmware provided in the embodiments of the present invention have the following beneficial effects: hard disk information of all hard disks in a storage system is obtained; extracting hard disk identifiers from the hard disk information to form a first list; screening the first list to obtain a second list; and refreshing the corresponding firmware file to each hard disk of the second list. The embodiment of the invention extracts the hard disk identification from the hard disk information, forms a first list through rough screening, and obtains a second list through precise screening, wherein the second list can comprise all hard disks needing firmware refreshing, and firmware refreshing is carried out according to the second list, so that all necessary hard disks are guaranteed to carry out firmware refreshing, and the firmware refreshing quality is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
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 for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
Fig. 1 is a flowchart illustrating a method for refreshing hard disk firmware according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a method for extracting hard disk identifiers according to an embodiment of the present invention;
FIG. 3 is a schematic flow chart of a screening method according to an embodiment of the present invention;
fig. 4 is a flowchart illustrating a hard disk refreshing method according to an embodiment of the present invention;
FIG. 5 is a block diagram illustrating another method for refreshing hard disk firmware according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a device for refreshing hard disk firmware according to an embodiment of the present invention.
Detailed Description
In order to make those skilled in the art better understand the technical solution of the present invention, the technical solution in the embodiment of the present invention will be clearly and completely described below with reference to the drawings in the embodiment of the present invention, and it is obvious that the described embodiment is only a part of the embodiment of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Please refer to fig. 1 to 6. It should be noted that the drawings provided in the present embodiment are only for illustrating the basic idea of the present invention, and the drawings only show the components related to the present invention rather than being drawn according to the number, shape and size of the components in actual implementation, and the type, quantity and proportion of each component in actual implementation may be changed arbitrarily, and the layout of the components may be more complicated.
Fig. 1 is a schematic flowchart of a method for refreshing hard disk firmware according to an embodiment of the present invention. As shown in fig. 1, the method comprises the steps of:
step S101: and acquiring hard disk information of all hard disks in the storage system.
In specific implementation, the hard disk information of all hard disks in the storage system can be acquired through the control instruction. In an exemplary embodiment, the hard disk information may be acquired using a control command of "fdisk-l". The hard disk information may include hard disk identifiers, hard disk capacities, sector numbers, sector capacities, magnetic pole numbers, magnetic pole capacities, and the like of all hard disks in the storage system.
Moreover, the hard disk information includes a plurality of information lines. In an exemplary embodiment, the hard disk information includes a first information line and a second information line; wherein, the first information line is represented as Disk/dev/sdb: 27000.3GB, 27000311906304 bytes, and is used for representing that the hard Disk capacity of the hard Disk identified as "/dev/sdb" is 27000.3GB, 27000311906304 bytes; the second information row is denoted "Units = sectors of 1 × 512 = 512 bytes", sector capacity 512 bytes.
Each information line further comprises a plurality of information blocks which are separated by spaces. For example, for the first information line described above, 5 information blocks, specifically "Disk", "/dev/sdb:", "27000.3 GB", "", "27000311906304", and "bytes" may be included.
The following steps will be described in detail by taking the hard disk information including the first information line and the second information line as an example.
It should be noted that the above-mentioned manner for acquiring the hard disk information is only an exemplary embodiment, and in specific implementation, the hard disk information of all hard disks in the storage system may be acquired by other command tools; moreover, the organization form of the hard disk information is not limited to the description of the above embodiments.
Step S102: and extracting hard disk identifiers from the hard disk information to form a first list.
The embodiment of the invention extracts all hard disk identifications from the hard disk information according to the keywords, and the extracted hard disk identifications form a first list.
Fig. 2 is a schematic flow chart of the method for extracting hard disk identifiers according to the embodiment of the present invention. As shown in fig. 2, the method includes:
step S1021: and extracting an information line with a first keyword from the hard disk information.
According to the hard disk information obtained in step S101, the information lines where the hard disk identifiers are located have the same repeated characters. According to the exemplary hard Disk information in step S101, the repeated characters may include "Disk", "/dev/sd".
In the first embodiment, any one of the above repeated characters may be used as the first keyword, so as to extract the information line in which the first keyword is located. In an exemplary implementation, the information line with the first keyword can be extracted by using a "sed" command, and generating a corresponding regular expression of "/Disk" or "\/ dev \ sd/p" according to the first keyword, and by combining the "sed" command and the regular expression, the information line where the first keyword is located can be extracted.
In the second embodiment, the combination of the repeated characters may be used as the first keyword, so as to extract the information line where the first keyword is located. In another exemplary embodiment, the regular expression generated according to the first keyword may be "/Disk \/dev \ sd/p", so that the information line where the first keyword is located can be extracted through the combination of the "sed" command and the regular expression.
Through the first keyword, the extracted information is used as a first information line, namely 'Disk/dev/sdb: 27000.3GB, 27000311906304 bytes'.
Step S1022: from the extracted information lines, the information lines having the second keyword are deleted.
Since the extracted information rows may include unnecessary information rows, such as an information row including "sda", which generally represents a system disk rather than a hard disk that needs firmware refresh, the extracted information rows need to be filtered to delete the unnecessary information rows. In an exemplary embodiment, in order to delete an information line containing "sda", the information line having the second key may be deleted by calling the "sed" command with "sda" as the second key.
Step S1023: and respectively extracting the information blocks at fixed positions from the rest information lines after deletion to obtain hard disk identifiers.
In an exemplary embodiment, after step S1022, the remaining information row is the first information row. In the first information line, the information block at the second position is the hard disk identification needing to be extracted. In a specific implementation, the hard disk identifier may be extracted by calling an "awk" command and formulating an information block for extracting the second location. After the processing of step S1023, the information block "/dev/sdb:" at the second position can be extracted from the first information line, and the information block can be used as a hard disk identification to be processed in the subsequent steps.
It should be noted that, the above process of extracting the information row is only an exemplary embodiment, and when the process is implemented in detail, any other command or other regular expression in any form may be used, which is not limited in the embodiment of the present invention.
In order to obtain a hard disk identifier in a standard format, an embodiment of the present invention further provides another hard disk identifier extraction method, and after the step S1023 is executed on the basis of the extraction method shown in fig. 2, the method may further include the steps of: and deleting the separators which do not match with the preset format from the extracted hard disk identifiers.
In an exemplary embodiment, the predetermined format may be "/dev/sd", wherein "", may be a wildcard character identifying any alphabetic or numeric character, etc. Thus, by traversing the comparison step S1023 to obtain each character in the hard disk ID, it can be determined that "/dev/sdb:" does not match the preset format, a separator ": is added at the end, and the separator": needs to be removed ". Similarly, the separator can be removed by calling the 'awk' command, so that the hard disk identifier meeting the preset format can be obtained, and thus, the hard disk identifier can be directly called by the subsequent steps, and the refresh speed of the hard disk firmware is improved.
Step S103: and screening the first list to obtain a second list.
Since a plurality of hard disks that do not need to be refreshed may be included in the storage system, such a firmware refresh performed through the first list may refresh unnecessary hard disks, affecting the firmware refresh rate, and may even cause a hard disk failure due to forced firmware refresh.
Fig. 3 is a schematic flow chart of a screening method according to an embodiment of the present invention. As shown in fig. 3, the embodiment of the present invention shows a process of screening a first list:
step S1031: and acquiring the firmware version number of the hard disk according to the hard disk identification.
And according to the hard disk identification, the firmware version number of the hard disk corresponding to the hard disk identification can be obtained by calling the corresponding query command.
Step S1032: and when the firmware version number is equal to a preset reference version number, deleting the corresponding hard disk identifier from the first list to obtain a second list.
The corresponding relation between the hard disk identifier and the reference version number can be established in advance for the hard disk used in the storage system. For example, the first hard disk identifier corresponds to a first reference version number, the second hard disk identifier corresponds to a second reference version number, the first reference version number is a firmware version that the first hard disk can be refreshed, and the second reference version number is a firmware version that the second hard disk can be refreshed.
When the firmware version number is equal to the preset reference version number, for example, the firmware version number of the first hard disk obtained through the query in step S1031 is equal to the first reference version number, and the hard disk identifier corresponding to the first hard disk is deleted from the first list. And traversing all the hard disks corresponding to the first list, and after judging the firmware version numbers of all the hard disks and the corresponding reference version numbers and executing the operation, obtaining a screened second list. The second list comprises the hard disk needing firmware refreshing, so that the hard disk firmware refreshing is prevented from being re-refreshed, the accuracy of the firmware refreshing of the hard disk is improved, and the refreshing quality is further improved.
Step S104: and refreshing the corresponding firmware file to each hard disk of the second list.
In the first implementation case, all the hard disks used by the storage system may be hard disks of the same manufacturer, the same type, and the same model, so as to ensure the compatibility of the storage system. For example, the hard disks are SATA type mechanical hard disks manufactured by manufacturer a, and the models are the same, so that all the hard disks in the storage system can be upgraded by using the same firmware file.
In a second implementation, the storage system may use hard disks manufactured by different manufacturers, the same type of hard disks manufactured by different manufacturers, different types of hard disks manufactured by the same manufacturer, or different types of hard disks manufactured by different manufacturers, so that in the storage system, there may be a plurality of hard disks, each of which needs to be refreshed by using different firmware files. Fig. 4 is a schematic flow chart of a hard disk refreshing method according to an embodiment of the present invention. As shown in fig. 4, the method includes:
step S1041: and selecting the firmware file corresponding to the hard disk from the firmware library according to the hard disk identifier in the second list.
In specific implementation, a firmware library including a plurality of different firmware files can be established, and the firmware files in the firmware library correspond to hard disks of corresponding manufacturers, types and models. And establishing the corresponding relation between the hard disk identification and the firmware file, and determining the firmware file corresponding to the hard disk identification by inquiring the corresponding relation. In an exemplary embodiment, the firmware library may include a first firmware file and a second firmware file, where the first firmware file has a corresponding relationship with the first hard disk identifier, and the second firmware file has a corresponding relationship with the second hard disk identifier. When the first hard disk needs to be refreshed, the first firmware file can be determined to need to be refreshed through the first hard disk identifier.
Step S1042: and refreshing the selected firmware file to the corresponding hard disk.
And refreshing the corresponding firmware file to the corresponding hard disk according to the selected firmware file. In an exemplary embodiment, if the first firmware file is selected in step S1041, the first firmware file is used to perform firmware refresh on the first hard disk.
Also, in an exemplary embodiment, firmware refreshes may be performed using refresh commands using corresponding refresh tools. The corresponding firmware refresh may be accomplished, for example, by specifying the name of the firmware file, and the hard disk identification using the "seafarelin" tool. It should be noted that any other firmware refreshing tool may be used in the embodiment of the present invention, and the embodiment of the present invention is not limited thereto.
In addition, during the firmware refreshing process, the firmware refreshing can be completed by circularly calling the refreshing command in a serial mode. Or, a parallel mode can be used, a plurality of refresh commands are called simultaneously in a concurrent process to refresh the firmware, and the firmware refresh efficiency is improved.
As can be seen from the description of the above embodiment, the method for refreshing the hard disk firmware provided by the embodiment of the present invention obtains the hard disk information of all hard disks in the storage system; extracting hard disk identifiers from the hard disk information to form a first list; screening the first list to obtain a second list; and refreshing the corresponding firmware file to each hard disk of the second list. The embodiment of the invention extracts the hard disk identification from the hard disk information, forms a first list through rough screening, and obtains a second list through precise screening, wherein the second list can comprise all hard disks needing firmware refreshing, and firmware refreshing is carried out according to the second list, so that all necessary hard disks are guaranteed to carry out firmware refreshing, and the firmware refreshing quality is improved.
Referring to fig. 5, another method for refreshing hard disk firmware according to an embodiment of the present invention is provided. As shown in fig. 5, on the basis of the method for refreshing the firmware of the hard disk shown in fig. 1, in the embodiment of the present invention, after the firmware is refreshed, the firmware refreshing result may be verified to ensure the firmware refreshing quality. The refreshing method comprises the following steps:
step S201: and acquiring hard disk information of all hard disks in the storage system.
Step S202: and extracting hard disk identifiers from the hard disk information to form a first list.
Step S203: and screening the first list to obtain a second list.
Step S204: and refreshing the corresponding firmware file to each hard disk of the second list.
Step S205: and acquiring the firmware version number of the hard disk after the firmware is refreshed.
In an exemplary embodiment, after the firmware refresh of the first hard disk is completed, the firmware version number of the first hard disk is obtained.
Step S206: and when the firmware version number is not equal to the preset reference version number, sending an error message, wherein the error message carries a corresponding hard disk identifier and is used for indicating a corresponding hard disk firmware refresh error.
The reference version number which needs to be refreshed on the first hard disk can be determined through the corresponding relation between the first hard disk identifier and the reference version number. And when the firmware version number of the first hard disk is not equal to the reference version number, indicating that the firmware of the first hard disk is in a refresh error. Further, an error message may be sent, where the error message carries a corresponding hard disk identifier, and a technician is timely notified to check the corresponding hard disk through the error message.
After the error message is sent out, the process may further return to step S204 to perform firmware refresh until the hard disk firmware refresh is successful.
The embodiments of the present invention are similar to the above embodiments, and reference may be made to the description of the above embodiments, which are not repeated herein.
As can be seen from the description of the above embodiment, according to another method for refreshing a hard disk firmware provided in the embodiment of the present invention, after the firmware is refreshed, the hard disk that is to be refreshed is verified, and if the hard disk fails to be verified, an error message is sent and processed in time, so that the success rate of refreshing the hard disk firmware can be increased, and the quality of refreshing the hard disk can be further improved.
Through the above description of the method embodiments, those skilled in the art can clearly understand that the present invention can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the methods according to the embodiments of the present invention. And the aforementioned storage medium includes: various media that can store program codes, such as Read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and so on.
Corresponding to the embodiment of the method for refreshing the hard disk firmware provided by the invention, the invention also provides a device for refreshing the hard disk firmware.
Fig. 6 is a schematic structural diagram of a device for refreshing hard disk firmware according to an embodiment of the present invention. As shown in fig. 6, the refresh apparatus includes:
the acquisition module 11 is configured to acquire hard disk information of all hard disks in the storage system;
an extracting module 12, configured to extract hard disk identifiers from the hard disk information to form a first list;
the screening module 13 is configured to screen the first list to obtain a second list;
a refresh module 14, configured to refresh the corresponding firmware file into each hard disk of the second list.
Optionally, the extraction module 12 is configured to,
extracting an information line with a first keyword from the hard disk information;
deleting the information lines with the second keywords from the extracted information lines;
and respectively extracting the information blocks at fixed positions from the rest information lines after deletion to obtain hard disk identifiers.
Optionally, the extraction module 12 is further configured to,
and deleting the separators which do not match with the preset format from the extracted hard disk identifiers.
Optionally, the screening module 13 is configured to,
acquiring a firmware version number of the hard disk according to the hard disk identifier;
and when the firmware version number is equal to a preset reference version number, deleting the corresponding hard disk identifier from the first list to obtain a second list.
Optionally, the refresh module 14 is configured to,
selecting a firmware file corresponding to the hard disk from the firmware library according to the hard disk identifier in the second list;
and refreshing the selected firmware file to the corresponding hard disk.
Optionally, the refresh means may further comprise a check module 15 for,
acquiring a firmware version number after firmware refreshing;
and when the firmware version number is not equal to the preset reference version number, sending an error message, wherein the error message carries a corresponding hard disk identifier and is used for identifying a corresponding hard disk firmware refresh error.
It should be noted that, of course, corresponding modules in the refresh apparatus may be used to execute the method for refreshing the hard disk firmware described in the above method embodiment, and reference may be made to the description of the above method embodiment for the same point, which is not described herein again.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for apparatus or system embodiments, since they are substantially similar to method embodiments, they are described in relative terms, as long as they are described in partial descriptions of method embodiments. The above-described embodiments of the apparatus and system are merely illustrative, and the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The foregoing are merely exemplary embodiments of the present invention, which enable those skilled in the art to understand or practice the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims (10)
1. A method for refreshing hard disk firmware is characterized by comprising the following steps:
acquiring hard disk information of all hard disks in a storage system;
extracting hard disk identifiers from the hard disk information to form a first list;
screening the first list to obtain a second list;
and refreshing the corresponding firmware file to each hard disk of the second list.
2. The method of claim 1, wherein the extracting the hard disk identifier from the hard disk information comprises:
extracting an information line with a first keyword from the hard disk information;
deleting the information lines with the second keywords from the extracted information lines;
and respectively extracting the information blocks at fixed positions from the rest information lines after deletion to obtain hard disk identifiers.
3. The method for refreshing hard disk firmware according to claim 2, further comprising:
and deleting the separators which do not match with the preset format from the extracted hard disk identifiers.
4. The method according to claim 1, wherein the screening the first list to obtain a second list comprises:
acquiring a firmware version number of the hard disk according to the hard disk identifier;
and when the firmware version number is equal to a preset reference version number, deleting the corresponding hard disk identifier from the first list to obtain a second list.
5. The method of claim 1, wherein the refreshing the corresponding firmware file to each hard disk of the second list comprises:
selecting a firmware file corresponding to the hard disk from the firmware library according to the hard disk identifier in the second list;
and refreshing the selected firmware file to the corresponding hard disk.
6. The method for refreshing hard disk firmware according to claim 1, further comprising:
acquiring a firmware version number of a hard disk after firmware refreshing;
and when the firmware version number is not equal to the preset reference version number, sending an error message, wherein the error message carries a corresponding hard disk identifier and is used for indicating a corresponding hard disk firmware refresh error.
7. A device for refreshing hard disk firmware, comprising:
the acquisition module is used for acquiring hard disk information of all hard disks in the storage system;
the extraction module is used for extracting hard disk identifiers from the hard disk information to form a first list;
the screening module is used for screening the first list to obtain a second list;
and the refreshing module is used for refreshing the corresponding firmware file to each hard disk of the second list.
8. The apparatus of claim 7, wherein the extraction module is configured to,
extracting an information line with a first keyword from the hard disk information;
deleting the information lines with the second keywords from the extracted information lines;
and respectively extracting the information blocks at fixed positions from the rest information lines after deletion to obtain hard disk identifiers.
9. The apparatus of claim 7, wherein the filter module is configured to filter the firmware stored in the hard disk firmware,
acquiring a firmware version number of the hard disk according to the hard disk identifier;
and when the firmware version number is equal to a preset reference version number, deleting the corresponding hard disk identifier from the first list to obtain a second list.
10. The apparatus for refreshing hard disk firmware of claim 7, further comprising a verification module for,
acquiring a firmware version number after firmware refreshing;
and when the firmware version number is not equal to the preset reference version number, sending an error message, wherein the error message carries a corresponding hard disk identifier and is used for identifying a corresponding hard disk firmware refresh error.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710522683.0A CN107402753B (en) | 2017-06-30 | 2017-06-30 | Method and device for refreshing hard disk firmware |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710522683.0A CN107402753B (en) | 2017-06-30 | 2017-06-30 | Method and device for refreshing hard disk firmware |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107402753A CN107402753A (en) | 2017-11-28 |
CN107402753B true CN107402753B (en) | 2020-11-27 |
Family
ID=60404776
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710522683.0A Active CN107402753B (en) | 2017-06-30 | 2017-06-30 | Method and device for refreshing hard disk firmware |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107402753B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109213506A (en) * | 2018-08-24 | 2019-01-15 | 郑州云海信息技术有限公司 | A kind of firmware information acquisition methods and relevant apparatus |
CN109299025B (en) * | 2018-09-13 | 2021-11-19 | 郑州云海信息技术有限公司 | Management method, device, equipment and storage medium of back-end storage equipment |
CN109828929A (en) * | 2019-02-27 | 2019-05-31 | 苏州浪潮智能科技有限公司 | The anti-tamper method for testing security of hard disk firmware, system, terminal and storage medium |
CN113918197A (en) * | 2021-12-13 | 2022-01-11 | 苏州浪潮智能科技有限公司 | Firmware upgrading method, system, storage medium and equipment |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104461611A (en) * | 2014-11-05 | 2015-03-25 | 浪潮电子信息产业股份有限公司 | Method for refreshing node BIOS (basic input/output system) of RACK (RACK operating system) in batches |
CN104503781A (en) * | 2014-12-10 | 2015-04-08 | 华为技术有限公司 | Firmware upgrading method for hard disk and storage system |
CN104679530A (en) * | 2013-11-26 | 2015-06-03 | 英业达科技有限公司 | Server system and firmware updating method |
CN105589717A (en) * | 2015-12-10 | 2016-05-18 | 浪潮电子信息产业股份有限公司 | Batch BIOS refreshing method based on SSH service |
CN106681775A (en) * | 2017-01-03 | 2017-05-17 | 郑州云海信息技术有限公司 | Method for achieving online batch upgrading of hard disk firmware through RAID card under Linux system |
CN106775877A (en) * | 2016-12-22 | 2017-05-31 | 郑州云海信息技术有限公司 | A kind of firmware method for refreshing and a kind of server |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2015102889A (en) * | 2013-11-21 | 2015-06-04 | レノボ・シンガポール・プライベート・リミテッド | Method for updating firmware, electronic device, computer and computer program |
-
2017
- 2017-06-30 CN CN201710522683.0A patent/CN107402753B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104679530A (en) * | 2013-11-26 | 2015-06-03 | 英业达科技有限公司 | Server system and firmware updating method |
CN104461611A (en) * | 2014-11-05 | 2015-03-25 | 浪潮电子信息产业股份有限公司 | Method for refreshing node BIOS (basic input/output system) of RACK (RACK operating system) in batches |
CN104503781A (en) * | 2014-12-10 | 2015-04-08 | 华为技术有限公司 | Firmware upgrading method for hard disk and storage system |
CN105589717A (en) * | 2015-12-10 | 2016-05-18 | 浪潮电子信息产业股份有限公司 | Batch BIOS refreshing method based on SSH service |
CN106775877A (en) * | 2016-12-22 | 2017-05-31 | 郑州云海信息技术有限公司 | A kind of firmware method for refreshing and a kind of server |
CN106681775A (en) * | 2017-01-03 | 2017-05-17 | 郑州云海信息技术有限公司 | Method for achieving online batch upgrading of hard disk firmware through RAID card under Linux system |
Also Published As
Publication number | Publication date |
---|---|
CN107402753A (en) | 2017-11-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107402753B (en) | Method and device for refreshing hard disk firmware | |
CN107957957B (en) | Test case obtaining method and device | |
CN107807982B (en) | Consistency checking method and device for heterogeneous database | |
CN110162525B (en) | B+ tree-based read-write conflict resolution method, device and storage medium | |
CN110188030A (en) | A kind of test data generating method, device and computer equipment, storage medium | |
CN107391325B (en) | Hard disk test method and device and terminal | |
CN107943694B (en) | Test data generation method and device | |
CN108491326B (en) | Test behavior a recombination process apparatus and storage medium | |
CN106547658B (en) | Automatic testing method and device | |
CN107402870B (en) | Method and device for processing log segment in metadata server | |
CN107748739B (en) | Short message text template extraction method and related device | |
CN104090922B (en) | A kind of method and apparatus for clearing up private data | |
CN111125298A (en) | Method, equipment and storage medium for reconstructing NTFS file directory tree | |
CN106294886A (en) | A kind of method and system of full dose extracted data from HBase | |
CN107256723A (en) | A kind of method of testing and device for storing product | |
CN107402720B (en) | Hard disk processing method and device and terminal | |
CN112463026A (en) | Method and apparatus for deduplication of supplemental data in a distributed object storage system | |
CN111984666B (en) | Database access method, apparatus, computer readable storage medium and computer device | |
CN107220146B (en) | File scanning recovery method and device | |
CN107357836B (en) | VNF package and method and device for deleting mirror image file referenced by VNF package | |
CN110287182B (en) | Big data comparison method, device, equipment and terminal | |
CN113986602B (en) | Software identification method and device, storage medium and electronic equipment | |
CN110956170A (en) | Method, device, equipment and storage medium for generating passport machine-readable code sample | |
CN115114095A (en) | Data backup method, system, device and storage medium | |
KR102256894B1 (en) | Method, Server and Computer Program for Crash Report Grouping |
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 | ||
TA01 | Transfer of patent application right | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20201104 Address after: 215100 No. 1 Guanpu Road, Guoxiang Street, Wuzhong Economic Development Zone, Suzhou City, Jiangsu Province Applicant after: SUZHOU LANGCHAO INTELLIGENT TECHNOLOGY Co.,Ltd. Address before: 450018 Henan province Zheng Dong New District of Zhengzhou City Xinyi Road No. 278 16 floor room 1601 Applicant before: ZHENGZHOU YUNHAI INFORMATION TECHNOLOGY Co.,Ltd. |
|
GR01 | Patent grant | ||
GR01 | Patent grant |