RAID configuration method, device, equipment and medium

By obtaining server storage information and RAID configuration templates, it automatically selects in-band or out-of-band configuration mode, solving the problem of difficult RAID configuration mode selection and achieving stable and fast RAID configuration.

CN114968112BActive Publication Date: 2025-09-23JINAN INSPUR DATA TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210606678.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-31
Publication Date
2025-09-23
Estimated Expiration
2042-05-31

AI Technical Summary

Technical Problem

In the prior art, batch methods for RAID configuration have the problem of difficulty in selecting the optimal configuration mode, resulting in unstable configuration and long time consumption.

Method used

By obtaining the server's storage information and the target RAID configuration template, it automatically selects in-band or out-of-band configuration mode to ensure stable and fast RAID configuration while meeting configuration requirements.

Benefits of technology

It automatically selects the optimal RAID configuration mode when configuring servers in batches, ensuring configuration stability and speed while taking into account the advantages of both in-band and out-of-band configuration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114968112B_ABST
    Figure CN114968112B_ABST
Patent Text Reader

Abstract

This application discloses a RAID configuration method, apparatus, device, and medium, which are applied to the field of RAID configuration technology and include: obtaining the current storage information of a server to be configured; obtaining a target RAID configuration template; wherein the target RAID configuration template is a template obtained by a user after configuring an initial RAID configuration template; determining the RAID configuration mode of the server to be configured based on the storage information and the target RAID configuration template; wherein the RAID configuration mode is an out-of-band configuration or an in-band configuration; and performing RAID configuration on the server to be configured based on the RAID configuration mode. In this way, the optimal RAID configuration mode can be automatically selected while meeting the configuration requirements, thereby ensuring stable and rapid RAID configuration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of RAID configuration, and in particular to a RAID configuration method, apparatus, device, and medium. Background Art

[0002] In an era of unlimited development of data and networks, servers are being used more and more widely. RAID (Redundant Array of Independent Disks) configuration, as the basis for server use, is particularly important. Therefore, RAID batch configuration has become an important part of server management software.

[0003] Currently, common batch RAID configuration methods include in-band RAID configuration via a LiveCD script and out-of-band RAID configuration via the BMC interface. Each mode has its advantages and disadvantages. Choosing the optimal RAID configuration mode and ensuring stable and fast RAID configuration remains a pressing challenge. Summary of the Invention

[0004] In view of this, the purpose of this application is to provide a RAID configuration method, apparatus, device, and medium that can automatically select the optimal RAID configuration mode, thereby ensuring stable and rapid RAID configuration. The specific solution is as follows:

[0005] In a first aspect, the present application discloses a RAID configuration method, comprising:

[0006] Get the current storage information of the server to be configured;

[0007] Obtaining a target RAID configuration template; wherein the target RAID configuration template is a template obtained by the user configuring the initial RAID configuration template;

[0008] Determining a RAID configuration mode of the server to be configured based on the storage information and the target RAID configuration template; wherein the RAID configuration mode is out-of-band configuration or in-band configuration;

[0009] Perform RAID configuration on the server to be configured based on the RAID configuration mode.

[0010] Optionally, determining the RAID configuration mode of the server to be configured based on the storage information and the target RAID configuration template includes:

[0011] Obtaining model information of the server to be configured;

[0012] Determining whether the server to be configured supports in-band configuration and out-of-band configuration based on the model information;

[0013] If the server to be configured only supports in-band configuration, determining the RAID configuration mode as in-band configuration;

[0014] If the server to be configured only supports out-of-band configuration, or supports in-band configuration and out-of-band configuration, the RAID configuration mode of the server to be configured is determined based on the storage information and the target RAID configuration template.

[0015] Optionally, if the server to be configured supports only out-of-band configuration, or supports both in-band configuration and out-of-band configuration, determining the RAID configuration mode of the server to be configured based on the storage information and the target RAID configuration template includes:

[0016] Determining whether the target RAID configuration template includes parameters that can only be configured in-band;

[0017] If the parameters are only configurable in-band and the server to be configured only supports out-of-band configuration, a prompt message indicating that RAID configuration cannot be performed is generated; if the parameters are only configurable in-band and the server to be configured supports both in-band and out-of-band configuration, the RAID configuration mode is determined to be in-band configuration;

[0018] If it does not contain parameters that can only be configured in-band, compare the storage information and the target RAID configuration template to determine whether the out-of-band configuration conditions are met; if the out-of-band configuration conditions are met, determine the RAID configuration mode as out-of-band configuration; if the out-of-band configuration conditions are not met and the server to be configured supports both in-band configuration and out-of-band configuration, determine the RAID configuration mode as in-band configuration.

[0019] Optionally, comparing the storage information with the target RAID configuration template to determine whether an out-of-band configuration condition is met includes:

[0020] comparing the storage information with the target RAID configuration template;

