Hard disk data acquisition method and hard disk data acquisition device

By receiving hard disk identification information, querying the database table to obtain target offsets, the problem of obtaining wrong data on the basic management controller is solved, and the accuracy of hard disk data and system reliability is improved.

CN120276676APending Publication Date: 2025-07-08INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510417027.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-03
Publication Date
2025-07-08

AI Technical Summary

Technical Problem

When the basic management controller obtains hard disk data through preset standard offsets, it may cause incorrect data and reduce system reliability.

Method used

By receiving the identification information of the target hard disk, querying the preset database table to obtain the target offset, so as to dynamically map the offset based on the actual characteristics of the target hard disk, obtain the target data, avoid modifying the firmware, and be compatible with hard disks with non-standard offsets.

Benefits of technology

It improves the accuracy of data acquisition, reduces operation and maintenance risks, improves system reliability, and reduces operating costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120276676A_ABST
    Figure CN120276676A_ABST
Patent Text Reader

Abstract

The invention discloses a hard disk data acquisition method and device, and relates to the technical field of hard disk data acquisition, and the method comprises the steps: receiving the identification information of a target hard disk, querying a preset database table based on the identification information to obtain the identification information corresponding to the target hard disk, and obtaining the target offset corresponding to the target hard disk, the basic management controller end can obtain the offsets of different hard disks, so that the basic management controller end is compatible with various hard disks; obtaining accurate target data based on the specific offset of the target hard disk; the technical problems that the operation and maintenance risk is caused and the system reliability is reduced due to inaccurate data obtained based on the standard offset are solved, and the technical effects of improving the accuracy of the obtained target data, reducing the operation and maintenance risk and improving the system reliability are achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of hard disk data acquisition, and particularly to a method for acquiring hard disk data and an apparatus for acquiring hard disk data. Background Art

[0002] The base management controller can acquire data of an NVMe hard disk to monitor the device. In related technologies, the base management controller accesses the NVMe-MI structure through an out-of-band management interface to acquire various data of the NVMe hard disk, and the NVMe-MI structure specification enables the base management controller to locate data through a preset standard offset. However, the above method may acquire incorrect data, resulting in operation and maintenance risks and reducing system reliability. Summary of the Invention

[0003] This application provides a method for acquiring hard disk data and an apparatus for acquiring hard disk data, so as to at least solve the problem in related technologies that the base management controller locates data through a preset standard offset, which may acquire incorrect data, resulting in operation and maintenance risks and reducing system reliability.

[0004] This application provides a method for acquiring hard disk data, which is applied to the base management controller; the method includes:

[0005] Receiving identification information corresponding to a target hard disk sent to the base management controller;

[0006] Based on the identification information, querying a target offset corresponding to the identification information from a preset database table; the preset database table is pre-constructed and used to store the association relationship between the identification information and the offset corresponding to multiple different hard disks;

[0007] Based on the target offset, acquiring target data from a data packet storing information of the target hard disk; the data packet is sent by the target hard disk to the base management controller.

[0008] This application also provides an apparatus for acquiring hard disk data, which is applied to the base management controller; the apparatus includes:

[0009] A first processing module, configured to receive identification information corresponding to a target hard disk sent to the base management controller;

[0010] A second processing module, configured to query a target offset corresponding to the identification information from a preset database table based on the identification information; the preset database table is pre-constructed and used to store the association relationship between the identification information and the offset corresponding to multiple different hard disks;

[0011] A third processing module, configured to obtain target data from a data packet storing information of the target hard disk based on the target offset; the data packet is sent by the target hard disk to the base management controller side.

[0012] This application also provides an electronic device, including: a memory, configured to store a computer program; a processor, configured to implement the steps of any one of the above-mentioned methods for obtaining hard disk data when executing the computer program.

[0013] This application also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of any one of the above-mentioned methods for obtaining hard disk data are implemented.

[0014] This application also provides a computer program product, including a computer program. When the computer program is executed by a processor, the steps of any one of the above-mentioned methods for obtaining hard disk data are implemented.

