Disk array configuration method and device, computer equipment and storage medium
By receiving the corresponding relationship between packet creation instructions and pre-stored, the packet configuration information is automatically determined and sent to the bare metal server, which solves the problems of insufficient flexibility and high operational complexity of the bare metal server disk array configuration in cloud computing, and achieves high efficiency, Automated RAID configuration.
Patent Information
- Application Number
- CN202411667498.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-21
- Publication Date
- 2025-02-18
AI Technical Summary
In cloud computing, the disk array configuration of bare metal servers has problems such as insufficient flexibility and high operational complexity. Especially in the case of multiple RAID cards or large number of disks, it is difficult to meet the specified RAID requirements, and it is necessary to manually split the disk and increase the number of disks. workload and complexity.
A disk array configuration method is provided. By receiving packet creation instructions, the packet configuration information is determined based on the corresponding relationship between packet demand information and pre-stored, and sent it to a bare metal server to perform RAID configuration operations, realizing an automated configuration process.
This method greatly improves the flexibility of disk array configuration, reduces the workload and error risks of manual operations, ensures accurate configuration of RAID in complex disk environments, and improves system stability and reliability.
Smart Images

Figure CN119473703A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of cloud computing technology, and in particular to a disk array configuration method, device, computer equipment and storage medium. Background Art
[0002] In cloud computing, bare metal servers are provided in two ways. One is to preset the disk array (Redundant Arrays of Independent Disks, RAID), which is set up when it is put on the shelf and needs to be changed manually later; the other is not to preset the RAID, which can be set up when it is activated, but only one can be selected. When there are multiple RAID cards or more than 30 disks on a RAID card, the specified RAID requirements may not be met. The disks must be manually split after creation to meet the business. Server users need to set the RAID and level through the out-of-band baseboard management controller (Baseboard Management Controller, BMC) or use the corresponding RAID card tool in the system.
[0003] The above preset RAID mode is not flexible enough, and the subsequent modification of disk RAID requires manual operation, which is cumbersome to implement. The above non-preset RAID mode may not meet the needs of designated RAID when storing multiple RAID cards or a large number of disks on a RAID card (more than 30), and the disks must be manually split for processing, which increases the complexity and workload of the operation. Summary of the invention
[0004] Based on this, it is necessary to provide a disk array configuration method, device, computer equipment and storage medium that can flexibly and personalizedly implement RAID configuration in response to the above technical problems.
[0005] The present application provides a disk array configuration method, which is applied to a computer device running a bare metal service, including:
[0006] Receive a group creation instruction, the group creation instruction includes: group requirement information, the group requirement information includes: the number of groups, and the target RAID card identifier and required disk information corresponding to each group;
[0007] Determine the group configuration information according to the group requirement information and the pre-stored correspondence relationship; wherein the correspondence relationship is used to identify the association between each RAID card identifier and the actual disk information in the bare metal server; the group configuration information includes: the target RAID card identifier corresponding to each group, and the actual disk information corresponding to the target RAID card identifier and meeting the required disk information;
[0008] The group configuration information is sent to the bare metal server, where the group configuration information is used to perform a RAID configuration operation on the bare metal server.
[0009] In a second aspect, the present application further provides a disk array configuration device, which is applied to a computer device running a bare metal service, including:
[0010] The instruction receiving module is used to receive a group creation instruction, wherein the group creation instruction includes: group requirement information, wherein the group requirement information includes: the number of groups, and the target RAID card identifier and required disk information corresponding to each group;
[0011] A configuration determination module is used to determine the group configuration information according to the group requirement information and the pre-stored corresponding relationship; wherein the corresponding relationship is used to identify the association between each RAID card identifier and the actual disk information in the bare metal server; the group configuration information includes: the target RAID card identifier corresponding to each group, and the actual disk information corresponding to the target RAID card identifier and meeting the required disk information;
[0012] The configuration sending module is used to send the group configuration information to the bare metal server, and the group configuration information is used to perform a RAID configuration operation on the bare metal server.
[0013] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method described in the first aspect is implemented.
[0014] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method described in the first aspect.
[0015] In a fifth aspect, the present application further provides a computer program product, comprising a computer program, which, when executed by a processor, implements the method described in the first aspect.
[0016] The above-mentioned disk array configuration method, device, computer equipment, storage medium and computer program product, the disk array configuration method, applied to a computer equipment running a bare metal service, comprises: receiving a group creation instruction, the group creation instruction comprises: group requirement information, the group requirement information comprises: the number of groups, and the target RAID card identifier and required disk information corresponding to each group; determining the group configuration information according to the group requirement information and the pre-stored correspondence relationship; wherein the correspondence relationship is used to identify the association between each RAID card identifier and the actual disk information in the bare metal server; the group configuration information comprises: the target RAID card identifier corresponding to each group, and the actual disk information corresponding to the target RAID card identifier and satisfying the required disk information; sending the group configuration information to the bare metal server, the group configuration information is used to perform RAID configuration operations on the bare metal server. The above-mentioned scheme effectively solves the technical problems existing in the disk array configuration of bare metal servers in existing cloud computing, and exhibits the following technical advantages:
[0017] (1) In the traditional preset disk array method, the disk RAID is determined when the bare metal server is put on the shelf, and subsequent modifications require manual operation. This method is extremely inflexible and makes the implementation process cumbersome. However, this solution breaks the limitations of preset RAID by receiving group creation instructions containing the number of groups, target RAID card identifiers, and required disk information, allowing users to flexibly configure the disk array according to actual business needs without being restricted by the initial settings. Whether it is dealing with different types of data storage (such as database data, file storage data, etc.) or adjusting the storage layout according to business development, precise planning can be achieved through instructions to achieve targeted optimization of storage, greatly improving the flexibility of configuration.
[0018] (2) For the traditional method without pre-setting RAID, when encountering the situation of storing multiple RAID cards or a large number of disks on a RAID card (more than 30), it may not be able to meet the specified RAID requirements, and the disks can only be split manually after the creation is completed, which increases the complexity and workload of the operation. This solution uses the correspondence between the RAID card identifier and the actual disk information in the pre-stored bare metal server to determine the group configuration information, effectively avoiding such problems. The use of this pre-stored associated information does not require a complex query and matching process, which not only reduces configuration errors caused by manual search or incorrect matching, but also ensures that in complex disk environments (such as multiple RAID cards and a large number of disks), the target RAID card identifier can be accurately matched with the actual disk that meets the required disk information, so that disk resources are reasonably utilized, eliminating performance bottlenecks caused by unreasonable disk allocation, and reducing operational complexity.
[0019] (3) The step of sending the group configuration information to the bare metal server to perform the RAID configuration operation realizes an automated configuration process. Compared with the traditional method of manually setting RAID and levels through out-of-band BMC or using the corresponding RAID card tool in the system, the workload of manual operation and the risk of errors introduced by manual intervention are greatly reduced. This not only improves the speed of disk array configuration, but also enhances the stability and reliability of the entire system, ensures the efficiency and security of data storage and access, and is of great significance for large-scale data centers or enterprise-level applications with high storage performance requirements. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0021] FIG1 is an application architecture diagram of a bare metal service;
[0022] FIG2 is a flowchart of a disk array configuration method;
[0023] FIG3 is a second flow chart of a disk array configuration method;
[0024] FIG4 is a flowchart diagram of a disk array configuration method;
[0025] FIG5 is a block diagram of a disk array configuration device in one embodiment;
[0026] FIG. 6 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0027] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0028] Bare Metal Server is a cloud computing service infrastructure that provides users with computing resources at the physical server level. Unlike traditional virtual servers, bare metal servers do not rely on the virtualization layer, and users can directly access and use the server's hardware resources, just like using an independent physical server. This gives bare metal servers excellent performance and a high degree of isolation, and is suitable for application scenarios that require high computing performance, data security, and resource isolation, such as database management, enterprise-level applications, and high-performance computing. In bare metal servers, the management and configuration of hardware resources (such as CPU, memory, disk, etc.) are more direct, and users can flexibly adjust them according to their own business needs, and the configuration of its storage system (including disk arrays, etc.) also needs to be precisely designed to meet different data storage and access requirements.
[0029] Bare Metal Service is a series of management and support services provided around Bare Metal Servers. It plays a key role in the cloud computing environment and is responsible for coordinating and managing various resources and operations of Bare Metal Servers. Bare Metal Service covers a number of functions, from hardware information collection and storage to configuration distribution according to user instructions. For example, it can collect RAID card and disk information in Bare Metal Servers, store this information, and build a database of server hardware information. When users make choices about storage configurations such as RAID in the console, Bare Metal Service will accurately send the corresponding configuration information to the Bare Metal Server based on the user's choice, triggering the server to perform operations such as creating and modifying disk arrays. At the same time, Bare Metal Service also ensures the efficiency, accuracy and stability of the entire process, reduces errors and complex operations that may be caused by manual intervention, and enables users to use Bare Metal Servers more conveniently to meet business needs.
[0030] In cloud computing, bare metal servers are usually provided in two ways:
[0031] (1) Preset RAID mode: This is a method in which the cloud service provider sets the disk RAID when the machine is installed. The disk RAID cannot be modified later. If modification is required, manual operation is required.
[0032] (2) No preset RAID mode: Users can set up system disk and data disk RAID when opening, and select as needed. However, only one RAID can be selected in this scenario. If there are multiple RAID cards or more than 30 disks on a RAID card, the specified RAID requirements may not be met. Users need to manually split the number of disks after creation to form multiple RAIDs to meet business needs.
[0033] Server users can set up hard disk RAID in the following two ways: (A) directly through the out-of-band BMC; (B) in the system, according to the RAID card type, use the corresponding RAID card tool (such as MegaCli, storcli64, ssacli, arcconf, etc.) to set up, and at the same time, the corresponding RAID level can be set according to different RAID card types and the number of disks.
[0034] In the embodiment of the present application, the RAID level may include but is not limited to:
[0035] 1) JBOD: JBOD is not a standard RAID level. It is usually a collection of disks without control software coordination. It connects multiple physical disks in series to form a huge logical disk. Generally, a pass-through card is used, and the pass-through card cannot do other RAID.
[0036] 2) RAID0: RAID0 supports any number of disks. RAID0 is a simple data striping technology without data verification, which does not provide redundancy and fault tolerance. It stores data in all disks in a dispersed manner and implements simultaneous read and write operations on multiple disks in an independent access mode.
[0037] 3) RAID1: RAID1 supports 2 disks. This method is called mirroring. Data is written to the working disk and the mirror disk in a completely consistent manner. The response time will be affected when writing data, but it will not be affected when reading data. It provides the best data protection. Once the working disk fails, the system automatically reads data from the mirror disk without affecting the user's work.
[0038] 4) RAID5: RAID5 is supported when the number of disks is greater than 3. This is a storage solution that takes into account storage performance, data security, and storage cost. Data is distributed to each hard disk in blocks. RAID5 does not back up data, but stores data and corresponding parity information on each disk, and the data and parity information are stored on different disks. When the data on a disk is damaged, the remaining data and parity information can be used to restore the data.
[0039] 5) RAID10: RAID10 supports an even number of disks greater than 4. Use multiple disks to build RAID1 first, and then use multiple RAID1s to build RAID0, taking into account both safety and speed. In the case of 4 disks, RAID10 allows two disk failures. As the number of hard disks increases, the fault tolerance also increases accordingly, which is something that RAID5 cannot do.
[0040] The traditional bare metal server provides RAID, which cannot meet the needs of multiple RAID when faced with multiple RAID cards and a large number of data disks. The disk array configuration method provided in the embodiment of the present application can provide a method suitable for multiple RAID scenarios. Users can split and group disks according to their own needs, and perform RAID operations on each group of disks and specify RAID levels, so as to meet the characteristic needs and the use requirements of various business scenarios. In addition, this method can also reduce the large amount of manpower consumed by manual RAID operation and the risk of affecting server disk data due to misoperation.
[0041] The disk array configuration method provided in the embodiment of the present application can be applied to a computer device running a bare metal service, wherein the bare metal service is used to manage one or more bare metal servers.
[0042] For example, Figure 1 is an application architecture diagram of a bare metal service. As shown in Figure 1, the bare metal service is deployed and runs on a computer device 11, which is connected to a console 12 and can receive instructions input in the console. The bare metal service on the computer device 11 can be used to manage bare metal servers A, B, and C.
[0043] In an embodiment of the present application, with respect to the application architecture diagram of the bare metal service shown in FIG1 , the user can select a RAID card according to different specifications in the console 12 , and can also select the number of disks and the RAID level for the same RAID card. The bare metal service is responsible for storing the collected RAID card and actual disk information, and issuing different grouped RAID card configurations (i.e., grouped configuration information) according to the user's selection. After receiving the different grouped RAID card configurations, the bare metal server can perform RAID operations on the RAID card disks separately.
[0044] Exemplarily, Fig. 2 is a flowchart of a disk array configuration method. As shown in Fig. 2, the method may include but is not limited to the following steps:
[0045] 201. Receive a group creation instruction.
[0046] The group creation instruction includes group requirement information, and the group requirement information includes the number of groups, and the target RAID card identifier and required disk information corresponding to each group.
[0047] The target RAID card identifier may include one or more RAID card identifiers. In the embodiment of the present application, the RAID card identifier may specifically be a controller identifier (Controller id) corresponding to the RAID card.
[0048] The required disk information includes at least one of the required disk quantity and the required disk size.
[0049] The group creation instruction in step 201 includes important group requirement information, which is crucial for the subsequent accurate configuration of the disk array.
[0050] The above grouping number specifies how many different groups are needed to configure the disk array. For example, the user may decide to divide the disk array into 3 groups based on different business types or different data characteristics, and use them to store database data, file data, and backup data, respectively. Here, "3" is the number of groups.
[0051] The target RAID card identifier corresponding to each of the above groups specifies the RAID card to be associated with each group. The RAID card is a hardware device used to manage and control disk arrays. Different groups may correspond to different RAID cards so that targeted configurations can be performed based on the performance, functional characteristics, and connected disk conditions of each RAID card. In an embodiment of the present application, the RAID card identifier is specifically the controller identifier (Controllerid) corresponding to the RAID card. This unique identifier can accurately determine the RAID card to be used. For example, group 1 may correspond to a RAID card identified as "Controller001", group 2 may correspond to a RAID card identified as "Controller002", and so on.
[0052] The above required disk information further refines the disk requirements of each group. The required number of disks is the number of disks required for each group. For example, for a group used to store database data, due to the high read and write performance and data redundancy requirements of the database, 8 disks may be required to build a suitable RAID array; while for a group storing general files, only 4 disks may be sufficient. Here, "8 disks" and "4 disks" are the required number of disks for different groups. The required disk size can be based on the required number and the disk capacity requirements. Some businesses may require large-capacity disks to store a large number of data files. For example, a video storage business may require a disk size of at least 2TB in each group; and for some log storage groups, a disk size of 1TB may be sufficient. Here, "2TB" and "1TB" are the required disk sizes for different groups.
[0053] By receiving such detailed and comprehensive group creation instructions, the system can clearly understand the user's specific requirements for disk array configuration in terms of grouping, RAID card association, and disk requirements, thereby laying the foundation for accurately determining the group configuration information and completing the disk array configuration operation.
[0054] The above group creation instruction may further include: a RAID level specified for each group.
[0055] Different RAID levels have different characteristics and can meet diverse business needs. For example, RAID 0 has high read and write performance, but no data redundancy function, which is suitable for scenarios with extremely high read and write speed requirements and not very sensitive to data loss; RAID 1 provides data redundancy through data mirroring to ensure high data reliability, and its read and write performance is slightly worse than RAID 0, which is suitable for storing important data, such as financial data, core business system data, etc.; RAID 5 adds parity information on the basis of data striping, allowing data recovery after a disk is damaged, and achieves a good balance between storage capacity, read and write performance and data redundancy, which can be used for general enterprise-level application data storage; RAID 10 combines the characteristics of RAID 0 and RAID 1, mirroring first and then striping, providing high performance and high reliability, but the cost is relatively high, and it is often used in critical business scenarios with high requirements for data security and read and write speed.
[0056] When the group creation instruction contains the RAID level specified for each group, the system can configure the most appropriate RAID level for each group based on the user's business characteristics and data requirements. For example, for the group storing temporary data, the user may specify RAID 0 to obtain the fastest read and write speed; for the group storing important business system data, it is specified as RAID 10 to ensure data security and high performance. In this way, the system can accurately build a disk array that meets user needs in the subsequent configuration process based on these specified RAID levels, combined with the target RAID card identification and required disk information, etc., to ensure efficient data storage and safe management.
[0057] 202. Determine group configuration information according to group requirement information and pre-stored correspondence.
[0058] The corresponding relationship is used to identify the association between each RAID card identifier and actual disk information in the bare metal server.
[0059] The above group configuration information includes: a target RAID card identifier corresponding to each group, and actual disk information corresponding to the target RAID card identifier and meeting the required disk information.
[0060] The actual disk information includes at least one of the following: a disk cage identifier, a disk slot identifier, and a disk size.
[0061] In the disk array configuration process, the above step 202 accurately determines the specific configuration information of each group based on the previously received group requirement information and the pre-stored correspondence, so as to prepare for the subsequent sending of the configuration information to the bare metal server to perform RAID operations.
[0062] In the embodiment of the present application, the correspondence between each RAID card identifier and the actual disk information in the bare metal server is pre-stored. This correspondence is like a detailed "map" that clearly marks the connection between each RAID card and the specific information of the actual disk associated with it.
[0063] For example, through this correspondence, you can know which disks are connected to the RAID card identified as "Controller001", the disk cage identification (such as "Enclosure01"), disk slot identification (such as "Slot01-Slot08") and disk size (such as 1TB per disk) of these disks, etc. This enables the system to accurately find the actual disk resources corresponding to the target RAID card identification when configuring, ensuring the accuracy and rationality of the configuration.
[0064] After receiving the grouping requirement information (including the number of groups, the target RAID card ID corresponding to each group, the required disk information, etc.) in the grouping creation instruction, the system starts to determine the grouping configuration information based on these requirement information and the pre-stored correspondence. Specifically, it may include:
[0065] (1) Determine the target RAID card ID corresponding to each group. The target RAID card ID to be associated with each group (such as the "Controller001" mentioned above) has been clearly specified in the group requirement information. This information will be directly included in the group configuration information. The specific RAID card that each group relies on for subsequent RAID operations is determined. Different RAID cards may have different performance and functional characteristics, which will affect the configuration method and final effect of the disk array.
[0066] (2) Determine the actual disk information that meets the required disk information. Based on the required disk quantity and required disk size in the grouped required information and the pre-stored corresponding relationship, select the disk information that meets the requirements from the actual disk resources of the bare metal server.
[0067] For example, if the number of disks required for a group is 5 and the required disk size is 2TB, the system will search the disks associated with the target RAID card ID corresponding to the group in the pre-stored correspondence and select 5 actual disks with a size of 2TB. The actual disk information (including disk cage ID, disk slot ID, disk size, etc.) selected will also be included in the group configuration information.
[0068] In some embodiments, the above correspondence includes not only the association between each RAID card identifier and the actual disk information in the bare metal server, but also the RAID tool type stored corresponding to the RAID card identifier. At the same time, in the group configuration information of the disk array configuration, in addition to the target RAID card identifier corresponding to each group and the actual disk information that meets the required disk information, it also includes the RAID level corresponding to each group.
[0069] In the configuration process of the disk array, the RAID level is a crucial factor in achieving accurate configuration of the disk array and meeting the needs of data storage and processing in different subsequent business scenarios. Because different RAID levels have unique characteristics, such as RAID0 has fast read and write speeds but no data redundancy, RAID1 has high data reliability but slightly inferior read and write performance, RAID5 has a good balance between storage capacity, read and write performance and data redundancy, and RAID10 has both high performance and high reliability but high cost. These characteristics determine that there are different focuses and requirements when configuring the disk array. After adding the RAID level corresponding to each group to the group configuration information, the system can combine the RAID level with factors such as the target RAID card identifier and required disk information according to the specific needs of different business scenarios.
[0070] Through the above method, the system can configure the disk array of each group more accurately, thereby achieving efficient data storage and safe management, and can meet diverse business needs, making the configuration of the entire disk array more scientific and reasonable, and providing better services for data storage and processing of different businesses. At the same time, the storage of the RAID tool type corresponding to the RAID card identifier also provides more information support for the configuration and management of the disk array. In subsequent operations, appropriate RAID tools may be used to complete the corresponding configuration and management work according to different RAID cards and RAID levels.
[0071] 203. Send the group configuration information to the bare metal server.
[0072] The group configuration information is used to perform RAID operations on the bare metal server.
[0073] The above step 203 is intended to transfer the grouping configuration information determined in the previous step to the bare metal server, so that the bare metal server can perform subsequent RAID operations based on the information, thereby achieving the expected disk array configuration effect.
[0074] In some embodiments, the composition of the group configuration information includes: the target RAID card identifier corresponding to each group, and the actual disk information that meets the required disk information. Among them, the target RAID card identifier corresponding to each group clarifies the specific RAID card associated with each group in the server. Through the unique identifier (such as the controller identifier (Controllerid) corresponding to the RAID card), the bare metal server can accurately locate the RAID card resources that need to be operated, ensuring that subsequent operations are carried out on the correct hardware device; the actual disk information that meets the required disk information may include the disk cage identifier (Enclosureid), the disk slot identifier (Slotid) and the disk size. This information enables the server to know which specific locations and capacity disks to operate on, ensuring the accuracy of disk resource allocation.
[0075] In some embodiments, the composition of the group configuration information may also include: the corresponding RAID tool type. Different RAID cards may need to use specific RAID tools (such as MegaCli, storcli64, etc.) to perform RAID operations. The group configuration information specifies the RAID tool that matches the target RAID card identifier corresponding to each group, so that the server can call the correct tool during operation and process the disk array according to the corresponding rules and functions.
[0076] It is of great significance to send the group configuration information containing the above detailed content to the bare metal server. On the one hand, the configuration instruction is transmitted. It is equivalent to issuing a detailed configuration instruction to the bare metal server, telling the server how to configure RAID for each group. After receiving this information, the server can carry out the subsequent disk array configuration work in an orderly manner according to the various indicators and requirements, just like construction according to the building blueprint, ensuring that each link can be executed according to the predetermined plan. On the other hand, it ensures the accuracy and standardization of the operation. By accurately transmitting the group configuration information, it avoids the server from making erroneous operations due to unclear or inaccurate information when performing RAID operations. The server can perform corresponding RAID operations on the disks of each group in a standardized manner according to the received target RAID card identification, actual disk information, and corresponding RAID tools, thereby achieving efficient and accurate disk array configuration and meeting users' needs for disk storage and performance.
[0077] In summary, step 203 lays a solid foundation for subsequent servers to perform RAID operations by sending complete and accurate group configuration information to the bare metal server, and is a key link in achieving the smooth progress of the entire disk array configuration process.
[0078] It should be noted that, in the disk array configuration method provided in the embodiment of the present application, before executing the method flow shown in FIG. 2 , it is necessary to first collect data and create the above-mentioned corresponding relationship.
[0079] In some embodiments, before determining the grouping configuration information based on the grouping requirement information and the pre-stored correspondence, the RAID card identifiers in the bare metal server and the actual disk information connected to the RAID card indicated by the RAID card identifiers can be collected first; and the correspondence can be pre-stored.
[0080] For example, FIG3 is a flowchart of a disk array configuration method. The method is applied to a computer device running a bare metal service. As shown in FIG3, the method may include but is not limited to the following steps:
[0081] 301. Get the RAID card model in the bare metal server.
[0082] The bare metal service can obtain the hardware information of the bare metal server by initiating a hardware information collection process for the bare metal server, for example, the above-mentioned RAID card model.
[0083] In the above hardware information collection process, various hardware information of the bare metal server can be fully collected, and the RAID card model is one of the key items to be obtained. For example, specific hardware detection instructions or interaction with the server hardware management interface may be used to accurately obtain the specific model information of the RAID card installed in the server, such as a specific brand and model of RAID card.
[0084] 302. Determine a RAID tool that is compatible with the RAID card model.
[0085] Since different types of RAID cards usually require the use of corresponding specific RAID tools to perform effective management and information collection operations, this step is to find a RAID tool that matches the RAID card model obtained in step 301.
[0086] In some embodiments, there may be a pre-set tool adaptation rule or database, which records the correspondence between different RAID card models and corresponding RAID tools. After the specific RAID card model is obtained in step 301, the adaptation relationship is queried to determine which RAID tool should be used. For example, if the obtained RAID card model is model A of a specific brand, after querying the adaptation relationship, it is known that the MegaCli tool should be used, then it is determined that the RAID tool adapted to the RAID card model is MegaCli.
[0087] 303. Collect, based on the RAID tool, the identifiers of each RAID card in the bare metal server and the actual disk information connected to the RAID card indicated by each RAID card identifier.
[0088] After determining the appropriate RAID tool, you can use the tool to comprehensively collect key information about RAID cards in the bare metal server, including the identification of each RAID card and detailed information about the actual disks connected to these RAID cards. This information is very important for subsequent accurate configuration of the disk array and understanding of the storage resource status of the server.
[0089] After using the RAID tool determined in step 302, data can be collected by executing related commands or functions provided by the tool. For example, if the determined RAID tool is storcli64, then a specific command of storcli64 will be called to obtain the identifiers of each RAID card (such as Controllerid, etc.), and further obtain the actual disk information connected to the RAID card indicated by these RAID card identifiers, and the actual disk information may include the disk cage identifier (Enclosureid), the disk slot identifier (Slotid), and the disk size.
[0090] 304. Pre-store corresponding relationships.
[0091] After completing step 303, after collecting each RAID card identifier in the bare metal server and the actual disk information connected to the RAID card indicated by each RAID card identifier based on the RAID tool, it is necessary to save the corresponding relationship between the collected information.
[0092] Among them, the correspondence between each RAID card identifier and the actual disk information connected to the RAID card indicated by these RAID card identifiers (such as disk cage identifier (Enclosureid), disk slot identifier (Slotid) and disk size, etc.) can be stored in the storage medium of the computer device according to a certain storage format.
[0093] Exemplarily, a common storage format may be in the form of a database table, for example, using a RAID card identifier as a primary key and the corresponding actual disk information as other fields of the record, so that each record is stored in a database table specifically used to store such corresponding relationships.
[0094] In some embodiments, the above correspondence also stores the RAID tool type stored corresponding to the RAID card identifier.
[0095] In the embodiment of the present application, the adapter tool of the RAID card, the Controllerid corresponding to the RAID card, and the Enclosureid, Slotid and disk size of the disk mounted on the RAID card are collected and saved for classification. In this way, when creating a bare metal instance, the user can split the RAID card and the disk under the RAID card according to the classification information. For example, if there are 32 data disks under the RAID card, they can be split into 6 disks for RAID5, 10 disks for RAID10 and the remaining 16 disks for RAID0. In this way, the same bare metal can meet the needs of multiple disk classifications. It can reduce a lot of manual operations and time, and avoid the risks caused by manual errors.
[0096] As an example, FIG4 is a flowchart of a disk array configuration method. The method is implemented through an interactive process between a bare metal service, a user, and a server, wherein the user can participate in the interactive process through a user device and the bare metal service can participate in the interactive process through the computer device on which it is deployed. As shown in FIG4 , the method may include but is not limited to the following steps:
[0097] 401. The user selects a RAID level.
[0098] During the entire disk array configuration process, users first need to determine the appropriate RAID level based on their own business needs. Different RAID levels have their own unique characteristics. For example, RAID0 has fast read and write speeds but no data redundancy, and is suitable for scenarios with extremely high read and write speed requirements and not very sensitive to data loss; RAID1 has high data reliability but slightly inferior read and write performance, and is suitable for storing important data; RAID5 has a good balance between storage capacity, read and write performance, and data redundancy, and can be used for general enterprise-level application data storage; RAID10 has both high performance and high reliability but is expensive, and is often used in critical business scenarios with high requirements for data security and read and write speeds. Based on these characteristics and their own business requirements for data storage, read and write performance, data security, etc., users can select the most suitable RAID level.
[0099] 402. The user selects the RAID card, number of disks, and RAID level, and sends them to the Bare Metal service.
[0100] After the user has determined the required RAID level, he or she needs to further select a matching RAID card and determine the appropriate number of disks. RAID cards are hardware devices used to manage and control disk arrays. Different RAID cards may differ in performance, functional features, and the conditions of the connected disks. Users should select the appropriate RAID card based on business needs and previous understanding of RAID cards. At the same time, determining the number of disks is also critical, because different business scenarios have different requirements for the number of disks. For example, storing database data may require more disks to build a suitable RAID array to meet read and write performance and data redundancy requirements, while storing general files may require relatively fewer disks. Then, the user sends the selected RAID card, the determined number of disks, and the previously selected RAID level to the bare metal service so that the bare metal service can perform subsequent disk grouping and other operations based on this information.
[0101] 403. The Bare Metal service groups disks according to the information sent by the user.
[0102] After receiving the information sent by the user, including the RAID card, the number of disks, and the RAID level, the Bare Metal service will group the disks according to certain rules and logic. This grouping process may take into account a variety of factors, such as different RAID level requirements, the performance characteristics of the RAID card, and the allocation of the number of disks. For example, if the user selects different RAID levels for data storage of different business types, the Bare Metal service may divide the disks used to store database data and select a specific RAID level into one group, and divide the disks used to store file data and select another RAID level into another group, etc. Through this grouping method, it is possible to configure a suitable disk array for each group in the future to meet the data storage and processing requirements in different business scenarios.
[0103] 404. The bare metal service generates a RAID configuration for the grouped disks (ie, the grouping configuration information).
[0104] After completing the disk grouping, the bare metal service needs to generate specific RAID configuration information for each group, which is the group configuration information mentioned above. This group configuration information includes the target RAID card ID corresponding to each group (defined by the Controllerid corresponding to the RAID card), and the actual disk information that meets the required disk information (such as the disk cage ID (Enclosureid), disk slot ID (Slotid) and disk size, etc.), and may also include the corresponding RAID tool type and the RAID level corresponding to each group. The bare metal service accurately generates the RAID configuration information for each group based on the previously collected and pre-stored correspondence between the RAID card ID and the actual disk information, as well as various information sent by the user, to prepare for the subsequent sending of the configuration information to the bare metal server to perform RAID operations.
[0105] 405. The Bare Metal service sends the RAID configuration to the Bare Metal server.
[0106] After the bare metal service generates the RAID configuration information for each group, it will send this configuration information to the bare metal server. This step is similar to issuing detailed operation instructions to the bare metal server, telling the bare metal server how to configure the RAID for each group. After receiving this information, the bare metal server can carry out the subsequent disk array configuration work in an orderly manner according to the various indicators and requirements, ensuring that each link can be executed according to the predetermined plan and achieve the expected disk array configuration effect.
[0107] 406. The bare metal server operates different RAID cards according to the Controllerid corresponding to the RAID card in the RAID configuration, and performs RAID operations according to the Enclosureid, Slotid, and RAID card level.
[0108] After receiving the RAID configuration information sent by the bare metal service, the bare metal server will perform specific operations according to the contents of the configuration information. First, the RAID card resources that need to be operated are accurately located according to the Controllerid corresponding to the RAID card in the RAID configuration to ensure that subsequent operations are carried out for the correct hardware device. Then, based on the Enclosureid, Slotid, and RAID card level information, RAID operations are performed on the corresponding disks, such as data striping and data mirroring according to different RAID level requirements, to achieve a disk array configuration that meets the requirements, so that users can directly log in to the bare metal server and directly use the logical disks that have been grouped and RAIDed for subsequent partition mounting and other operations.
[0109] After completing the above overall creation process, the user can directly log in to the bare metal server and directly use the logical disk that has been grouped and RAIDed for subsequent partition mounting and other operations.
[0110] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0111] Based on the same inventive concept, the embodiment of the present application also provides a disk array configuration device for implementing the disk array configuration method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more disk array configuration device embodiments provided below can refer to the limitations of the disk array configuration method above, and will not be repeated here.
[0112] In an exemplary embodiment, as shown in FIG5 , a structural block diagram of a disk array configuration device is provided, the device is applied to a computer device running a bare metal service, and includes:
[0113] The instruction receiving module 501 is used to receive a group creation instruction, wherein the group creation instruction includes: group requirement information, wherein the group requirement information includes: the number of groups, and the target RAID card identifier and required disk information corresponding to each group;
[0114] The configuration determination module 502 is used to determine the group configuration information according to the group requirement information and the pre-stored correspondence relationship; wherein the correspondence relationship is used to identify the association between each RAID card identifier and the actual disk information in the bare metal server; the group configuration information includes: the target RAID card identifier corresponding to each group, and the actual disk information corresponding to the target RAID card identifier and meeting the required disk information;
[0115] The configuration sending module 503 is used to send the group configuration information to the bare metal server, and the group configuration information is used to perform a RAID operation on the bare metal server.
[0116] In some embodiments, the group creation instruction further includes: a RAID level specified for each group, and the group configuration information further includes: a RAID level corresponding to each group.
[0117] In some embodiments, the corresponding relationship further includes: a RAID tool type stored corresponding to the RAID card identifier, and the group configuration information further includes: a target RAID tool type corresponding to the target RAID card identifier.
[0118] In some embodiments, the device further includes a data collection module 504, which is used to: collect the RAID card identifiers in the bare metal server, and actual disk information connected to the RAID cards indicated by the RAID card identifiers;
[0119] The corresponding relationship is pre-stored.
[0120] In some embodiments, the data acquisition module 504 is further used to:
[0121] Get the RAID card model in the bare metal server;
[0122] Determine a RAID tool that is compatible with the RAID card model;
[0123] The data acquisition module 504 is specifically used for:
[0124] Collecting the RAID card identifiers of the bare metal server and actual disk information connected to the RAID cards indicated by the RAID card identifiers based on the RAID tool;
[0125] The corresponding relationship is pre-stored.
[0126] In some embodiments, the required disk information includes at least one of the following:
[0127] Required number of disks and required disk size;
[0128] The actual disk information includes at least one of the following:
[0129] Disk cage ID, disk slot ID, and disk size.
[0130] Each module in the above disk array configuration device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0131] In an exemplary embodiment, a computer device is provided, which can be a computer, a server, etc., and its internal structure diagram can be shown in Figure 6. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a disk array configuration method is implemented.
[0132] Those skilled in the art will understand that the structure shown in FIG. 6 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0133] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, each process in the above method embodiment is implemented.
[0134] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the various processes in the above method embodiments are implemented.
[0135] In one embodiment, a computer program product is provided, including a computer program, which implements the various processes in the above method embodiments when executed by a processor.
[0136] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0137] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0138] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A disk array configuration method, characterized in that: Applies to computer equipment running bare metal services, including: Receive a group creation instruction, the group creation instruction includes: group requirement information, the group requirement information includes: the number of groups, and the target RAID card identifier and required disk information corresponding to each group; Determine the group configuration information according to the group requirement information and the pre-stored correspondence relationship; wherein the correspondence relationship is used to identify the association between each RAID card identifier and the actual disk information in the bare metal server; the group configuration information includes: the target RAID card identifier corresponding to each group, and the actual disk information corresponding to the target RAID card identifier and meeting the required disk information; The grouping configuration information is sent to the bare metal server, where the grouping configuration information is used to perform a RAID operation on the bare metal server.
2. The method according to claim 1, characterized in that The group creation instruction also includes: a RAID level specified for each group, and the group configuration information also includes: a RAID level corresponding to each group.
3. The method according to claim 1, characterized in that The corresponding relationship also includes: a RAID tool type stored corresponding to the RAID card identifier, and the group configuration information also includes: a target RAID tool type corresponding to the target RAID card identifier.
4. The method according to any one of claims 1 to 3, characterized in that: Before determining the group configuration information according to the group requirement information and the pre-stored correspondence, the method further includes: Collecting the RAID card identifiers in the bare metal server and actual disk information connected to the RAID cards indicated by the RAID card identifiers; The corresponding relationship is pre-stored.
5. The method according to claim 4, characterized in that Before collecting the RAID card identifiers in the bare metal server and the actual disk information connected to the RAID card indicated by the RAID card identifiers, the method further includes: Get the RAID card model in the bare metal server; Determine a RAID tool that is compatible with the RAID card model; The collecting of the RAID card identifiers in the bare metal server and the actual disk information connected to the RAID card indicated by the RAID card identifiers includes: Based on the RAID tool, the RAID card identifiers in the bare metal server and actual disk information connected to the RAID cards indicated by the RAID card identifiers are collected.
6. The method according to claim 1, characterized in that The required disk information includes at least one of the following: Required number of disks and required disk size; The actual disk information includes at least one of the following: Disk cage ID, disk slot ID, and disk size.
7. A disk array configuration device, characterized in that: The device is applied to a computer device running a bare metal service, including: The instruction receiving module is used to receive a group creation instruction, wherein the group creation instruction includes: group requirement information, wherein the group requirement information includes: the number of groups, and the target RAID card identifier and required disk information corresponding to each group; A configuration determination module is used to determine group configuration information according to group requirement information and a pre-stored correspondence relationship; wherein the correspondence relationship is used to identify the association between each RAID card identifier and actual disk information in the bare metal server; the group configuration information includes: the target RAID card identifier corresponding to each group, and the actual disk information corresponding to the target RAID card identifier and meeting the required disk information; The configuration sending module is used to send the group configuration information to the bare metal server, and the group configuration information is used to perform a RAID operation on the bare metal server.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Cited By
Disk array card configuration method and electronic equipment
CN121542103A