[0021] If the storage information includes relevant information of the RAID card to be configured in the target RAID configuration template and the number of physical disks in the storage information is greater than or equal to the number of physical disks required in the target RAID configuration template, it is determined that the out-of-band configuration condition is met; otherwise, it is determined that the out-of-band configuration condition is not met.

[0022] Optionally, before obtaining the model information of the server to be configured, the method further includes:

[0023] Determine whether there is currently an in-band operation task for the server to be configured;

[0024] If the in-band operation task exists, the RAID configuration mode is determined to be in-band configuration.

[0025] Optionally, after determining whether the server to be configured supports in-band configuration and out-of-band configuration based on the model information, the method further includes:

[0026] If the server to be configured does not support in-band configuration and does not support out-of-band configuration, a prompt message indicating that RAID configuration cannot be performed is generated.

[0027] Optionally, performing RAID configuration on the server to be configured based on the RAID configuration mode includes:

[0028] Perform RAID configuration on the server to be configured based on the RAID configuration mode, the storage information, and the target RAID configuration template.

[0029] In a second aspect, the present application discloses a RAID configuration device, comprising:

[0030] The storage information acquisition module is used to obtain the current storage information of the server to be configured;

[0031] A configuration template acquisition module, configured to acquire a target RAID configuration template; wherein the target RAID configuration template is a template obtained by the user configuring the initial RAID configuration template;

[0032] a configuration mode determination module, configured to determine a RAID configuration mode of the server to be configured based on the storage information and the target RAID configuration template; wherein the RAID configuration mode is out-of-band configuration or in-band configuration;

[0033] The RAID configuration module is used to perform RAID configuration on the server to be configured based on the RAID configuration mode.

[0034] In a third aspect, the present application discloses an electronic device, including a memory and a processor, wherein:

[0035] The memory is used to store computer programs;

[0036] The processor is configured to execute the computer program to implement the aforementioned RAID configuration method.

[0037] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program, wherein the computer program implements the aforementioned RAID configuration method when executed by a processor.

[0038] It can be seen that the embodiment of the present application first obtains the current storage information of the server to be configured, and obtains the target RAID configuration template, the target RAID configuration template is the template obtained after the user configures the initial RAID configuration template, and then determines the RAID configuration mode of the server to be configured based on the storage information and the target RAID configuration template, the RAID configuration mode is an out-of-band configuration or an in-band configuration, and finally performs RAID configuration on the server to be configured based on the RAID configuration mode. That is, the embodiment of the present application obtains the storage information of the server and the RAID configuration template configured by the user, determines the RAID configuration mode of the server to be configured from the out-of-band configuration and the in-band configuration based on the storage information of the server and the RAID configuration template configured by the user, and then performs RAID configuration on the server to be configured. In this way, under the premise of meeting the configuration requirements, the optimal RAID configuration mode can be automatically selected, thereby ensuring stable and rapid RAID configuration. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without any creative work.

[0040] Figure 1 A flowchart of a RAID configuration method disclosed in this application;

[0041] Figure 2 A schematic diagram of a RAID configuration disclosed in this application;

[0042] Figure 3 A flowchart of a specific RAID configuration method disclosed in this application;

[0043] Figure 4 A flowchart of a specific RAID configuration method disclosed in this application;

[0044] Figure 5 This is a structural diagram of a RAID configuration device disclosed in this application;

[0045] Figure 6 This is a schematic diagram of the principle structure of an electronic device disclosed in this application. DETAILED DESCRIPTION

[0046] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0047] Currently, common batch RAID configuration methods include in-band RAID configuration via LiveCD scripts and out-of-band RAID configuration via the BMC interface. Each mode has its own advantages and disadvantages, and the challenge of selecting the optimal RAID configuration mode and ensuring stable and fast RAID configuration remains unresolved. To address this, this application provides a RAID configuration solution that automatically selects the optimal RAID configuration mode while meeting configuration requirements, ensuring stable and fast RAID configuration.

[0048] See also Figure 1 As shown, the embodiment of the present application discloses a RAID configuration method, including:

[0049] Step S11: Acquire the current storage information of the server to be configured.

[0050] In a specific implementation, the current storage information of the server can be quickly obtained through the out-of-band interface, including: RAID card number, RAID card model, physical disk type, physical disk number, physical disk status and other information.

[0051] It should be noted that, because it is impossible to obtain RAID information in batches in-band, the embodiment of the present application obtains the current storage information of the server to be configured through the out-of-band BMC interface.

[0052] Step S12: Obtain a target RAID configuration template; wherein the target RAID configuration template is a template obtained after the user configures the initial RAID configuration template.

[0053] That is, the embodiments of the present application can provide users with an initial RAID configuration template so that users can configure parameters for the RAID to be configured. The provided initial RAID configuration template can best meet user needs. The template parameters include whether to clear the original RAID configuration, the parameters for the new RAID configuration: RAID level, the required number of physical disks, the required percentage of physical disk capacity, read / write policy, etc., and whether global hot spare and local hot spare are required. Among them, whether to clear the original RAID configuration, selecting JBOD mode for the RAID level, and hot spare disk parameters can only be completed in-band, and users configure the parameters according to their needs.

