Method, device, equipment and storage medium for determining matching degree between board and slot

By reading the hardware information and configuration information to determine the matching degree between the board and the slot, and loading the board running file, it solves the problem of difficulty in determining the matching degree between the board and the slot in the storage device, and improves the reliability and reliability of the storage system. Security.

CN115113943BActive Publication Date: 2024-09-17INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210772329.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-30
Publication Date
2024-09-17
Estimated Expiration
2042-06-30

AI Technical Summary

Technical Problem

In existing storage devices, it is difficult to accurately determine the matching between boards and slots, resulting in data reading failures and replacement by untrusted devices, which affects the reliability and security of the storage system.

Method used

By reading the hardware information of the board, obtain the board information file corresponding to the slot, determine the matching degree between the board and the slot based on the hardware information and hardware configuration information, and load the board run file through the operating system interface to call the board , ensuring accurate matching between slots and boards.

Benefits of technology

It achieves precise matching of boards and slots in storage devices, ensures safe access and reliability of the storage system, and avoids data loss and substitution of untrusted devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115113943B
    Figure CN115113943B
Patent Text Reader

Abstract

The present application relates to a method, device, equipment and storage medium for determining the matching degree between a board and a slot. The main technical scheme includes: when a board is inserted into a slot of a storage device, the storage system reads the hardware information of the board, obtains the board information file corresponding to the slot, the board information file includes the hardware configuration information of the board matching the slot, and determines the matching degree between the board and the slot based on the hardware information and the hardware configuration information. The present application enables the slot to accurately match the board, ensures that the storage system can safely call the board, and improves the reliability of the storage device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of device control of storage systems, and in particular to a method, device, equipment and storage medium for determining the matching degree between a board and a slot. Background Art

[0002] As the level of informatization increases, the amount of data in many enterprises has increased significantly, and purchasing storage devices has become inevitable. These data are often the lifeline of the enterprise, and problems will cause serious losses to the enterprise. Therefore, storage devices must be completely controllable and reliable, and their components cannot be replaced by untrusted devices.

[0003] The board is an indispensable device in data communication. It can be inserted into the slot of the storage device for the upper driver module of the storage system to call. The board inserted into the slot of the storage device must be a trusted board, otherwise it will cause data reading failure and cause user data loss. This requires the storage device to control the type of board inserted into the slot. Therefore, how to determine whether the slot in the storage device accurately matches the corresponding board is an important prerequisite for the storage system to safely call the board. Summary of the invention

[0004] Based on this, the present application provides a method, apparatus, device and storage medium for determining the matching degree between a board and a slot, so as to ensure that the slots in the storage device accurately match the corresponding boards.

[0005] In a first aspect, a method for determining a matching degree between a board and a slot is provided, the method comprising:

[0006] When the board is inserted into the slot of the storage device, the storage system reads the hardware information of the board;

[0007] Obtain a board information file corresponding to the slot, the board information file including hardware configuration information of the board matching the slot;

[0008] Determine the matching degree between the board and the slot based on the hardware information and hardware configuration information.

[0009] According to an achievable method in an embodiment of the present application, the matching degree between the board and the slot is determined according to the hardware information and the hardware configuration information, including:

[0010] When the hardware information and hardware configuration information are consistent, it is determined that the board matches the slot;

[0011] When the hardware information and hardware configuration information are inconsistent, it is determined that the board does not match the slot.

[0012] According to an achievable manner in an embodiment of the present application, after determining that the board matches the slot, the method further includes:

[0013] Output the configuration information file of the slot, the configuration information file includes the slot number and the board type code matching the slot number;

[0014] According to the slot number and the board type code, based on the board type and identification number information mapping table, obtaining the identification number information of the board matching the slot;

[0015] Call the board according to the identification number information.

[0016] According to an achievable method in an embodiment of the present application, calling a board according to identification number information includes:

[0017] Find the board operation file corresponding to the identification number information;

[0018] Use the system interface of the operating system to open the function and load the board operation file to call the board.

[0019] According to an achievable manner in an embodiment of the present application, before the board is inserted into the slot of the storage device, the method further includes:

[0020] Set the corresponding relationship between each slot and the board to be called;