[0015] Through this application, the base management controller side receives the identification information corresponding to the target hard disk, accurately determines the information that differentiates the target hard disk from other hard disks, makes up for the deficiency of the base management controller side in hardware identity recognition, and thus queries a preset database table based on the identification information to obtain the target offset corresponding to the target hard disk. Based on the actual characteristics of the target hard disk, the target offset is dynamically mapped without modifying the firmware of the base management controller side. Without increasing the hardware maintenance cost, the base management controller side can be compatible with hard disks with non-standard offsets, reduce on-site service requests caused by firmware incompatibility of the base management controller side, and reduce operating costs; thus, based on the target offset, target data is obtained from the data packet to improve the accuracy of the obtained target data, so as to perform operation and maintenance based on accurate data. Therefore, the technical problem in the related art that the data obtained based on the standard offset is inaccurate, resulting in operation and maintenance risks and reducing the system reliability, can be solved, and the technical effects of improving the accuracy of the obtained target data, reducing operation and maintenance risks, and enhancing system reliability can be achieved. Description of the Drawings

[0016] To more clearly illustrate the embodiments of this application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0017] Figure 1 One of the flowcharts of a method for obtaining hard disk data provided by an embodiment of this application;

[0018] Figure 2The second flowchart of a method for obtaining hard disk data provided by an embodiment of the present application;

[0019] Figure 3 The third flowchart of a method for obtaining hard disk data provided by an embodiment of the present application;

[0020] Figure 4 The structural diagram of a device for obtaining hard disk data provided by an embodiment of the present application. Detailed implementation manners

[0021] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.

[0022] It should be noted that in the description of the present application, the terms "include", "comprise" or any other variation thereof are intended to cover a non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. The terms "first", "second", etc. in the present application are used to distinguish similar objects and are not used to describe a specific order or sequence.

[0023] In order to enable those skilled in the art of the present technology to better understand the solutions of the present application, the present application will be further described in detail below in conjunction with the accompanying drawings and specific implementation manners.

[0024] The embodiment of the present application provides a method for obtaining hard disk data, and the method will be described in detail in combination with the execution process of the method for obtaining hard disk data.

[0025] Specifically, Figure 1 It is a flowchart of a method for obtaining hard disk data provided according to an embodiment of the present application.

[0026] As Figure 1 shown, the method for obtaining hard disk data includes: step 110, step 120 and step 130.

[0027] The method for obtaining hard disk data is applied to the Baseboard Management Controller (BMC) side.

[0028] The Baseboard Management Controller side can be used to monitor the hardware status of the device, perform remote management operations, and provide monitoring and control functions for the device.

[0029] For the method of obtaining hard disk data in this application, the base management controller can be used to monitor the status of the hard disk and interact with the hard disk.

[0030] Step 110: Receive the identification information corresponding to the target hard disk sent to the base management controller;

[0031] In this step, the target hard disk is the hard disk that the base management controller needs to monitor.

[0032] The target hard disk can be an NVMe (Non-Volatile Memory Express) hard disk produced by different manufacturers.

[0033] In the actual execution process, NVMe hard disks may be produced by different manufacturers, and different manufacturers may set different offsets for NVMe hard disks.

[0034] For example, the offset of the NVMe hard disk produced by manufacturer A is 0x21 bytes.

[0035] Another example, the offset of the NVMe hard disk produced by manufacturer B is 0x25 bytes.

[0036] The identification information is the information used to distinguish and identify the target hard disk.

[0037] The identification information may include: information such as model and serial number.

[0038] It should be noted that the base management controller cannot directly obtain the identification information of the target hard disk, making it difficult for the base management controller to dynamically adapt to different offsets. The base management controller relies on the preset standard offset for data extraction.

[0039] The base management controller relies on the preset standard offset for data extraction, and may not be able to be compatible with hard disks with non-standard offsets, making the data read based on the standard offset invalid characters or non-required data fields.

[0040] The standard offset is the default offset of the base management controller.

[0041] The standard offset can be user-defined or determined based on the offsets commonly used by most manufacturers' hard disks in the actual production process. For example, the standard offset can be 0x27 bytes (compliant with the NVMe-MI standard), and this application does not make a limitation.