[0054] Step S13: determining a RAID configuration mode of the server to be configured based on the storage information and the target RAID configuration template; wherein the RAID configuration mode is out-of-band configuration or in-band configuration.

[0055] In a specific implementation, step S13 may specifically include the following steps:

[0056] Step 00: Obtain the model information of the server to be configured.

[0057] Step 01: Determine whether the server to be configured supports in-band configuration and out-of-band configuration based on the model information.

[0058] In a specific implementation, it is possible to determine whether the server model supports out-of-band interface RAID configuration operations based on the model information, including whether it supports the RAID card type corresponding to the RAID card to be configured in the template, the RAID level, and whether it supports in-band ISO mounting operations.

[0059] Step 02: If the server to be configured does not support in-band configuration and does not support out-of-band configuration, a prompt message indicating that RAID configuration cannot be performed is generated.

[0060] Step 03: If the server to be configured only supports in-band configuration, the RAID configuration mode is determined to be in-band configuration.

[0061] Step 04: If the server to be configured only supports out-of-band configuration, or supports both in-band configuration and out-of-band configuration, a RAID configuration mode of the server to be configured is determined based on the storage information and the target RAID configuration template.

[0062] In a specific embodiment, it is possible to determine whether the target RAID configuration template contains parameters that can only be configured in-band; if it contains parameters that can only be configured in-band, and the server to be configured only supports out-of-band configuration, a prompt message indicating that RAID configuration cannot be performed is generated; if it contains parameters that can only be configured in-band, and the server to be configured supports both in-band configuration and out-of-band configuration, the RAID configuration mode is determined to be in-band configuration; if it does not contain parameters that can only be configured in-band, the storage information and the target RAID configuration template are compared to determine whether the out-of-band configuration condition is met; if the out-of-band configuration condition is met, the RAID configuration mode is determined to be out-of-band configuration; if the out-of-band configuration condition is not met, and the server to be configured supports both in-band configuration and out-of-band configuration, the RAID configuration mode is determined to be in-band configuration. If the out-of-band configuration condition is not met, and the server to be configured only supports out-of-band configuration, a prompt message indicating that RAID configuration cannot be performed is generated,

[0063] Furthermore, the storage information and the target RAID configuration template can be compared; if the storage information includes relevant information of the RAID card to be configured in the target RAID configuration template and the number of physical disks in the storage information is greater than or equal to the number of physical disks required in the target RAID configuration template, then it is determined that the out-of-band configuration condition is met; otherwise, it is determined that the out-of-band configuration condition is not met. Of course, in other embodiments, the number of available physical disks can be determined based on the disk status information and the number of physical disks in the storage information; if the number of available physical disks is greater than or equal to the number of physical disks required in the target RAID configuration template, then it is determined that the out-of-band configuration condition is met; otherwise, it is determined that the out-of-band configuration condition is not met.

[0064] It is understandable that the embodiment of the present application can check the parameter information of the target RAID configuration template to determine whether the target RAID configuration template contains parameters that can only be implemented by in-band operations, such as clearing the original RAID configuration, selecting JBOD for the RAID level, performing global hot standby or local hot standby, etc. When these operations that cannot be supported out-of-band appear in the target RAID configuration template, the in-band mode is automatically selected. Since the server storage information obtained is obtained out-of-band, if the information obtained is incomplete during the server power-on and power-off process or in certain circumstances, and the user manually adds information such as the RAID card in the template, the corresponding information cannot be found through the out-of-band configuration, resulting in configuration failure. Therefore, the present application compares the template information and the server storage information. If the comparison condition is met and the server storage information contains the RAID card to be configured and sufficient physical disks, the out-of-band mode is selected, otherwise the in-band mode is selected.

[0065] Step S14: performing RAID configuration on the server to be configured based on the RAID configuration mode.

[0066] In a specific implementation, RAID configuration is performed on the server to be configured based on the RAID configuration mode, the storage information, and the target RAID configuration template.

[0067] Furthermore, based on the determined RAID configuration mode, the configuration parameters of the target RAID configuration template are converted and executed. If the RAID configuration mode is out-of-band, the controllerId (i.e., controller identifier) ​​of the RAID card corresponding to the server and the deviceId (i.e., device identifier) ​​or IndexId (i.e., index identifier) ​​of the physical disk are obtained, and the out-of-band RAID configuration of the corresponding server is performed in combination with the out-of-band RAID interface of the model. If the RAID configuration mode is in-band, a LiveCD is mounted on the server, and based on the serial number of the RAID card, the in-band RAID card is found and the physical disk is selected for RAID configuration.