[0021] According to the corresponding relationship, the hardware configuration information of the board to be called is saved to the directory item of the slot corresponding to the board to be called;

[0022] Save the directory entry for each slot to the storage system installation package;

[0023] Based on the storage system installation package, the storage system is installed in the storage device to determine the matching degree between the board and the slot.

[0024] According to an achievable method in an embodiment of the present application, obtaining a board information file corresponding to a slot includes:

[0025] Get the directory entry for the slot;

[0026] According to the slot directory item, obtain the board information file corresponding to the slot.

[0027] According to an achievable method in an embodiment of the present application, after reading the hardware information of the board, the method further includes:

[0028] Generate a number file based on hardware information;

[0029] The number file is saved in a specific directory of the slot, so that when determining the matching degree between the board and the slot, the number file is obtained from the specific directory to match with the board information file.

[0030] In a second aspect, a device for determining a matching degree between a board and a slot is provided, the device comprising:

[0031] A reading module, used for the storage system to read the hardware information of the board after the board is inserted into the slot of the storage device;

[0032] An acquisition module, used to acquire a board information file corresponding to the slot, wherein the board information file includes hardware configuration information of a board matching the slot;

[0033] A determination module is used to determine the matching degree between the board and the slot according to the hardware information and the hardware configuration information.

[0034] In a third aspect, a computer device is provided, comprising:

[0035] at least one processor; and

[0036] a memory communicatively connected to the at least one processor; wherein,

[0037] The memory stores computer instructions that can be executed by the at least one processor, and the computer instructions are executed by the at least one processor to enable the at least one processor to perform the method involved in the first aspect above.

[0038] In a fourth aspect, a computer-readable storage medium is provided, on which computer instructions are stored, characterized in that the computer instructions are used to enable a computer to execute the method involved in the first aspect above.

[0039] According to the technical content provided in the embodiments of the present application, when a board is inserted into a slot of a storage device, the storage system reads the hardware information of the board and obtains a board information file corresponding to the slot, wherein the board information file includes hardware configuration information of the board that matches the slot. Based on the hardware information and the hardware configuration information, the matching degree between the board and the slot is determined, so that the slot accurately matches the board, thereby ensuring that the storage system can safely call the board and improving the reliability of the storage device. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 FIG. 1 is an application environment diagram of a method for determining a matching degree between a board and a slot in an embodiment;

[0041] Figure 2 A schematic diagram of a flow chart of a method for determining a matching degree between a board and a slot in one embodiment;

[0042] Figure 3 is a flow chart of a method for determining the matching degree between a board and a slot in another embodiment;

[0043] Figure 4 is a structural block diagram of a device for determining the matching degree between a board and a slot in one embodiment;

[0044] Figure 5 FIG. 4 is a schematic structural diagram of a computer device in one embodiment. DETAILED DESCRIPTION

[0045] The present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0046] In order to solve the problems of the prior art, the embodiments of the present application provide a method, device, equipment and computer storage medium for determining the matching degree between a board and a slot. The following first introduces the method for determining the matching degree between a board and a slot provided in the embodiments of the present application.

[0047] The method for determining the matching degree between a board and a slot provided in this application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. When the board card is inserted into the slot of the storage device, the server 104 where the storage system is located reads the hardware information of the board card, and obtains the board card information file corresponding to the slot, and the board card information file includes the hardware configuration information of the board card matching the slot. The board card information file is pre-configured by the user through the terminal 102. According to the hardware information and the hardware configuration information, the matching degree between the board card and the slot is determined. Among them, the terminal 102 can be but not limited to various personal computers, laptops and tablet computers, and the server 104 can be implemented with an independent server or a server cluster consisting of multiple servers.

[0048] Figure 2 FIG. 1 is a flow chart of a method for determining the matching degree between a board and a slot provided in an embodiment of the present application. Figure 2 As shown, the method may include the following steps:

[0049] S210, after the board is inserted into the slot of the storage device, the storage system reads the hardware information of the board.

[0050] Usually, a storage device includes at least one slot. When using the storage device, one board may be inserted into the slot of the storage device, or multiple boards may be inserted into multiple slots of the storage device at the same time.