[0042] In the actual execution process, the BMC can be equipped with a corresponding management network port to receive external information through protocols such as HTTPS, SNMP, and Redfish.

[0043] For example, after determining the target hard disk to be monitored, the user can view the instruction manual of the target hard disk and the information on the hard disk to obtain the identification information corresponding to the target hard disk, and then send the identification information corresponding to the target hard disk to the base management controller through the management network port.

[0044] Also, other devices that can read the identification information of the target hard disk can be used to automatically obtain the identification information corresponding to the target hard disk, and then send the obtained identification information to the base management controller, so that the base management controller can receive the identification information corresponding to the target hard disk.

[0045] It should be noted that after the base management controller receives the identification information corresponding to the target hard disk, the base management controller can store the identification information in a non-volatile memory, such as an Electrically Erasable Programmable Read-Only Memory (EEPROM) for subsequent query use.

[0046] In some embodiments, the identification information may include at least two of the following: manufacturer identification information, device identification information, subsystem manufacturer identification information, and subsystem identification information.

[0047] In this embodiment, the manufacturer identification information is the information identifying the manufacturer of the target hard disk.

[0048] The manufacturer identification information can be represented as VID (Vendor Identification).

[0049] The device identification information is the information used to distinguish different models of the same type of device.

[0050] The device identification information can be represented as DID (Device Identification).

[0051] The subsystem manufacturer identification information is the information identifying the secondary manufacturer of the target hard disk.

[0052] The subsystem manufacturer identification information can be represented as SVID (Subsystem-Vendor Identification).

[0053] The subsystem identification information is the code for the secondary manufacturer to contract the target hard disk.

[0054] The subsystem identification information can be represented as SSID (Subsystem-Identification).

[0055] In the actual execution process, the manufacturer identification information and the device identification information can distinguish the target hard disk from multiple hard disks.

[0056] In the case where the target hard disk is produced by a secondary manufacturer, the target hard disk can also be distinguished from multiple hard disks based on the subsystem manufacturer identification information and the subsystem identification information.

[0057] In the actual execution process, the target hard disk can also be determined jointly by the manufacturer identification information, the device identification information, the subsystem manufacturer identification information, and the subsystem identification information.

[0058] According to the method for obtaining hard disk data provided by the embodiments of the present application, by using the manufacturer identification information, the device identification information, the subsystem manufacturer identification information, and the subsystem identification information, an accurate identity identifier is provided for the target hard disk, which helps the basic management controller side quickly determine the characteristics of the target hard disk. The determination method is simple and easy to operate, so as to accurately monitor the target hard disk based on the accurate identity identifier in the subsequent process.

[0059] Step 120: Query the target offset corresponding to the identification information from the preset database table based on the identification information;

[0060] In this step, the target offset is the offset used to locate the data packet storing the target hard disk information.

[0061] It should be noted that a manufacturer, such as a customized storage device supplier, will modify the offset of the hard disk firmware version information, so that the offset of the hard disk is not the standard offset.

[0062] For example, the offset is set to 0x21 bytes or a custom value.

[0063] The target offset may be the standard offset or a value different from the standard offset.

[0064] The preset database table is a pre-constructed database table used to store the association relationship between the identification information and the offset corresponding to multiple different hard disks.

[0065] The preset database table can pre-store the association relationship between the offsets and the identification information of common NVMe manufacturers.

[0066] The preset database table can be stored in the partition of the basic management controller side for storing configuration files, such as the config partition.

[0067] Of course, the preset database table can also be stored in other partitions of the basic management controller side, which is not limited in this application.

[0068] The preset database table can be in the CSV format or the TXT format.

[0069] Of course, the preset database table can also be in other data formats, which is not limited in this application.

[0070] The preset database table can adopt a lightweight design, that is, the memory occupancy of the preset database table is less than 10 KB, which is adapted to low - configuration BMC hardware.

[0071] As shown in Table 1, the preset database table can store manufacturer identification information, device identification information, subsystem manufacturer identification information, subsystem identification information, and offset.

[0072] During the actual execution process, the preset database table can also store information such as manufacturer name and hard disk model to provide more abundant data.