[0068] For example, as shown in Figure 2, an embodiment of the present application discloses a RAID configuration diagram. First, the current storage information of the server is quickly obtained out-of-band, including the number of RAID cards, RAID card model, physical disk type, number of physical disks, physical disk status and other information; a RAID configuration template is provided externally, including whether to clear the original RAID configuration, the parameters of the new RAID configuration (RAID level, required number of physical disks, required capacity percentage of physical disks, read-write strategy, etc.), and whether global hot standby and local hot standby are required, and then the user selects the configuration parameters. The server's storage information and the RAID configuration template content are obtained, and combined with the storage information and template content, it is automatically determined whether to select in-band or out-of-band mode when the template is executed. Because out-of-band functions can be completed in-band, but some in-band functions cannot be supported out-of-band, but on the other hand, in-band execution requires operations such as mounting a LiveCD and restarting the server, which takes a long time and the process is complicated, while out-of-band is relatively faster. Therefore, automatic selection is made based on the user's needs for RAID configuration. Based on the selected configuration mode and template content, the template parameters are converted accordingly to complete the RAID configuration. This allows the solution provided by this application to dynamically and automatically select in-band or out-of-band mode when configuring server RAID, enabling RAID configurations with different parameters for different servers. Furthermore, during batch configuration, configuration requirements can be met while enabling stable and rapid RAID configuration.

[0069] It can be seen that the embodiment of the present application first obtains the current storage information of the server to be configured, and obtains the target RAID configuration template, the target RAID configuration template is the template obtained after the user configures the initial RAID configuration template, and then determines the RAID configuration mode of the server to be configured based on the storage information and the target RAID configuration template, the RAID configuration mode is an out-of-band configuration or an in-band configuration, and finally performs RAID configuration on the server to be configured based on the RAID configuration mode. That is, the embodiment of the present application obtains the storage information of the server and the RAID configuration template configured by the user, determines the RAID configuration mode of the server to be configured from the out-of-band configuration and the in-band configuration based on the storage information of the server and the RAID configuration template configured by the user, and then performs RAID configuration on the server to be configured. In this way, under the premise of meeting the configuration requirements, the optimal RAID configuration mode can be automatically selected, thereby ensuring stable and rapid RAID configuration.

[0070] For example, see Figure 3 As shown, the embodiment of the present application discloses a specific RAID configuration method, including:

[0071] Step S201: Acquire the current storage information of the server to be configured.

[0072] Step S202: Obtain a target RAID configuration template; wherein the target RAID configuration template is a template obtained after the user configures the initial RAID configuration template.

[0073] For the specific contents of the above-mentioned step S201 and step S202, reference may be made to the contents disclosed in the above-mentioned embodiment, which will not be described in detail here.

[0074] Step S203: Determine whether there is currently an in-band operation task for the server to be configured.

[0075] Step S204: If the in-band operation task exists, the RAID configuration mode is determined to be in-band configuration.

[0076] It should be noted that for a server, there may be multiple tasks including RAID configuration. For example, if a RAID configuration task and an operating system installation task are configured through server management software, the RAID configuration mode is determined to be in-band configuration.

[0077] That is, the RAID configuration can be used in conjunction with the process of installing the operating system. If there is an operating system installation or other in-band operation, the RAID configuration mode can be determined as in-band configuration.

[0078] Step S205: If the in-band operation task does not exist, then obtain the model information of the server to be configured.

[0079] Step S206: determining whether the server to be configured supports in-band configuration and out-of-band configuration based on the model information.

[0080] Step S207: If the server to be configured only supports in-band configuration, the RAID configuration mode is determined to be in-band configuration.

[0081] Step S208: If the server to be configured only supports out-of-band configuration, or supports both in-band configuration and out-of-band configuration, then a RAID configuration mode of the server to be configured is determined based on the storage information and the target RAID configuration template.

[0082] Step S209: Determine the RAID configuration mode of the server to be configured based on the storage information and the target RAID configuration template; wherein the RAID configuration mode is out-of-band configuration or in-band configuration.

[0083] Step S210: performing RAID configuration on the server to be configured based on the RAID configuration mode.

[0084] The specific implementation of the above steps S205 to S210 can refer to the contents disclosed in the above embodiments, and will not be repeated here.