[0051] When the board is inserted into the slot of the storage device, the storage system pre-installed in the storage device reads the hardware information of the board to determine whether the board is a board allowed by the storage system, and further determine whether the board is a trusted board.

[0052] S220, obtaining a board information file corresponding to the slot, where the board information file includes hardware configuration information of a board matching the slot.

[0053] Before using the storage device, the user can pre-set the board type that can be used in each slot, such as a network card and a host bus adapter (HBA) card. After the user sets the board corresponding to each slot, the board information file is compiled. The board information file includes the hardware configuration information of the board that matches the slot.

[0054] By pre-compiled card information files, the type of card inserted into each slot can be controlled to avoid inserting untrusted cards, which may cause storage device call failure and data loss.

[0055] S230, determining the matching degree between the board and the slot according to the hardware information and the hardware configuration information.

[0056] Compare the hardware information with the hardware configuration information to determine whether the board is a board that is allowed to be inserted into the slot. If the board is a board that is allowed to be inserted into the slot, it is determined that the board is trustworthy and can be called. If the board is not a board that is allowed to be inserted into the slot, it is determined that the board is untrustworthy and cannot be called. In this way, the type of board inserted into each slot can be accurately controlled, ensuring the quality of the entire storage device, so that the storage device can be installed completely and without distinction at the customer site, providing a guarantee for the reliability of the storage device.

[0057] It can be seen that in the embodiment of the present application, when the board is inserted into the slot of the storage device, the storage system reads the hardware information of the board, obtains the board information file corresponding to the slot, and the board information file includes the hardware configuration information of the board that matches the slot. According to the hardware information and the hardware configuration information, the matching degree between the board and the slot is determined, so that the slot accurately matches the board, ensuring that the storage system can safely call the board, thereby improving the reliability of the storage device.

[0058] The following describes each step in the above method flow in detail. First, the above step S220, ie, "obtaining the board information file corresponding to the slot", is described in detail in conjunction with the embodiment.

[0059] The board information file is saved in a pre-established directory entry. As a feasible method, before the board is inserted into the slot of the storage device, the corresponding relationship between each slot and the board to be called is set;

[0060] According to the corresponding relationship, the hardware configuration information of the board to be called is saved to the directory item of the slot corresponding to the board to be called;

[0061] Save the directory entry for each slot to the storage system installation package;

[0062] Based on the storage system installation package, the storage system is installed in the storage device to determine the matching degree between the board and the slot.

[0063] Users can set the corresponding relationship between each slot and the board to be called according to actual needs, and compile the board information file in the X.conf file format. For example, slot 1 uses a network card and slot 2 uses an HBA card.

[0064] According to this correspondence, the hardware configuration information of the board to be called is saved in the directory entry of the corresponding slot. For example, the hardware configuration information of the network card is saved in the directory entry of slot 1, and the hardware configuration information of the HBA card is saved in the directory entry of slot 2.

[0065] The directory items of all slots of the storage device are packaged into a storage system installation package, and the storage system installation package is downloaded in the storage device to install the storage system in the storage device. At this point, the storage device is equipped with an operating environment for executing the method for determining the matching degree between the board and the slot.

[0066] As an achievable method, obtaining the board information file corresponding to the slot specifically includes: obtaining a directory entry of the slot;

[0067] According to the slot directory item, obtain the board information file corresponding to the slot.

[0068] In a storage device equipped with the above storage system, a directory entry of a slot where a board is inserted can be directly obtained, and a pre-stored board information file can be obtained from the directory entry.

[0069] The above step S230, namely "determining the matching degree between the board and the slot according to the hardware information and the hardware configuration information", is described in detail below in conjunction with the embodiments.

[0070] As an implementable manner, when the hardware information and the hardware configuration information are consistent, it is determined that the board matches the slot.

[0071] The hardware information includes the identification number information of the board, wherein the identification number information includes device id, vendor id, subsystem_device id, and subsystem_vendor id.

[0072] The hardware configuration information includes identification number information of boards that are allowed to be inserted into the slots, wherein the identification number information includes device id, vendor id, subsystem_device id, and subsystem_vendor id.

[0073] When the four identification numbers in the hardware information are consistent with the four identification numbers in the hardware configuration information, it indicates that the inserted board is a preset board type, and it is determined that the board matches the slot.