[0073] The information in the preset database table other than the identification information and offset can be determined based on actual usage requirements, and this application does not make any limitations.

[0074] Table 1

[0075] Field Name Data Type Description Example Value VID UINT16 Manufacturer ID 0x144D DID UINT16 Device ID 0xA804 SVID UINT16 Subsystem Manufacturer ID 0x144D SSID UINT16 Subsystem ID 0xA801 FW_Offset UINT8 Firmware Version Offset (bytes) 0x27 Manufacturer VARCHAR Manufacturer Name Manufacturer A Model VARCHAR Hard Disk Model PM001a

[0076] During the actual execution process, after obtaining the identification information, based on the identification information, the preset database table can be queried to obtain the target offset corresponding to the target hard disk.

[0077] For example, if the manufacturer ID is 0x144D, the device ID is 0xA804, the subsystem manufacturer ID is 0x144D, and the subsystem ID is 0xA801, the target offset 0x27 can be queried from the preset database table.

[0078] During the actual execution process, through the preset database table, the base management controller can dynamically query the target offset corresponding to the target hard disk.

[0079] As Figure 2 shown, after the base management controller receives the identification information corresponding to the target hard disk, it can query the preset database table based on the query logic between the identification information and the offset to obtain the target offset.

[0080] Step 130: Based on the target offset, obtain the target data from the data packet storing the information of the target hard disk.

[0081] In this step, the data packet is sent by the target hard disk to the base management controller.

[0082] The target data is the data that the base management controller needs to obtain.

[0083] The target data can include information such as firmware version, health status, and temperature.

[0084] In the actual execution process, after obtaining the target offset at the basic management controller end, the target data can be located from the data packet based on the target offset.

[0085] It should be noted that the basic management controller end can parse the target data to upgrade and monitor the firmware version of the basic management controller end based on the parsing result.

[0086] When the target data is accurate, the firmware version of the basic management controller end can be accurately upgraded and monitored.

[0087] When the basic management controller end obtains the target data through the standard offset, the obtained target data may be inaccurate. At this time, due to the incorrect parsing of the firmware version in the target data, problems such as incorrect upgrade or monitoring failure may occur.

[0088] The inventor found in the R & D process that in the related technology, the basic management controller end accesses the NVMe-MI structure through the out-of-band management interface to obtain various data of the NVMe hard disk. The NVMe-MI structure specification enables the basic management controller end to locate data through a preset standard offset. However, the above method may obtain incorrect data, resulting in operation and maintenance risks and reducing the system reliability.

[0089] In this application, the basic management controller end receives the identification information corresponding to the target hard disk, accurately determines the information that distinguishes the target hard disk from other hard disks, makes up for the deficiency of the basic management controller end in hardware identity recognition, and then queries the preset database table based on the identification information to obtain the target offset corresponding to the target hard disk. Based on the actual characteristics of the target hard disk, the target offset is dynamically mapped. Without modifying the firmware of the basic management controller end, the basic management controller end can be compatible with hard disks with non-standard offsets without increasing the hardware maintenance cost, reducing the on-site service requests caused by the incompatibility of the basic management controller end firmware, and reducing the operation cost. Then, based on the target offset, the target data is obtained from the data packet, improving the accuracy of the obtained target data, performing operation and maintenance based on accurate data, improving the operation and maintenance efficiency, reducing the operation and maintenance risks, improving the system reliability, and reducing the losses caused by ineffective operation and maintenance.

[0090] According to the method for obtaining hard disk data provided by the embodiments of the present application, by receiving the identification information corresponding to the target hard disk and querying the preset database table, the target offset corresponding to the target hard disk is determined, so that based on the target offset, the target data required in the data packet is accurately located, improving the accuracy of the obtained target data, reducing the operation and maintenance risks, and enhancing the system reliability.

[0091] In some embodiments, step 110 may further include:

[0092] Receive the identification information corresponding to the target hard disk sent from the Basic Input / Output System (BIOS) side to the Baseboard Management Controller (BMC) side.

[0093] In this embodiment, the Basic Input / Output System (BIOS) is used to obtain the identification information of the target hard disk when the server starts up.