[0085] For example, see Figure 4 As shown, Figure 4 A flowchart of a specific RAID configuration method disclosed in an embodiment of the present application. The current storage information of the server is quickly obtained out-of-band; a RAID configuration template is provided externally, and the user configures the parameters according to the needs; based on the storage information of the server and the content of the RAID configuration template, the following steps a, b, c, and d are used to automatically determine whether to select in-band or out-of-band mode, thereby completing the RAID configuration; wherein the out-of-band mode has higher requirements. a. RAID configuration can be used in conjunction with the installation of the operating system. If there is an operating system installation or other in-band operation, in order to avoid repeated mounting of LiveCD and server power on and off operations, the in-band mode is also selected by default during RAID configuration. b. Determine whether the model executing the template supports out-of-band interface RAID configuration operations (including whether it supports this type of RAID card and RAID level), and determine whether it supports in-band ISO mounting operations. If both operations are supported, proceed to steps c and d. If neither is supported, a prompt will appear indicating that RAID configuration cannot be automatically performed, and the RAID configuration template execution will terminate. If only in-band operation is supported, in-band mode will be selected by default. If only out-of-band operation is supported, proceed to steps c and d. If both c and d are met, out-of-band mode will be selected; otherwise, a prompt indicating that configuration cannot be performed will terminate the template execution. c. Check the template parameter information to see if it contains parameters that can only be implemented with in-band operation. If so, select in-band mode. If such parameters are not selected, proceed to step d. d. Compare the template information with the server storage information. If the comparison condition is met and the server storage information contains the RAID card to be configured and the required physical disks, select out-of-band mode; otherwise, select in-band mode. Finally, based on the automatically selected configuration mode, the template configuration parameters are converted accordingly, and the template execution will proceed. This system can automatically select in-band or out-of-band mode for RAID configuration on batches of servers, achieving both the fast speed of out-of-band RAID configuration and the stable and more comprehensive features of in-band RAID configuration. When configuring server RAID in batches, it is possible to determine the machines that need to be configured individually and configure them dynamically to give full play to the advantages of the two modes.

[0086] As can be seen, in the embodiment of the present application, when determining the RAID configuration mode for the server to be configured, it is determined whether there is an in-band operation task for the server to be configured. If an in-band operation task exists, the RAID configuration mode is determined to be in-band configuration. This can avoid repeated LiveCD mounting and server power on and off operations, thereby improving the server's task processing speed and ensuring server stability.

[0087] See also Figure 5 As shown, the embodiment of the present application discloses a RAID configuration device, including:

[0088] The storage information acquisition module 11 is used to obtain the current storage information of the server to be configured;

[0089] The configuration template acquisition module 12 is used to acquire a target RAID configuration template; wherein the target RAID configuration template is a template obtained after the user configures the initial RAID configuration template;

[0090] A configuration mode determination module 13 is configured to determine a RAID configuration mode of the server to be configured based on the storage information and the target RAID configuration template; wherein the RAID configuration mode is out-of-band configuration or in-band configuration;

[0091] The RAID configuration module 14 is configured to perform RAID configuration on the server to be configured based on the RAID configuration mode.

[0092] It can be seen that the embodiment of the present application first obtains the current storage information of the server to be configured, and obtains the target RAID configuration template, the target RAID configuration template is the template obtained after the user configures the initial RAID configuration template, and then determines the RAID configuration mode of the server to be configured based on the storage information and the target RAID configuration template, the RAID configuration mode is an out-of-band configuration or an in-band configuration, and finally performs RAID configuration on the server to be configured based on the RAID configuration mode. That is, the embodiment of the present application obtains the storage information of the server and the RAID configuration template configured by the user, determines the RAID configuration mode of the server to be configured from the out-of-band configuration and the in-band configuration based on the storage information of the server and the RAID configuration template configured by the user, and then performs RAID configuration on the server to be configured. In this way, under the premise of meeting the configuration requirements, the optimal RAID configuration mode can be automatically selected, thereby ensuring stable and rapid RAID configuration.

[0093] The configuration mode determination module 13 includes:

[0094] A model information acquisition submodule, configured to acquire the model information of the server to be configured;

[0095] A support mode determination submodule, configured to determine whether the server to be configured supports in-band configuration and out-of-band configuration based on the model information;

[0096] The configuration mode determination submodule is configured to determine the RAID configuration mode as in-band configuration if the support mode judgment submodule determines that the server to be configured only supports in-band configuration; and to determine the RAID configuration mode of the server to be configured based on the storage information and the target RAID configuration template if the support mode judgment submodule determines that the server to be configured only supports out-of-band configuration, or supports both in-band configuration and out-of-band configuration.

[0097] Furthermore, the configuration mode determines the submodule, specifically including:

[0098] a parameter determination unit, configured to determine whether the target RAID configuration template contains parameters that can only be configured in-band;

[0099] The configuration mode determining unit is configured to generate a prompt message indicating that RAID configuration cannot be performed if the parameter judgment unit determines that the parameters are included and can only be configured in-band, and the server to be configured only supports out-of-band configuration; determine the RAID configuration mode as in-band configuration if the parameter judgment unit determines that the parameters are included and can only be configured in-band, and the server to be configured supports both in-band and out-of-band configurations; compare the stored information with the target RAID configuration template to determine whether an out-of-band configuration condition is met if the parameter judgment unit determines that the parameters are not included and can only be configured in-band; if the out-of-band configuration condition is met, determine the RAID configuration mode as out-of-band configuration; if the out-of-band configuration condition is met, determine the RAID configuration mode as out-of-band configuration; if the out-of-band configuration condition is not met and the server to be configured supports both in-band and out-of-band configurations, determine the RAID configuration mode as in-band configuration.

[0100] Furthermore, the configuration mode determination unit is specifically used to compare the storage information and the target RAID configuration template; if the storage information includes relevant information of the RAID card to be configured in the target RAID configuration template and the number of physical disks in the storage information is greater than or equal to the number of physical disks required in the target RAID configuration template, it is determined that the out-of-band configuration condition is met, otherwise it is determined that the out-of-band configuration condition is not met.