[0074] When the 4 identification numbers in the hardware information are inconsistent with the 4 identification numbers in the hardware configuration information, that is, when the identification numbers corresponding to the 4 identification number types in the hardware information are inconsistent with the identification numbers corresponding to the 4 identification number types in the hardware configuration information, it means that the inserted board is not the pre-set board type and may be an untrusted board, and it is determined that the board does not match the slot.

[0075] As an achievable manner, after determining that the board matches the slot, the method further includes:

[0076] Output the configuration information file of the slot, the configuration information file includes the slot number and the board type code matching the slot number;

[0077] According to the slot number and the board type code, based on the board type and identification number information mapping table, obtaining the identification number information of the board matching the slot;

[0078] Call the board according to the identification number information.

[0079] The configuration information file is an hwconfig file, which includes the slot number and the card type code that matches the slot number. For example, the hwconfig file records slot 1: 16; slot 2: 25, which means that slot 1 allows the insertion of a 10G, 2-port network card, and slot 2 allows the insertion of a 16G, 4-port Emulex HBA card. The slot number can be determined according to the slot arrangement order on the storage device, or a special slot can be specified according to actual needs.

[0080] Based on the card type and identification number information mapping table defined in the storage system, find the identification number information corresponding to the card type code, the identification information includes device id, vendor id, subsystem_device id, subsystem_vendor id and other information.

[0081] Then, the board is called according to the identification number information. Specifically, the board operation file corresponding to the identification number information is searched; the system interface of the operating system is used to open the function, load the board operation file, and call the board.

[0082] According to the identification number information, the board operation file corresponding to the identification number information is searched in the / dev directory of the operating system, and the system interface opening function of the operating system is used to load the board operation file for the driver module of the storage system to call. Among them, the opening function is the open function.

[0083] Before calling the board, the driver module will initialize the board, after which the board can be used by the upper-level software.

[0084] As an implementable manner, after reading the hardware information of the board, the method further includes:

[0085] Generate a number file based on hardware information;

[0086] The number file is saved in a specific directory of the slot, so that when determining the matching degree between the board and the slot, the number file is obtained from the specific directory to match with the board information file.

[0087] Hardware information includes device id, vendor id, subsystem_device id, and subsystem_vendorid.

[0088] The numbered files include device files, vendor files, subsystem_device files, and subsystem_vendor files.

[0089] The specific directory is / sys / bus / pci / pci_address / directory.

[0090] Save the device id to the device file, the vendor id to the vendor file, the subsystem_device id to the subsystem_device file, and the subsystem_vendor id to the subsystem_vendor file. Then, save the four files to the / sys / bus / pci / pci_address / directory.

[0091] Each slot has its corresponding / sys / bus / pci / pci_address / directory. If the storage device is inserted into multiple slots at the same time, when determining the matching degree between the board and the slot, the number file and the board information file can be obtained from the / sys / bus / pci / pci_address / directory corresponding to each slot for matching. In this way, the integrity of the hardware information of each board is guaranteed, and the matching degree between the board and the slot is avoided, which may cause the information involved in the matching to be wrong due to data confusion, resulting in inaccurate determination of the matching degree between the board and the slot.

[0092] In combination with the implementation method in the above embodiment, Figure 3 An example of a preferred method flow provided in the embodiment of the present application is described. Figure 3 As shown, the method may include the following steps:

[0093] S301, setting the corresponding relationship between each slot and the board to be called.

[0094] S302: According to the corresponding relationship, the hardware configuration information of the board to be called is saved in the directory item of the slot corresponding to the board to be called.

[0095] S303: Save the directory entry of each slot to the storage system installation package.

[0096] S304: Install the storage system in the storage device based on the storage system installation package.

[0097] S305, after the board is inserted into the slot of the storage device, the storage system reads the hardware information of the board.

[0098] S306, generating a numbering file according to the hardware information.

[0099] S307, saving the numbered file to a specific directory of the slot.

[0100] S308, obtaining a directory entry of the slot.

[0101] S309, obtaining the board information file corresponding to the slot according to the directory entry of the slot.

[0102] The board information file includes the hardware configuration information of the board that matches the slot.

[0103] S310, determining the matching degree between the board and the slot according to the hardware information and the hardware configuration information.