[0094] The Basic Input / Output System can also check the target hard disk, for example, check whether the target hard disk exists, whether the target hard disk can work properly, and configure the memory address of the target hard disk, etc.

[0095] The Basic Input / Output System can establish a communication connection with the target hard disk to obtain the identification information of the target hard disk.

[0096] In the actual execution process, during the startup process of the system (i.e., the server), the Basic Input / Output System can obtain the VID, DID, SVID, and SSID information of the target hard disk through Peripheral Component Interconnect Express (PCIe) enumeration.

[0097] For example, the identification information of the target hard disk obtained by the Basic Input / Output System can be: VID = 0x144D (manufacturer A), DID = 0xA804 (PM981a), SVID = 0x144D, SSID = 0xA801.

[0098] As Figure 2 shown, the Basic Input / Output System can obtain the identification information of the target hard disk through PCIe enumeration.

[0099] According to the method for obtaining hard disk data provided by the embodiments of the present application, by receiving the identification information corresponding to the target hard disk sent from the Basic Input / Output System side to the Baseboard Management Controller side, introducing the hardware enumeration ability of the Basic Input / Output System side, and performing the transfer of the identification information corresponding to the target hard disk, the deficiency of the Baseboard Management Controller side in hardware identity recognition is made up, so that the Baseboard Management Controller side can query the preset database table based on the identification information, obtain the target offset, realize the dynamic mapping of the offset, and enable the Baseboard Management Controller side to be compatible with different hard disks.

[0100] In some embodiments, receiving the identification information corresponding to the target hard disk sent from the Basic Input / Output System side to the Baseboard Management Controller side may further include:

[0101] Receiving the identification information corresponding to the target hard disk sent by the Basic Input / Output System side based on the information transmission protocol corresponding to the Original Equipment Manufacturer (OEM) command of the Intelligent Platform Management Interface (IPMI).

[0102] In this embodiment, the Intelligent Platform Management Interface (IPMI) is a standardized hardware interface.

[0103] The Intelligent Platform Management Interface implements the communication protocols and command sets defined by the IPMI specification.

[0104] The Intelligent Platform Management Interface allows system management software to communicate with the Baseboard Management Controller to monitor the health status of the system and perform remote management tasks, etc.

[0105] Original Equipment Manufacturer (OEM) commands are commands or tools related to hardware manufacturing, system integration, or software deployment.

[0106] In the actual execution process, the data transmission method of OEM commands can follow the communication protocols and specifications of IPMI.

[0107] The information transmission protocol is the protocol that needs to be followed for data transmission between the input / output system side and the base management controller side.

[0108] In the actual execution process, when the input / output system side and the base management controller side are transmitting data based on the information transmission protocol corresponding to the OEM command of the Intelligent Platform Management Interface, the OEM custom commands can be identified by specific Network Function codes (NetFn) and Command codes (CMD), and the data can be transmitted through IPMI message packets (usually containing request and response data).

[0109] As Figure 3 shown, when the system (i.e., the server) starts, the BIOS can obtain the identification information of the target hard disk through PCIe, that is, obtain the VID, DID, SVID, and SSID of the NVMe hard disk, and then the BIOS sends the identification information (i.e., the hard disk ID) to the BMC through the IPMI OME command.

[0110] When the BMC successfully receives the identification information, the BMC stores the identification information (i.e., the hardware identity information).

[0111] When the BMC does not successfully receive the identification information, the BIOS can send the identification information to the BMC again through the IPMI OME command until the BMC successfully receives the identification information.

[0112] According to the method for obtaining hard disk data provided by the embodiments of the present application, through the information transmission protocol corresponding to the original equipment manufacturer command of the intelligent platform management interface, the data transmission between the basic input / output system end and the basic management controller end directly acts on the hardware level, bypassing the operating system and upper-layer software, realizing faster and more direct management operations. In addition, the original equipment manufacturer command allows the original equipment manufacturer to customize according to hardware and software requirements, which can meet the data transmission requirements in specific scenarios and increase the applicability of data transmission.

[0113] In some embodiments, the data fields corresponding to the information transmission protocol include: a plurality of identification information fields.

