An Expander card management parameter setting method, system, device and storage medium
Patent Information
- Application Number
- CN202211262024.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-14
- Publication Date
- 2026-08-21
- Estimated Expiration
- 2042-10-14
AI Technical Summary
但是,采用此种方式进行设置,需要人工自行判断服务器与JBOD的连接方式,而且需要人工自行设置,无法实现批量自动化方式处理
[0052]对比现有技术,本发明有益效果在于:本发明公开了一种Expander卡管理参数的设置方法、系统、装置及存储介质,能够依靠服务器自行读取的配置情况来设置expander卡所需管理参数,不需要人工介入。而且,对于经常变动的连接方式,也不需要人工去频繁修改,只需要重启机器,让其自动甄别当前连接情况,并自动配置即可。
Smart Images

Figure CN115686668B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and more specifically to a method, system, device, and storage medium for setting Expander card management parameters. Background Technology
[0002] JBOD (Just a Bunch Of Disks) is an important type of storage device in the storage field. A JBOD is a storage device with multiple disk drives mounted on a single baseboard. It is often also called a Span. Unlike RAID arrays, JBODs do not have front-end logic to manage the data distribution across the disks. Instead, each disk is addressed individually as a separate storage resource, either as part of the host software or as an adapter card for the RAID group.
[0003] Although JBOD is not a standard RAID level, it has been widely adopted as a means of expanding server storage resources. Due to the different connection methods between JBOD and the server, the management parameters for the server's expander card will differ. For one server with one JBOD, the server's expander card should be set to Zone 3; for one server with four JBODs, the server's expander card should be set to Zone 4.
[0004] Currently, the common practice is to manually configure the management parameters of the expander card on the server based on the on-site connection between the server and the JBOD. However, this method requires manual determination of the connection between the server and the JBOD, and manual configuration is not possible for batch automation. Summary of the Invention
[0005] To address the above problems, the present invention aims to provide a method, system, device, and storage medium for setting Expander card management parameters, which can automatically set the corresponding Expander card management parameters based on the read expander card and JBOD hard disk backplane information when the server and JBOD are already connected.
[0006] To achieve the above objectives, this invention provides the following technical solution: a method for setting Expander card management parameters, comprising:
[0007] Connect the server to the JBOD as needed;
[0008] Use a PXE server to boot the server into a Linux operating system;
[0009] Read the SAS card and expander card information, and confirm that the SAS card and expander card are compatible;
[0010] Read the number of JBOD management boards and hard drive backplanes, and confirm that the JBOD management boards and hard drive backplanes match.
[0011] Confirm that the number of SAS cards matches the number of JBOD management boards;
[0012] Query the number of management boards on the JBOD and determine the connection mode based on the query results;
[0013] Configure the Expander card's management parameters according to the connection mode.
[0014] Further, read the SAS card and expander card information and confirm that the SAS card and expander card match, including:
[0015] Use the scrtnycli tool to read SAS card and expander card information to obtain the number of SAS cards and expander cards;
[0016] The first matching rule is used to determine whether the current SAS card and expander card are compatible. If they are not compatible, the process will terminate and an error message will be displayed.
[0017] The first matching rule is as follows:
[0018]
[0019] Where E is the number of Expander cards and S is the number of SAS cards. If the equation holds true, then the current SAS card and expander card match; otherwise, they do not match.
[0020] Further, read the number of JBOD management boards and hard drive backplanes, and confirm that the JBOD management boards and hard drive backplanes match, including:
[0021] Use the lsscsi command to read the number of management boards and hard disk backplanes of the JBOD;
[0022] The second matching rule is used to determine whether the current JBOD management board and hard disk backplane match. If they do not match, the process will terminate and an error message will be displayed.
[0023] The second matching rule is as follows:
[0024]
[0025] Where J is the number of management boards in the JBOD and B is the number of hard disk backplanes. If the equation holds true, then the relationship between the management boards and hard disk backplanes of the current JBOD is matched; otherwise, they are not matched.
[0026] Furthermore, it was confirmed that the number of SAS cards matched the number of JBOD management boards, including:
[0027] The third matching rule is used to determine whether the number of SAS cards matches the number of JBOD management boards. If they do not match, the process is terminated and an error message is displayed.
[0028] The third matching rule is as follows:
[0029] S-1=B
[0030] Where S is the number of SAS cards and B is the number of hard disk backplanes. If the equation holds true, then the current number of SAS cards matches the number of JBOD management boards; otherwise, they do not match.
[0031] Further, query the number of management boards on the JBOD and determine the connection mode based on the query results, including: using the command lsscsi-sg|grep enclosu|grep'EXP BD'|wc -l to query the number of management boards on the JBOD;
[0032] If the query result is 4, then the current mode is 1-to-4;
[0033] If the query result is 2, then the current mode is 1 drag 2;
[0034] If the query result is 1, then the current mode is 1-to-1.
[0035] Furthermore, the management parameters of the Expander card are configured according to the connection mode, including:
[0036] If the current mode is 1-to-1, query the sg number of the JBOD management board, use the sg_senddiag command to set the corresponding Expander card management parameters to zone3, and restart the JBOD management board.
[0037] Furthermore, configuring the Expander card's management parameters according to the connection mode also includes:
[0038] If the current configuration is 1-to-4, set all JBOD management boards and backplanes to archive storage mode, read all JBOD backplane information to obtain the SG number, and then use the following command to configure all backplanes.
[0039] sg_senddiag-pr 10,0,0,2,4,0 / dev / sgXXX;
[0040] Query the SG number of the JBOD management board and use the sg_senddiag command to set the corresponding Expander card management parameters to zone4.
[0041] Accordingly, the present invention also discloses an Expander card management parameter setting system, including: a connection unit for connecting the server and the JBOD according to the required method;
[0042] The login unit is used to enable the server to access the Linux operating system using the PXE server.
[0043] The first matching unit is used to read the information of the SAS card and the expander card, and to confirm that the SAS card and the expander card are matched.
[0044] The second matching unit is used to read the number of management boards and hard disk backplanes of the JBOD and to confirm that the management boards and hard disk backplanes of the JBOD are matched.
[0045] The third matching unit is used to confirm that the number of SAS cards matches the number of JBOD management boards;
[0046] The query unit is used to query the number of management boards on the JBOD and determine the connection mode based on the query results.
[0047] The configuration unit is used to set the management parameters of the Expander card according to the connection mode.
[0048] Accordingly, the present invention discloses a device for setting Expander card management parameters, comprising:
[0049] Memory, used to store the settings program for Expander card management parameters;
[0050] The processor is configured to implement the steps of the Expander card management parameter setting method as described in any of the above descriptions when executing the Expander card management parameter setting procedure.
[0051] Accordingly, the present invention discloses a readable storage medium storing an Expander card management parameter setting program, wherein when the Expander card management parameter setting program is executed by a processor, it implements the steps of the Expander card management parameter setting method as described in any of the above claims.
[0052] Compared with existing technologies, the advantages of this invention are as follows: This invention discloses a method, system, device, and storage medium for setting Expander card management parameters. It can automatically set the required management parameters for the Expander card based on configuration information read by the server, without manual intervention. Furthermore, for frequently changing connection methods, frequent manual modifications are unnecessary; simply restarting the machine allows it to automatically identify the current connection status and configure automatically.
[0053] Therefore, it is evident that the present invention has outstanding substantive features and significant progress compared with the prior art, and the beneficial effects of its implementation are also obvious. Attached Figure Description
[0054] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0055] Figure 1 This is a flowchart of the method according to Embodiment 1 of the present invention.
[0056] Figure 2 This is a flowchart of the method in Embodiment 2 of the present invention.
[0057] Figure 3 This is a system structure diagram of Embodiment 3 of the present invention.
[0058] In the diagram, 1 is the connection unit; 2 is the login unit; 3 is the first matching unit; 4 is the second matching unit; 5 is the third matching unit; 6 is the query unit; and 7 is the setting unit. Detailed Implementation
[0059] The core of this invention is to provide a method for setting Expander card management parameters. In existing technologies, the common practice is to manually set the management parameters of the Expander cards on the server based on the on-site connection between the server and the JBOD. However, this method requires manual determination of the connection method between the server and the JBOD, and manual setting is essential, making it impossible to achieve batch automation.
[0060] The Expander card management parameter setting method provided by this invention first connects the server and JBOD according to the required method, using a PXE server to enable the server to enter the Linux operating system. Then, it reads the SAS card and expander card information and confirms that the SAS card and expander card match; it also reads the number of management boards and hard drive backplanes of the JBOD and confirms that the JBOD management boards and hard drive backplanes match. At this point, it confirms that the number of SAS cards matches the number of management boards of the JBOD, and queries the number of management boards on the JBOD, determining the connection mode based on the query result. Finally, it sets the expander card management parameters according to the connection mode. Therefore, this invention can automatically set the corresponding expander card management parameters based on the read expander card and JBOD hard drive backplane information when the server and JBOD are already connected, effectively saving labor costs.
[0061] To enable those skilled in the art to better understand the present invention, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are merely some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0062] Example 1:
[0063] like Figure 1 As shown, this embodiment provides a method for setting Expander card management parameters, including the following steps:
[0064] S1: Connect the server to the JBOD as required.
[0065] S2: Use a PXE server to boot the server into the Linux operating system;
[0066] S3: Read the SAS card and expander card information, and confirm that the SAS card and expander card are matched.
[0067] First, the scrtnycli tool is used to read the SAS card and expander card information to obtain the number of SAS cards and expander cards. Then, the first matching rule is used to determine whether the current SAS cards and expander cards match. If they do not match, the process terminates and an error message is displayed.
[0068] In this step, the first matching rule is as follows:
[0069]
[0070] Where E is the number of Expander cards and S is the number of SAS cards. If the equation holds true, then the current SAS card and expander card match; otherwise, they do not match.
[0071] S4: Read the number of JBOD management boards and hard disk backplanes, and confirm that the JBOD management boards and hard disk backplanes match.
[0072] First, the number of management boards and hard disk backplanes of the JBOD is read using the lsscsi command. Then, the second matching rule is used to determine whether the current JBOD's management boards and hard disk backplanes match. If they do not match, the process terminates and an error message is displayed.
[0073] In this step, the second matching rule is as follows:
[0074]
[0075] Where J is the number of management boards in the JBOD and B is the number of hard disk backplanes. If the equation holds true, then the relationship between the management boards and hard disk backplanes of the current JBOD is matched; otherwise, they are not matched.
[0076] S5: Confirm that the number of SAS cards matches the number of JBOD management boards.
[0077] Specifically, the third matching rule is used to determine whether the number of SAS cards matches the number of JBOD management boards. If they do not match, the process is terminated and an error message is displayed.
[0078] In this step, the third matching rule is as follows:
[0079] S-1=B
[0080] Where S is the number of SAS cards and B is the number of hard disk backplanes. If the equation holds true, then the current number of SAS cards matches the number of JBOD management boards; otherwise, they do not match.
[0081] S6: Query the number of management boards on the JBOD and determine the connection mode based on the query results.
[0082] First, use the command `lsscsi-sg|grep enclosu|grep 'EXP BD'|wc -l` to query the number of management boards on the JBOD. If the query result is 4, the current mode is 1-to-4; if the query result is 2, the current mode is 1-to-2; if the query result is 1, the current mode is 1-to-1.
[0083] S7: Configure the management parameters of the Expander card according to the connection mode.
[0084] If the current mode is 1-to-1, first, query the sg number of the JBOD management board, then use the sg_senddiag command to set the corresponding Expander card management parameters to zone3, and restart the JBOD management board.
[0085] If the current configuration is 1-to-4, first, set all management boards and backplanes of the JBOD to archive storage mode, read all backplane information of the JBOD to obtain the SG number, and then use the following command to configure all backplanes.
[0086] sg_senddiag-pr 10,0,0,2,4,0 / dev / sgXXX;
[0087] Finally, query the sg number of the JBOD management board and use the sg_senddiag command to set the corresponding Expander card management parameters to zone4.
[0088] This embodiment provides a method for setting Expander card management parameters, which can automatically set the corresponding Expander card management parameters based on the read expander card and JBOD hard disk backplane information when the server and JBOD are already connected.
[0089] Example 2:
[0090] Based on Example 1, such as Figure 2 As shown, this invention also discloses a method for setting Expander card management parameters, the specific steps of which are as follows:
[0091] 1. Use a PXE server to boot the server into the Linux operating system.
[0092] 2. After entering the Linux operating system, the script setzone.sh will run automatically.
[0093] 3. Use the scrtnycli tool to read SAS card and expander card information.
[0094] 4. Determine if the current SAS card and Expander card are compatible. The matching rules are as follows:
[0095]
[0096] If there is a mismatch, the process will terminate and an error message will be displayed.
[0097] 5. Read the number of JBOD management boards and hard drive backplanes.
[0098] 6. Determine if the JBOD management board (HDD BD) and hard drive backplane (HDD BP) match. The matching rules are as follows:
[0099]
[0100] If there is a mismatch, the process will terminate and an error message will be displayed.
[0101] 7. Determine if the number of SAS cards read matches the number of management boards on the JBOD. The matching rules are as follows:
[0102] Number of IT cards - 1 = Number of HDDs and BDs
[0103] If there is a mismatch, the process will terminate and an error message will be displayed.
[0104] 8. Query the number of management boards on the JBOD. If there are 4, it's a 1-to-4 mode; if there are 2, it's a 1-to-2 mode; if there is 1, it's a 1-to-1 mode. The command to query the number of management boards on the JBOD is: lsscsi-sg|grep enclosu|grep'EXP BD'|wc -l.
[0105] 9. In 1-to-1 mode, set the management parameters of the Expander card to zone3.
[0106] First, query the SG number of the JBOD management board, which is found to be sg2. Then, use the command `sg_senddiag-pr 12,0,0,2,2,3 / dev / sg2` to set the Expander card's management parameters to zone 3. Finally, use the command `sg_senddiag –p –r 10,0,0,1,6 / dev / sg2` to restart the JBOD management board.
[0107] 10. In 1-to-4 mode, set the management parameters of the Expander card to zone4.
[0108] First, set all JBOD management boards and backplanes to archive storage mode, read all JBOD backplane information to obtain the sg number, and then run the following command to configure all backplanes.
[0109] sg_senddiag-pr 10,0,0,2,4,0 / dev / sgXXX
[0110] Then, query the sg number of the JBOD management board and use the following sg_senddiag command to set the management parameters of the Expander card to zone4.
[0111] sg_senddiag-pr 12,0,0,2,2,4 / dev / sgXXX
[0112] This embodiment provides a method for setting Expander card management parameters. It allows the server to automatically read configuration information and set the necessary management parameters without manual intervention. Furthermore, it eliminates the need for frequent manual modifications for frequently changing connection methods; simply restarting the machine allows it to automatically identify the current connection status and configure the settings.
[0113] Example 3:
[0114] Based on Example 1, such as Figure 3 As shown, the present invention also discloses an Expander card management parameter setting system, including: a connection unit 1, a login unit 2, a first matching unit 3, a second matching unit 4, a third matching unit 5, a query unit 6, and a setting unit 7.
[0115] Connection unit 1 is used to connect the server and JBOD as required.
[0116] Login Unit 2 is used to enable the server to access the Linux operating system using the PXE server.
[0117] The first matching unit 3 is used to read SAS card and expander card information and confirm that the SAS card and expander card are matched. Specifically, the first matching unit 3 is used to: use the scrtnycli tool to read SAS card and expander card information to obtain the number of SAS cards and expander cards; determine whether the current SAS card and expander card are matched according to the first matching rule, and if they are not matched, terminate the operation and report an error message.
[0118] The second matching unit 4 is used to read the number of management boards and hard disk backplanes of the JBOD and confirm that the management boards and hard disk backplanes of the JBOD match. Specifically, the second matching unit 4 is used to: read the number of management boards and hard disk backplanes of the JBOD using the lsscsi command; determine whether the current management boards and hard disk backplanes of the JBOD match according to the second matching rule, and if they do not match, terminate the operation and report an error message.
[0119] The third matching unit 5 is used to confirm that the number of SAS cards matches the number of JBOD management boards. Specifically, the third matching unit 5 is used to determine whether the number of SAS cards matches the number of JBOD management boards according to the third matching rule. If they do not match, the operation is terminated and an error message is displayed.
[0120] Query unit 6 is used to query the number of management boards on the JBOD and determine the connection mode based on the query result. Specifically, query unit 6 uses the command `lsscsi-sg|grep enclosu|grep 'EXP BD'|wc -l` to query the number of management boards on the JBOD. If the query result is 4, the current mode is 1-to-4; if the query result is 2, the current mode is 1-to-2; and if the query result is 1, the current mode is 1-to-1.
[0121] Setting unit 7 is used to configure the management parameters of the Expander card according to the connection mode. Specifically, setting unit 7 is used to: set the corresponding Expander card management parameters to zone 3 in 1-to-1 mode; and set the corresponding Expander card management parameters to zone 4 in 1-to-4 mode.
[0122] This embodiment provides an Expander card management parameter setting system that can automatically set the corresponding Expander card management parameters based on the read expander card and JBOD hard disk backplane information when the server and JBOD are already connected.
[0123] Example 4:
[0124] This embodiment discloses an Expander card management parameter setting device, including a processor and a memory; wherein, when the processor executes the Expander card management parameter setting program stored in the memory, it performs the following steps:
[0125] 1. Connect the server to the JBOD as required.
[0126] 2. Use a PXE server to boot the server into the Linux operating system.
[0127] 3. Read the SAS card and expander card information, and confirm that the SAS card and expander card are matched.
[0128] 4. Read the number of JBOD management boards and hard drive backplanes, and confirm that the JBOD management boards and hard drive backplanes match.
[0129] 5. Confirm that the number of SAS cards matches the number of JBOD management boards.
[0130] 6. Query the number of management boards on the JBOD and determine the connection mode based on the query results.
[0131] 7. Set the management parameters of the Expander card according to the connection mode. Further, the device for setting the Expander card management parameters in this embodiment may also include:
[0132] The input interface is used to acquire the setting program for Expander card management parameters imported from external sources, and save the acquired setting program for Expander card management parameters to the memory. It can also be used to acquire various instructions and parameters transmitted from external terminal devices and transmit them to the processor, so that the processor can perform corresponding processing using these instructions and parameters. In this embodiment, the input interface may specifically include, but is not limited to, a USB interface, a serial interface, a voice input interface, a fingerprint input interface, a hard disk read interface, etc.
[0133] An output interface is used to output various data generated by the processor to connected terminal devices, so that other terminal devices connected to the output interface can obtain the various data generated by the processor. In this embodiment, the output interface may include, but is not limited to, a USB interface, a serial interface, etc.
[0134] A communication unit is used to establish a remote communication connection between the Expander card management parameter setting device and an external server, so that the Expander card management parameter setting device can mount the image file to the external server. In this embodiment, the communication unit may specifically include, but is not limited to, a remote communication unit based on wireless communication technology or wired communication technology.
[0135] The keyboard is used to acquire various parameter data or commands input by the user through real-time keystrokes.
[0136] The monitor is used to display relevant information in real time regarding the process of locating a short circuit in the server's power supply line.
[0137] A mouse can be used to assist users in inputting data and simplifying user operations.
[0138] Example 5:
[0139] This embodiment also discloses a readable storage medium, which includes random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable hard disk, CD-ROM, or any other form of storage medium known in the art. The readable storage medium stores a setting program for Expander card management parameters, which, when executed by a processor, performs the following steps:
[0140] 1. Connect the server to the JBOD as required.
[0141] 2. Use a PXE server to boot the server into the Linux operating system.
[0142] 3. Read the SAS card and expander card information, and confirm that the SAS card and expander card are matched.
[0143] 4. Read the number of JBOD management boards and hard drive backplanes, and confirm that the JBOD management boards and hard drive backplanes match.
[0144] 5. Confirm that the number of SAS cards matches the number of JBOD management boards.
[0145] 6. Query the number of management boards on the JBOD and determine the connection mode based on the query results.
[0146] 7. Configure the management parameters of the Expander card according to the connection mode.
[0147] In summary, this invention can automatically set the corresponding Expander card management parameters based on the read Expander card and JBOD hard drive backplane information when the server and JBOD are already connected, effectively saving labor costs.
[0148] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. The methods disclosed in the embodiments are described simply because they correspond to the systems disclosed in the embodiments; relevant details can be found in the method section.
[0149] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software 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 implementations should not be considered beyond the scope of this invention.
[0150] In the embodiments provided by this invention, it should be understood that the disclosed systems, methods, and approaches can be implemented in other ways. For example, the system embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between systems or units may be electrical, mechanical, or other forms.
[0151] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0152] In addition, the functional modules in the various embodiments of the present invention can be integrated into one processing unit, or each module can exist physically separately, or two or more modules can be integrated into one unit.
[0153] Similarly, in the various embodiments of the present invention, each processing unit can be integrated into a functional module, or each processing unit can exist physically, or two or more processing units can be integrated into a functional module.
[0154] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0155] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0156] The above provides a detailed description of the method, system, apparatus, and readable storage medium for setting Expander card management parameters provided by this invention. Specific examples have been used to illustrate the principles and implementation methods of this invention. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and core ideas of this invention. It should be noted that those skilled in the art can make various improvements and modifications to this invention without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of this invention.
Claims
1. A method for setting Expander card management parameters, characterized in that, include: Connect the server to the JBOD as needed; Use a PXE server to boot the server into a Linux operating system; Read the SAS card and Expander card information, and confirm that the SAS card and Expander card are compatible; Read the number of JBOD management boards and hard drive backplanes, and confirm that the JBOD management boards and hard drive backplanes match. Confirm that the number of SAS cards matches the number of JBOD management boards; Query the number of management boards on the JBOD and determine the connection mode based on the query results; Configure the Expander card's management parameters according to the connection mode; The process of querying the number of management boards on the JBOD and determining the connection mode based on the query results includes: Use the command `lsscsi -sg|grep enclosu |grep 'EXP BD'|wc -l` to query the number of management boards on the JBOD. If the query result is 4, then the current mode is 1-to-4. If the query result is 2, then the current mode is 1 drag 2; If the query result is 1, then the current mode is 1-to-1.
2. The method for setting Expander card management parameters according to claim 1, characterized in that, The process of reading SAS card and Expander card information and confirming that the SAS card and Expander card match includes: Use the scrtnycli tool to read SAS card and Expander card information to obtain the number of SAS cards and Expander cards; The first matching rule is used to determine whether the current SAS card and Expander card are compatible. If they are not compatible, the process will terminate and an error message will be displayed. The first matching rule is as follows: Where E is the number of Expander cards and S is the number of SAS cards. If the equation holds true, then the current SAS card and Expander card match; otherwise, they do not match.
3. The method for setting Expander card management parameters according to claim 2, characterized in that, The process of reading the number of JBOD management boards and hard drive backplanes, and confirming that the JBOD management boards and hard drive backplanes match, includes: Use the lsscsi command to read the number of management boards and hard disk backplanes of the JBOD; The second matching rule is used to determine whether the current JBOD management board and hard disk backplane match. If they do not match, the process will terminate and an error message will be displayed. The second matching rule is as follows: Where J is the number of management boards in the JBOD and B is the number of hard disk backplanes. If the equation holds true, then the relationship between the management boards and hard disk backplanes of the current JBOD is matched; otherwise, they are not matched.
4. The method for setting Expander card management parameters according to claim 3, characterized in that, The confirmation that the number of SAS cards matches the number of JBOD management boards includes: The third matching rule is used to determine whether the number of SAS cards matches the number of JBOD management boards. If they do not match, the process is terminated and an error message is displayed. The third matching rule is as follows: Where S is the number of SAS cards and B is the number of hard disk backplanes. If the equation holds true, then the current number of SAS cards matches the number of JBOD management boards; otherwise, they do not match.
5. The method for setting Expander card management parameters according to claim 4, characterized in that, The step of setting the management parameters of the Expander card according to the connection mode includes: If the current mode is 1-to-1, query the sg number of the JBOD management board, use the sg_senddiag command to set the corresponding Expander card management parameters to zone3, and restart the JBOD management board.
6. The method for setting Expander card management parameters according to claim 5, characterized in that, The step of setting the management parameters of the Expander card according to the connection mode also includes: If the current configuration is 1-to-4, set all JBOD management boards and backplanes to archive storage mode, read all JBOD backplane information to obtain the SG number, and then use the following command to configure all backplanes. sg_senddiag -p -r 10,0,0,2,4,0 / dev / sgXXX; Query the SG number of the JBOD management board and use the sg_senddiag command to set the corresponding Expander card management parameters to zone4.
7. A system for setting Expander card management parameters, characterized in that, include: The connection unit is used to connect the server to the JBOD as needed; The login unit is used to enable the server to access the Linux operating system using the PXE server. The first matching unit is used to read the information of the SAS card and the Expander card, and to confirm that the SAS card and the Expander card are matched. The second matching unit is used to read the number of management boards and hard disk backplanes of the JBOD and to confirm that the management boards and hard disk backplanes of the JBOD are matched. The third matching unit is used to confirm that the number of SAS cards matches the number of JBOD management boards; The query unit is used to query the number of management boards on the JBOD and determine the connection mode based on the query results. The configuration unit is used to set the management parameters of the Expander card according to the connection mode; The process of querying the number of management boards on the JBOD and determining the connection mode based on the query results includes: Use the command `lsscsi -sg|grep enclosu |grep 'EXP BD'|wc -l` to query the number of management boards on the JBOD. If the query result is 4, then the current mode is 1-to-4. If the query result is 2, then the current mode is 1 drag 2; If the query result is 1, then the current mode is 1-to-1.
8. A device for setting Expander card management parameters, characterized in that, include: Memory, used to store the settings program for Expander card management parameters; The processor, when executing the Expander card management parameter setting procedure, implements the steps of the Expander card management parameter setting method as described in any one of claims 1 to 6.
9. A readable storage medium, characterized in that: The readable storage medium stores a setting program for Expander card management parameters, which, when executed by a processor, implements the steps of the Expander card management parameter setting method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Method, system and equipment for monitoring storage Jbod and medium
CN111309553A