[0104] If the hardware information and the hardware configuration information are consistent, then S311 is executed. If the hardware information and the hardware configuration information are inconsistent, then S312 is executed.

[0105] S311, when the hardware information and the hardware configuration information are consistent, determine that the board matches the slot.

[0106] After determining that the board matches the slot, execute S313.

[0107] S312: When the hardware information and the hardware configuration information are inconsistent, it is determined that the board does not match the slot.

[0108] S313, output the configuration information file of the slot.

[0109] The configuration information file includes a slot number and a board type code that matches the slot number.

[0110] S314, according to the slot number and the board type code, based on the board type and identification number information mapping table, obtaining the identification number information of the board matching the slot.

[0111] S315, searching for the board operation file corresponding to the identification number information.

[0112] S316, using the system interface of the operating system to open the function, load the board running file, and call the board.

[0113] By executing the above method, the type of board inserted into each slot can be accurately controlled, ensuring the quality of the entire storage device, so that the storage device can be installed completely and without distinction at the customer site, providing a guarantee for the reliability of the storage device.

[0114] It should be understood that although Figure 2 and Figure 3 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in the application, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2 and Figure 3 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0115] Figure 4 A schematic diagram of a device for determining the matching degree between a board and a slot provided in an embodiment of the present application, for performing the following steps: Figure 2 The method flow shown in Figure 4 As shown, the device may include: a reading module 410, an acquisition module 420 and a determination module 430, and may further include: a calling module, an installation module and a saving module. The main functions of each component module are as follows:

[0116] The reading module 410 is used for the storage system to read the hardware information of the board after the board is inserted into the slot of the storage device;

[0117] An acquisition module 420 is used to acquire a board information file corresponding to the slot, wherein the board information file includes hardware configuration information of a board matching the slot;

[0118] The determination module 430 is used to determine the matching degree between the board and the slot according to the hardware information and the hardware configuration information.

[0119] In the embodiment of the present application, the slots can be accurately matched with the boards, ensuring that the storage system can safely call the boards, thereby improving the reliability of the storage device.

[0120] As an implementable manner, the determination module 430 is specifically used to determine that the board matches the slot when the hardware information and the hardware configuration information are consistent;

[0121] When the hardware information and hardware configuration information are inconsistent, it is determined that the board does not match the slot.

[0122] As an implementable manner, the device further comprises: a calling module; after determining that the board matches the slot, the calling module is used to output a configuration information file of the slot, the configuration information file comprising a slot number and a board type code matching the slot number;

[0123] According to the slot number and the board type code, based on the board type and identification number information mapping table, obtaining the identification number information of the board matching the slot;

[0124] Call the board according to the identification number information.

[0125] As an implementable method, a module is called to specifically search for a board operation file corresponding to the identification number information;

[0126] Use the system interface of the operating system to open the function and load the board operation file to call the board.

[0127] As an implementable manner, the device further comprises: an installation module; before the board is inserted into the slot of the storage device, the installation module is used to set the corresponding relationship between each slot and the board to be called;

[0128] According to the corresponding relationship, the hardware configuration information of the board to be called is saved to the directory item of the slot corresponding to the board to be called;

[0129] Save the directory entry for each slot to the storage system installation package;

[0130] Based on the storage system installation package, the storage system is installed in the storage device to determine the matching degree between the board and the slot.

[0131] As an implementable manner, the acquisition module 420 is used to acquire a directory entry of a slot;

[0132] According to the slot directory item, obtain the board information file corresponding to the slot.

[0133] As an implementable manner, the device further comprises: a storage module; after reading the hardware information of the board, the storage module is used to generate a numbering file according to the hardware information;

[0134] The number file is saved in a specific directory of the slot, so that when determining the matching degree between the board and the slot, the number file is obtained from the specific directory to match with the board information file.

[0135] It is to be understood that the implementation of any method or product of the present application does not necessarily require all of the advantages described above to be achieved at the same time.

[0136] The same or similar parts between the above embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0137] According to an embodiment of the present application, the present application also provides a computer device and a computer-readable storage medium.