[0114] In this embodiment, the data fields corresponding to the information transmission protocol are the data formats used for transmitting data.

[0115] The data fields can be 16-byte fields or 20-byte fields.

[0116] The specific size of the data fields can be based on user customization or determined according to the actual situation, which is not limited in this application.

[0117] The identification information fields are the fields for storing identification information.

[0118] The plurality of identification information fields can include: a VID field, a DID field, an SVID field, and an SSID field.

[0119] The data fields may further include custom fields.

[0120] The custom fields are reserved fields.

[0121] The custom fields can be used to transmit information other than the identification information.

[0122] It should be noted that the custom fields may not be set either, that is, the data fields include the identification information fields.

[0123] Taking the data fields as 16-byte fields as an example, the VID field, the DID field, the SVID field, and the SSID field can be 2B respectively, and the custom field can be 8B.

[0124] According to the method for obtaining hard disk data provided by the embodiments of the present application, by defining that the data fields corresponding to the information transmission protocol include a plurality of identification information fields, the information stored in each identification information field in the data fields is effectively planned, making the data in the data fields clearer and facilitating subsequent data parsing.

[0125] In some embodiments, after step 110, the method may further include:

[0126] In the case where the target offset is not queried from the preset database table based on the identification information, the target data is obtained from the data packet storing the target hard disk information based on the standard offset set by the base management controller.

[0127] In this embodiment, during the actual execution process, in the case where the target offset is not queried from the preset database table based on the identification information, it indicates that the information related to the target hard disk is not stored in the preset database table.

[0128] At this time, the base management controller can obtain the target data from the data packet storing the target hard disk information based on the pre-set standard offset to ensure the availability of the basic functions of the base management controller.

[0129] In the case where the target offset is not queried from the preset database table based on the identification information, after the target data can be obtained from the data packet storing the target hard disk information based on the standard offset set by the base management controller, this event can be recorded to issue an alarm in the future to prompt the user to update the preset database table in a timely manner to enrich the preset database table so that the base management controller can be compatible with more hard disks.

[0130] The information recorded by the base management controller can be "the identification information corresponding to the target hard disk and the target data obtained by the base management controller positioning the target data based on the preset standard offset may be inaccurate".

[0131] It should be noted that in the case where the queried target offset is the standard offset, the event of the base management controller positioning the target data based on the standard offset does not need to be recorded.

[0132] According to the method for obtaining hard disk data provided by the embodiments of the present application, by automatically switching the base management controller to the standard offset when it is determined that the target offset is not queried, and positioning the data packet based on the standard offset to obtain the target data at the position of the standard offset in the data packet, the availability of the basic functions of the base management controller is guaranteed.

[0133] In some embodiments, the preset database table can be updated based on the following steps:

[0134] When a new database table is received, the new database table is used to overwrite the preset database table to update the preset database table.

[0135] In this embodiment, the new database table is a database table that is different from at least part of the data in the preset database table.

[0136] During the actual execution process, after receiving the alarm information output by the basic management controller, the user can query the instruction manual or production manual corresponding to the target hardware, determine the target offset corresponding to the target hard disk, and add the identification information and target offset corresponding to the target hard disk to the preset database table to obtain a new database table.

[0137] The user can also actively modify the information in the preset database table, add new data to the preset database table, or delete invalid information in the preset database table to enrich the preset database table and improve its usability, thereby obtaining a new database table.

[0138] The user can import the new database table to the basic management controller through the management interface of the basic management controller. After receiving the new database table, the basic management controller will overwrite the preset database table with the new database table to update the preset database table stored in the basic management controller.

[0139] During the actual execution process, the basic management controller supports hot update of the preset database table, that is, during the process of updating the preset database table, the basic management controller does not need to be restarted.

[0140] Continue to refer to Figure 2 , during the actual execution process, the preset database table can be updated based on the management policy.

[0141] The management policy can be to overwrite the preset database table with the new database table.

[0142] The management policy can also include: adding new data, modifying old data, and deleting old data on the basis of the preset database table, etc.