[0101] Furthermore, the configuration mode determination module 13 further includes:

[0102] an in-band operation task determination submodule, configured to determine whether there is currently an in-band operation task for the server to be configured before obtaining the model information of the server to be configured;

[0103] Correspondingly, the configuration mode determination submodule is configured to determine the RAID configuration mode as in-band configuration if the configuration mode determination module 13 determines that the in-band operation task exists.

[0104] Furthermore, the device further comprises:

[0105] The prompt information generating module is used to generate a prompt information indicating that RAID configuration cannot be performed if the server to be configured does not support in-band configuration and does not support out-of-band configuration after determining whether the server to be configured supports in-band configuration and out-of-band configuration based on the model information.

[0106] Furthermore, the RAID configuration module 14 is specifically configured to perform RAID configuration on the server to be configured based on the RAID configuration mode, the storage information and the target RAID configuration template.

[0107] See also Figure 6 As shown, an embodiment of the present application discloses an electronic device, including a processor 21 and a memory 22; wherein the memory 22 is used to store a computer program; and the processor 21 is used to execute the computer program to implement the following steps:

[0108] Obtain current storage information of the server to be configured; obtain a target RAID configuration template; wherein the target RAID configuration template is a template obtained by a user configuring an initial RAID configuration template; determine a RAID configuration mode of the server to be configured based on the storage information and the target RAID configuration template; wherein the RAID configuration mode is out-of-band configuration or in-band configuration; and perform RAID configuration on the server to be configured based on the RAID configuration mode.

[0109] It can be seen that the embodiment of the present application first obtains the current storage information of the server to be configured, and obtains the target RAID configuration template, the target RAID configuration template is the template obtained after the user configures the initial RAID configuration template, and then determines the RAID configuration mode of the server to be configured based on the storage information and the target RAID configuration template, the RAID configuration mode is an out-of-band configuration or an in-band configuration, and finally performs RAID configuration on the server to be configured based on the RAID configuration mode. That is, the embodiment of the present application obtains the storage information of the server and the RAID configuration template configured by the user, determines the RAID configuration mode of the server to be configured from the out-of-band configuration and the in-band configuration based on the storage information of the server and the RAID configuration template configured by the user, and then performs RAID configuration on the server to be configured. In this way, under the premise of meeting the configuration requirements, the optimal RAID configuration mode can be automatically selected, thereby ensuring stable and rapid RAID configuration.

[0110] In this embodiment, when the processor 21 executes the computer subroutine stored in the memory 22, the following steps can be specifically implemented: obtaining the model information of the server to be configured; judging whether the server to be configured supports in-band configuration and out-of-band configuration based on the model information; if the server to be configured only supports in-band configuration, determining the RAID configuration mode as in-band configuration; if the server to be configured only supports out-of-band configuration, or supports in-band configuration and out-of-band configuration, determining the RAID configuration mode of the server to be configured based on the stored information and the target RAID configuration template.

[0111] In this embodiment, when the processor 21 executes the computer subroutine stored in the memory 22, the following steps can be specifically implemented: determining whether the target RAID configuration template contains parameters that can only be configured in-band; if it contains parameters that can only be configured in-band and the server to be configured only supports out-of-band configuration, generating a prompt message that RAID configuration cannot be performed; if it contains parameters that can only be configured in-band and the server to be configured supports in-band configuration and out-of-band configuration, determining the RAID configuration mode as in-band configuration; if it does not contain parameters that can only be configured in-band, comparing the stored information and the target RAID configuration template to determine whether the out-of-band configuration condition is met; if the out-of-band configuration condition is met, determining the RAID configuration mode as out-of-band configuration; if the out-of-band configuration condition is met, determining the RAID configuration mode as out-of-band configuration; if the out-of-band configuration condition is not met and the server to be configured supports in-band configuration and out-of-band configuration, determining the RAID configuration mode as in-band configuration.

[0112] In this embodiment, when the processor 21 executes the computer subroutine stored in the memory 22, it can specifically implement the following steps: compare the stored information and the target RAID configuration template; if the stored information includes relevant information of the RAID card to be configured in the target RAID configuration template and the number of physical disks in the stored information is greater than or equal to the number of physical disks required in the target RAID configuration template, it is determined that the out-of-band configuration condition is met, otherwise it is determined that the out-of-band configuration condition is not met.

[0113] In this embodiment, when the processor 21 executes the computer subroutine stored in the memory 22, the following steps can be specifically implemented: before obtaining the model information of the server to be configured, it is determined whether there is currently an in-band operation task for the server to be configured; if the in-band operation task exists, the RAID configuration mode is determined to be in-band configuration.