[0138] like Figure 5 , is a block diagram of a computer device according to an embodiment of the present application. The computer device is intended to represent various forms of digital computers or mobile devices. The digital computer may include a desktop computer, a portable computer, a workbench, a personal digital assistant, a server, a mainframe computer, and other suitable computers. The mobile device may include a tablet computer, a smart phone, a wearable device, etc.

[0139] like Figure 5 As shown, the device 500 includes a computing unit 501, a ROM 502, a RAM 503, a bus 504, and an input / output (I / O) interface 505, and the computing unit 501, ROM 502 and RAM 503 are connected to each other through the bus 504. The input / output (I / O) interface 505 is also connected to the bus 504.

[0140] The computing unit 501 can perform various processes in the method embodiment of the present application according to the computer instructions stored in the read-only memory (ROM) 502 or the computer instructions loaded from the storage unit 508 to the random access memory (RAM) 503. The computing unit 501 can be various general and / or special processing components with processing and computing capabilities. The computing unit 501 may include, but is not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. In some embodiments, the method provided in the embodiment of the present application can be implemented as a computer software program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 508.

[0141] RAM 503 may also store various programs and data required for the operation of device 500. Part or all of the computer program may be loaded and / or installed on device 500 via ROM 802 and / or communication unit 509.

[0142] The input unit 506, output unit 507, storage unit 508 and communication unit 509 in the device 500 can be connected to the I / O interface 505. The input unit 506 can be, for example, a keyboard, a mouse, a touch screen, a microphone, etc. The output unit 507 can be, for example, a display, a speaker, an indicator light, etc. The device 500 can exchange information, data, etc. with other devices through the communication unit 509.

[0143] It should be noted that the device may also include other components necessary for normal operation, or may only include components necessary for implementing the solution of the present application, rather than all the components shown in the figure.

[0144] Various implementations of the systems and techniques described herein can be realized in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof.

[0145] The computer instructions for implementing the method of the present application can be written in any combination of one or more programming languages. These computer instructions can be provided to the computing unit 501, so that when the computer instructions are executed by the computing unit 501 such as a processor, the steps involved in the method embodiment of the present application are executed.

[0146] The computer-readable storage medium provided in the present application may be a tangible medium, which may contain or store computer instructions for executing the following steps involved in the method embodiment of the present application:

[0147] When the board is inserted into the slot of the storage device, the storage system reads the hardware information of the board;

[0148] Obtain a board information file corresponding to the slot, the board information file including hardware configuration information of the board matching the slot;

[0149] Determine the matching degree between the board and the slot based on the hardware information and hardware configuration information.

[0150] As an achievable method, the matching degree between the board and the slot is determined based on the hardware information and the hardware configuration information, including: when the hardware information and the hardware configuration information are consistent, determining that the board and the slot match; when the hardware information and the hardware configuration information are inconsistent, determining that the board and the slot do not match.

[0151] As an implementable manner, after determining that the board matches the slot, the method further includes: outputting a configuration information file of the slot, the configuration information file including the slot number and a board type code that matches the slot number; obtaining identification number information of the board that matches the slot based on the slot number and the board type code and based on a mapping table of board type and identification number information; and calling the board based on the identification number information.

[0152] As an implementable method, calling the board card according to the identification number information includes: searching for the board card operation file corresponding to the identification number information; using the system interface of the operating system to open the function, load the board card operation file, and call the board card.

[0153] As an achievable manner, before the board is inserted into the slot of the storage device, the method also includes: setting a correspondence between each slot and the board to be called; according to the correspondence, saving the hardware configuration information of the board to be called to the directory item of the slot corresponding to the board to be called; saving the directory item of each slot to a storage system installation package; and installing the storage system in the storage device based on the storage system installation package to determine the matching degree between the board and the slot.

[0154] As an achievable method, obtaining the board information file corresponding to the slot includes: obtaining a directory entry of the slot; and obtaining the board information file corresponding to the slot according to the directory entry of the slot.

[0155] As an implementable manner, after reading the hardware information of the board, the method also includes: generating a numbering file based on the hardware information; saving the numbering file to a specific directory of the slot, so as to obtain the numbering file from the specific directory and match it with the board information file when determining the matching degree between the board and the slot.

[0156] Computer-readable storage media may include, but are not limited to, electronic, magnetic, optical, electromagnetic, and other forms of storage media.