[0143] According to the method for obtaining hard disk data provided by the embodiments of the present application, by overwriting the preset database table with the new database table when receiving the new database table, the preset database table is dynamically updated, and the update method of the preset database table is simple, convenient, and easy to operate.

[0144] In some embodiments, step 130 may further include:

[0145] Send a read request to the target hard disk;

[0146] Read the target data located at the target offset in the data packet.

[0147] In this embodiment, the read request is a data acquisition request sent by the basic management controller to the target hard disk.

[0148] The read request is used to cause the target hard disk to send a data packet to the basic management controller.

[0149] The read request can be an NVMe command that supports the NVMe protocol.

[0150] During the actual execution process, after the basic management controller sends a read request to the target hard disk, the target hard disk can respond to the read request and send a data packet of the data required by the read request to the basic management controller. After receiving the data packet, the basic management controller parses the data packet and reads the data at the target offset position of the data packet to obtain the target data.

[0151] Continue to refer to Figure 2 , the target hard disk can send the data packet to the basic management controller along the physical link SMBUS / I2C through the NVMe-MI interface.

[0152] The basic management controller can parse the extracted ASCII string into a readable version number and output it through the IPMI interface or the Web interface.

[0153] According to the method for obtaining hard disk data provided by the embodiments of the present application, by sending a read request to the target hard disk to obtain a data packet returned by the target hard disk, so as to locate the target data at the target offset position in the data packet, the accuracy of the obtained target data is improved and the error is reduced.

[0154] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is a better implementation method.

[0155] For the method for obtaining hard disk data provided by the embodiments of the present application, the execution subject can be a device for obtaining hard disk data. In the embodiments of the present application, taking the device for obtaining hard disk data to execute the method for obtaining hard disk data as an example, the device for obtaining hard disk data provided by the embodiments of the present application is described.

[0156] The embodiments of the present application also provide a device for obtaining hard disk data.

[0157] The device for obtaining hard disk data is applied to the basic management controller.

[0158] As Figure 4 shown, the device for obtaining hard disk data includes: a first processing module 410, a second processing module 420, and a third processing module 430.

[0159] The first processing module 410 is configured to receive the identification information corresponding to the target hard disk sent to the basic management controller;

[0160] A second processing module 420, configured to query, based on the identification information, a target offset corresponding to the identification information from a preset database table; the preset database table is a pre-constructed database table for storing the association relationship between the identification information and the offset corresponding to multiple different hard disks.

[0161] A third processing module 430, configured to obtain target data from a data packet storing the information of the target hard disk based on the target offset; the data packet is sent by the target hard disk to the baseboard management controller.

[0162] According to the hard disk data acquisition device provided by the embodiments of the present application, by receiving the identification information corresponding to the target hard disk, querying the preset database table to determine the target offset corresponding to the target hard disk, and thus accurately positioning the target data required in the data packet based on the target offset, the accuracy of the acquired target data is improved, the operation and maintenance risk is reduced, and the system reliability is enhanced.

[0163] In some embodiments, the first processing module 410 may further be configured to:

[0164] Receive the identification information corresponding to the target hard disk sent from the basic input / output system end to the baseboard management controller end.

[0165] In some embodiments, the first processing module 410 may further be configured to:

[0166] Receive the identification information corresponding to the target hard disk sent by the basic input / output system end based on the information transmission protocol corresponding to the original equipment manufacturer command of the intelligent platform management interface.

[0167] In some embodiments, the device may further include a fourth processing module, configured to:

[0168] In the case where the target offset is not queried from the preset database table based on the identification information, obtain the target data from the data packet storing the target hard disk information based on the standard offset set by the baseboard management controller end.

[0169] In some embodiments, the device may further include a fifth processing module, configured to:

[0170] In the case of receiving a new database table, overwrite the preset database table with the new database table to update the preset database table.

[0171] In some embodiments, the third processing module 430 may further be configured to:

[0172] Send a read request to the target hard disk; the read request is used to cause the target hard disk to send a data packet to the baseboard management controller end.

[0173] Read the target data at the target offset in the data packet.

[0174] For the description of the features in the corresponding embodiment of the hard disk data acquisition device, reference can be made to the relevant description in the corresponding embodiment of the hard disk data acquisition method, which will not be elaborated here one by one.