[0114] In this embodiment, when the processor 21 executes the computer subroutine stored in the memory 22, the following steps can be specifically implemented: after determining whether the server to be configured supports in-band configuration and out-of-band configuration based on the model information, if the server to be configured does not support in-band configuration and does not support out-of-band configuration, a prompt message indicating that RAID configuration cannot be performed is generated.

[0115] In this embodiment, when the processor 21 executes the computer subroutine stored in the memory 22, the following steps may be specifically implemented: performing RAID configuration on the server to be configured based on the RAID configuration mode, the storage information, and the target RAID configuration template.

[0116] Furthermore, an embodiment of the present application discloses a computer-readable storage medium for storing a computer program, wherein when the computer program is executed by a processor, the following steps are implemented:

[0117] Obtain current storage information of the server to be configured; obtain a target RAID configuration template; wherein the target RAID configuration template is a template obtained by a user configuring an initial RAID configuration template; determine a RAID configuration mode of the server to be configured based on the storage information and the target RAID configuration template; wherein the RAID configuration mode is out-of-band configuration or in-band configuration; and perform RAID configuration on the server to be configured based on the RAID configuration mode.

[0118] It can be seen that the embodiment of the present application first obtains the current storage information of the server to be configured, and obtains the target RAID configuration template, the target RAID configuration template is the template obtained after the user configures the initial RAID configuration template, and then determines the RAID configuration mode of the server to be configured based on the storage information and the target RAID configuration template, the RAID configuration mode is an out-of-band configuration or an in-band configuration, and finally performs RAID configuration on the server to be configured based on the RAID configuration mode. That is, the embodiment of the present application obtains the storage information of the server and the RAID configuration template configured by the user, determines the RAID configuration mode of the server to be configured from the out-of-band configuration and the in-band configuration based on the storage information of the server and the RAID configuration template configured by the user, and then performs RAID configuration on the server to be configured. In this way, under the premise of meeting the configuration requirements, the optimal RAID configuration mode can be automatically selected, thereby ensuring stable and rapid RAID configuration.

[0119] In this embodiment, when the computer subroutine stored in the computer-readable storage medium is executed by the processor, the following steps can be specifically implemented: obtaining the model information of the server to be configured; judging whether the server to be configured supports in-band configuration and out-of-band configuration based on the model information; if the server to be configured only supports in-band configuration, determining the RAID configuration mode as in-band configuration; if the server to be configured only supports out-of-band configuration, or supports in-band configuration and out-of-band configuration, determining the RAID configuration mode of the server to be configured based on the storage information and the target RAID configuration template.

[0120] In this embodiment, when the computer subroutine stored in the computer-readable storage medium is executed by the processor, the following steps can be specifically implemented: determining whether the target RAID configuration template contains parameters that can only be configured in-band; if it contains parameters that can only be configured in-band and the server to be configured only supports out-of-band configuration, generating a prompt message that RAID configuration cannot be performed; if it contains parameters that can only be configured in-band and the server to be configured supports in-band configuration and out-of-band configuration, determining the RAID configuration mode as in-band configuration; if it does not contain parameters that can only be configured in-band, comparing the stored information and the target RAID configuration template to determine whether the out-of-band configuration condition is met; if the out-of-band configuration condition is met, determining the RAID configuration mode as out-of-band configuration; if the out-of-band configuration condition is met, determining the RAID configuration mode as out-of-band configuration; if the out-of-band configuration condition is not met and the server to be configured supports in-band configuration and out-of-band configuration, determining the RAID configuration mode as in-band configuration.

[0121] In this embodiment, when the computer subroutine stored in the computer-readable storage medium is executed by the processor, the following steps can be specifically implemented: comparing the storage information and the target RAID configuration template; if the storage information includes relevant information of the RAID card to be configured in the target RAID configuration template and the number of physical disks in the storage information is greater than or equal to the number of physical disks required in the target RAID configuration template, it is determined that the out-of-band configuration condition is met; otherwise, it is determined that the out-of-band configuration condition is not met.

[0122] In this embodiment, when the computer subroutine stored in the computer-readable storage medium is executed by the processor, the following steps can be specifically implemented: before obtaining the model information of the server to be configured, determine whether there is currently an in-band operation task for the server to be configured; if the in-band operation task exists, determine the RAID configuration mode as in-band configuration.

[0123] In this embodiment, when the computer subroutine stored in the computer-readable storage medium is executed by the processor, the following steps can be specifically implemented: after determining whether the server to be configured supports in-band configuration and out-of-band configuration based on the model information, if the server to be configured does not support in-band configuration and does not support out-of-band configuration, a prompt message indicating that RAID configuration cannot be performed is generated.

[0124] In this embodiment, when the computer subroutine stored in the computer-readable storage medium is executed by the processor, the following steps may be specifically implemented: performing RAID configuration on the server to be configured based on the RAID configuration mode, the storage information, and the target RAID configuration template.

[0125] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from the other embodiments. Reference can be made to the descriptions of the identical or similar parts between the various embodiments. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple, and the relevant parts can be referred to the descriptions of the methods.