[0157] The above specific implementations do not constitute a limitation on the protection scope of this application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of this application should be included in the protection scope of this application.

Claims

1. A method for determining the matching degree between a board and a slot, characterized in that: The method comprises: When the board is inserted into the slot of the storage device, the storage system reads the hardware information of the board; Acquire a board information file corresponding to the slot, wherein the board information file includes hardware configuration information of a board matching the slot; Determining the matching degree between the board and the slot according to the hardware information and the hardware configuration information; Before the board is inserted into the slot of the storage device, the method further includes: A correspondence between each slot and the board to be called is set; according to the correspondence, the hardware configuration information of the board to be called is saved to the directory item of the slot corresponding to the board to be called; the directory item of each slot is saved to the storage system installation package; based on the storage system installation package, the storage system is installed in the storage device to determine the matching degree between the board and the slot; wherein, according to the correspondence, a board information file is compiled, and the file format is X.conf; After determining that the board matches the slot, the method further includes: Outputting a configuration information file of the slot, the configuration information file including a slot number and a board type code matching the slot number; acquiring identification information of a board matching the slot according to the slot number and the board type code based on a board type and identification information mapping table; calling the board according to the identification information, specifically including: searching for a board operation file corresponding to the identification information; using a system interface open function of an operating system to load the board operation file to call the board, wherein the identification information includes device id, vendor id, subsystem_device id, and subsystem_vendor id; The obtaining of the board information file corresponding to the slot includes: obtaining a directory entry of the slot; and obtaining the board information file corresponding to the slot according to the directory entry of the slot; After reading the hardware information of the board, the method further includes: generating a numbering file based on the hardware information; saving the numbering file to a specific directory of the slot, so as to obtain the numbering file from the specific directory and match it with the board information file when determining the matching degree between the board and the slot.

2. The method according to claim 1, characterized in that Determining the matching degree between the board and the slot according to the hardware information and the hardware configuration information includes: When the hardware information is consistent with the hardware configuration information, determining that the board matches the slot; When the hardware information and the hardware configuration information are inconsistent, it is determined that the board does not match the slot.

3. A device for determining the matching degree between a board and a slot, characterized in that: The device comprises: A reading module, used for the storage system to read the hardware information of the board after the board is inserted into the slot of the storage device; An acquisition module, used to acquire a board information file corresponding to the slot, wherein the board information file includes hardware configuration information of a board matching the slot; A determination module, used to determine the matching degree between the board and the slot according to the hardware information and the hardware configuration information; The device further comprises: a calling module; after determining that the board matches the slot, the calling module is used to output a configuration information file of the slot, the configuration information file comprising a slot number and a board type code matching the slot number; according to the slot number and the board type code, based on a board type and identification number information mapping table, the identification number information of the board matching the slot is obtained; according to the identification number information, the board is called, specifically comprising: searching for a board operation file corresponding to the identification number information; using a system interface open function of an operating system to load the board operation file to call the board, wherein the identification number information comprises device id, vendor id, subsystem_device id, and subsystem_vendor id; The device further comprises: an installation module; before the board is inserted into the slot of the storage device, the installation module is used to set the corresponding relationship between each slot and the board to be called; according to the corresponding relationship, the hardware configuration information of the board to be called is saved to the directory item of the slot corresponding to the board to be called; the directory item of each slot is saved to the storage system installation package; based on the storage system installation package, the storage system is installed in the storage device to determine the matching degree between the board and the slot; wherein, according to the corresponding relationship, a board information file is compiled, and the file format is X.conf; The acquisition module is specifically used to acquire the directory item of the slot; and acquire the board information file corresponding to the slot according to the directory item of the slot; The device also includes: a saving module; after reading the hardware information of the board, the saving module is used to generate a numbering file according to the hardware information; the numbering file is saved to a specific directory of the slot, so that when determining the matching degree between the board and the slot, the numbering file is obtained from the specific directory and matched with the board information file.

4. A computer device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores computer instructions that can be executed by the at least one processor, and the computer instructions are executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1 and 2.

5. A computer-readable storage medium having computer instructions stored thereon, characterized in that: The computer instructions are used to make a computer execute the method according to any one of claims 1 and 2.