[0175] An embodiment of the present application further provides an electronic device, including a memory and a processor. 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 embodiments of the hard disk data acquisition method.

[0176] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps in any one of the above embodiments of the hard disk data acquisition method when running.

[0177] In an exemplary embodiment, the above computer-readable storage medium may include, but is not limited to: various media such as USB flash drives, read-only memories (ROM), random access memories (RAM), external hard drives, magnetic disks, or optical discs that can store computer programs.

[0178] An embodiment of the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, it implements the steps in any one of the above embodiments of the hard disk data acquisition method.

[0179] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium. The non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the steps in any one of the above embodiments of the hard disk data acquisition method.

[0180] Those skilled in the art can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.

[0181] The above has introduced in detail a method for obtaining hard disk data provided by this application. Specific examples are used in this article to elaborate on the principle and implementation manner of this application. The description of the above embodiments is only used to help understand the method and its core idea of this application. It should be noted that for those of ordinary skill in the art of this technology, without departing from the principle of this application, several improvements and modifications can still be made to this application, and these improvements and modifications also fall within the protection scope of the claims of this application.

Claims

1. A method for obtaining hard disk data, characterized in that, Applied to the base management controller side; the method includes: Receiving identification information corresponding to a target hard disk sent to the base management controller side; Based on the identification information, querying a target offset corresponding to the identification information from a preset database table; the preset database table is a pre-constructed database table for storing the association relationship between the identification information and the offset corresponding to multiple different hard disks; Based on the target offset, obtaining target data from a data packet storing information of the target hard disk; the data packet is sent by the target hard disk to the base management controller side.

2. The method for obtaining hard disk data according to claim 1, wherein The step of receiving identification information corresponding to the target hard disk sent to the base management controller side includes: Receiving the identification information corresponding to the target hard disk sent by the basic input / output system side to the base management controller side.

3. The method for obtaining hard disk data according to claim 2, wherein The step of receiving the identification information corresponding to the target hard disk sent by the basic input / output system side to the base management controller side includes: Based on the information transmission protocol corresponding to the original equipment manufacturer command of the intelligent platform management interface, receiving the identification information corresponding to the target hard disk sent by the basic input / output system side.

4. The method for obtaining hard disk data according to any one of claims 1-3, characterized in that, After obtaining the identification information corresponding to the target hard disk, the method further includes: In the case where the target offset is not queried from the preset database table based on the identification information, obtaining the target data from the data packet storing the information of the target hard disk based on the standard offset set by the base management controller side.

5. The method for obtaining hard disk data according to any one of claims 1-3, characterized in that The preset database table is updated based on the following steps: In the case of receiving a new database table, covering the preset database table with the new database table to update the preset database table.

6. The method for obtaining hard disk data according to any one of claims 1-3, characterized in that, Based on the target offset, obtaining target data from a data packet storing information of the target hard disk includes: Sending a read request to the target hard disk; the read request is used to cause the target hard disk to send the data packet to the base management controller side; Reading the target data located at the target offset in the data packet.

7. An apparatus for obtaining hard disk data, characterized in that, Applied to the base management controller side; the device includes: A first processing module, configured to receive identification information corresponding to a target hard disk sent to the base management controller side; A second processing module, configured to query a target offset corresponding to the identification information from a preset database table based on the identification information; the preset database table is a pre-constructed database table for storing the association relationship between the identification information and the offset corresponding to multiple different hard disks; A third processing module, configured to obtain target data from a data packet storing information of the target hard disk based on the target offset; the data packet is sent by the target hard disk to the base management controller side.

8. An electronic device, characterized in that, Includes: A memory, configured to store a computer program; A processor, configured to implement the steps of the method for obtaining hard disk data according to any one of claims 1 to 6 when executing the computer program.

9. A computer-readable storage medium, characterized in that, A computer program is stored in the computer-readable storage medium, wherein the computer program, when executed by a processor, implements the steps of the method for obtaining hard disk data according to any one of claims 1 to 7.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method for acquiring hard disk data according to any one of claims 1 to 6.