[0126] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0127] The above describes in detail a RAID configuration method, apparatus, device, and medium provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is intended only to help understand the method and core concept of the present application. At the same time, those skilled in the art may vary in the specific implementation methods and application scope based on the concept of the present application. In summary, the contents of this specification should not be construed as limiting the present application.

Claims

1. A RAID configuration method, characterized in that: include: Get the current storage information of the server to be configured; Obtaining a target RAID configuration template; wherein the target RAID configuration template is a template obtained by the user configuring the initial RAID configuration template; Obtaining the model information of the server to be configured; Determining whether the server to be configured supports in-band configuration and out-of-band configuration based on the model information; If the server to be configured only supports in-band configuration, determining the RAID configuration mode as in-band configuration; If the server to be configured supports only out-of-band configuration, or supports both in-band configuration and out-of-band configuration, determining whether the target RAID configuration template includes parameters that can only be configured in-band; If the parameters are only configurable in-band and the server to be configured only supports out-of-band configuration, a prompt message indicating that RAID configuration cannot be performed is generated; if the parameters are only configurable in-band and the server to be configured supports both in-band and out-of-band configuration, the RAID configuration mode is determined to be in-band configuration; If the parameters that can only be configured in-band are not included, comparing the storage information with the target RAID configuration template to determine whether an out-of-band configuration condition is met; if the out-of-band configuration condition is met, determining the RAID configuration mode as out-of-band configuration; if the out-of-band configuration condition is not met and the server to be configured supports both in-band configuration and out-of-band configuration, determining the RAID configuration mode as in-band configuration; Perform RAID configuration on the server to be configured based on the RAID configuration mode.

2. The RAID configuration method according to claim 1, wherein: The comparing the storage information with the target RAID configuration template to determine whether an out-of-band configuration condition is met includes: comparing the storage information with the target RAID configuration template; If the storage information includes relevant information of the RAID card to be configured in the target RAID configuration template and the number of physical disks in the storage information is greater than or equal to the number of physical disks required in the target RAID configuration template, it is determined that the out-of-band configuration condition is met; otherwise, it is determined that the out-of-band configuration condition is not met.

3. The RAID configuration method according to claim 1, wherein: Before obtaining the model information of the server to be configured, the method further includes: Determine whether there is currently an in-band operation task for the server to be configured; If the in-band operation task exists, determining the RAID configuration mode as in-band configuration; If the in-band operation task does not exist, then obtain the model information of the server to be configured.

4. The RAID configuration method according to claim 1, wherein: After determining whether the server to be configured supports in-band configuration and out-of-band configuration based on the model information, the method further includes: If the server to be configured does not support in-band configuration and does not support out-of-band configuration, a prompt message indicating that RAID configuration cannot be performed is generated.

5. The RAID configuration method according to any one of claims 1 to 4, wherein: The performing RAID configuration on the server to be configured based on the RAID configuration mode includes: Perform RAID configuration on the server to be configured based on the RAID configuration mode, the storage information, and the target RAID configuration template.

6. A RAID configuration device, characterized in that: include: The storage information acquisition module is used to obtain the current storage information of the server to be configured; A configuration template acquisition module, configured to acquire a target RAID configuration template; wherein the target RAID configuration template is a template obtained by the user configuring the initial RAID configuration template; a configuration mode determination module, configured to determine a RAID configuration mode of the server to be configured based on the storage information and the target RAID configuration template; wherein the RAID configuration mode is out-of-band configuration or in-band configuration; A RAID configuration module, configured to perform RAID configuration on the server to be configured based on the RAID configuration mode; The configuration mode determination module is specifically used to: Obtaining the model information of the server to be configured; Determining whether the server to be configured supports in-band configuration and out-of-band configuration based on the model information; If the server to be configured only supports in-band configuration, determining the RAID configuration mode as in-band configuration; If the server to be configured supports only out-of-band configuration, or supports both in-band configuration and out-of-band configuration, determining whether the target RAID configuration template includes parameters that can only be configured in-band; If the parameters are only configurable in-band and the server to be configured only supports out-of-band configuration, a prompt message indicating that RAID configuration cannot be performed is generated; if the parameters are only configurable in-band and the server to be configured supports both in-band and out-of-band configuration, the RAID configuration mode is determined to be in-band configuration; If it does not contain parameters that can only be configured in-band, compare the storage information and the target RAID configuration template to determine whether the out-of-band configuration conditions are met; if the out-of-band configuration conditions are met, determine the RAID configuration mode as out-of-band configuration; if the out-of-band configuration conditions are not met and the server to be configured supports both in-band configuration and out-of-band configuration, determine the RAID configuration mode as in-band configuration.

7. An electronic device, characterized in that: comprising a memory and a processor, wherein: The memory is used to store computer programs; The processor is configured to execute the computer program to implement the RAID configuration method according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that Used to store a computer program, wherein when the computer program is executed by a processor, the RAID configuration method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • RAID system and method of network based on dynamic mode

    CN1952867A