Method and device for creating onboard raid, computer equipment and storage medium

By obtaining hard drive attribute information and modifying the BIOS interface mode, and using the mdadm and SCELNX_64 tools to create onboard RAID, the problem of no RAID function support in the BIOS system was solved, realizing automated operation and improved production efficiency.

CN116339642BActive Publication Date: 2025-11-28INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310416070.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-18
Publication Date
2025-11-28
Estimated Expiration
2043-04-18

AI Technical Summary

Technical Problem

How to create onboard RAID when RAID cannot be implemented in the BIOS interface, especially to solve the problem of BIOS system not supporting RAID function.

Method used

By obtaining the attribute information of each hard drive in the computer device, using target tools such as mdadm and SCELNX_64, the sSATA interface mode of the BIOS system is modified, and the target hard drive is created as an onboard RAID, thus realizing the automated operation process and reducing manpower input.

Benefits of technology

Even when RAID cannot be implemented in the BIOS interface, onboard RAID was successfully created, optimizing factory operations, improving production efficiency, reducing manpower input, and achieving automated operation processes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116339642B_ABST
    Figure CN116339642B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of computer, in particular to a method and device for creating on-board RAID, computer equipment and storage medium, the method comprises: obtaining attribute information corresponding to each hard disk in the computer equipment;According to the attribute information corresponding to each hard disk, at least two target hard disks for creating on-board RAID are determined from each hard disk;At least two target hard disks are created into on-board RAID by using a target tool. In the case that RAID cannot be realized in the BIOS interface, on-board RAID is created. On the one hand, the problem is solved, the project development is completed, on the other hand, the factory operation mode can be optimized, the manpower investment is reduced, the automatic operation process is completed, and the factory production efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer, in particular to a method and device for creating onboard RAID, a computer device and a storage medium. BACKGROUND

[0002] In the face of various possible disasters, enterprises need to conveniently and flexibly synchronize data based on heterogeneous environments residing in different databases, so a local and remote disaster recovery system that can resist or resolve various situations is needed. In the application environment of traditional single-node server audio and video data storage, professional RAID (Redundant Array of Independent Disk) hardware resources are usually needed to provide multi-level disaster recovery capabilities, such as using RAID5 or RAID6. However, the traditional hard RAID scheme needs to sacrifice hardware resources to provide high-availability disaster recovery capabilities, and it is difficult to meet the needs of reducing hardware resource costs and improving disaster recovery capabilities at the same time.

[0003] Therefore, onboard RAID (Redundant Array of Inexpensive Disks) emerges as the times require. Onboard RAID is a redundant array composed of multiple hard disks (assembled by disks). In the prior art, the implementation of onboard RAID is generally completed manually in the BIOS interface, and some server BIOS systems do not support this function temporarily, and the BIOS system manufacturers have not included the development of the corresponding function in the plan, resulting in that many servers cannot implement onboard RAID.

[0004] Therefore, in the case that the BIOS system cannot implement RAID, how to create onboard RAID becomes a problem to be solved. SUMMARY

[0005] Therefore, the present application provides a method and device for creating onboard RAID, a computer device and a storage medium to solve the problem of how to create onboard RAID in the case that the BIOS interface cannot implement RAID.

[0006] In a first aspect, the present application provides a method for creating onboard RAID, which comprises:

[0007] obtaining attribute information corresponding to each hard disk in the computer device;

[0008] determining at least two target hard disks for creating onboard RAID from each hard disk according to the attribute information corresponding to each hard disk;

[0009] creating the at least two target hard disks as onboard RAID by using a target tool.

[0010] The method for creating the on-board RAID provided in the embodiments of the present application obtains attribute information corresponding to each hard disk in a computer device; at least two target hard disks for creating the on-board RAID are determined from each hard disk according to the attribute information corresponding to each hard disk, thereby ensuring the accuracy of determining the at least two target hard disks for creating the on-board RAID from each hard disk. Then, the at least two target hard disks are created into the on-board RAID by using a target tool, thereby realizing the creation of the on-board RAID in the case that the RAID cannot be realized in the BIOS interface. On the one hand, the problem is solved, the project development is completed, on the other hand, the factory operation mode can be optimized, the manpower investment is reduced, the automatic operation process is completed, and the factory production efficiency is improved.

[0011] In an alternative embodiment, before the at least two target hard disks are created into the on-board RAID by using the target tool, the method further comprises:

[0012] obtaining a current mode of an sSATA interface of a BIOS system corresponding to the computer device;

[0013] modifying the current mode of the sSATA interface into a target mode.

[0014] The method for creating the on-board RAID provided in the embodiments of the present application obtains a current mode of an sSATA interface of a BIOS system corresponding to the computer device, and then modifies the current mode of the sSATA interface into a target mode, thereby ensuring that the computer device can successfully create the on-board RAID and no error occurs in the process of creating the on-board RAID.

[0015] In an alternative embodiment, the current mode of the sSATA interface is an AHCI mode, and the target mode is a RAID mode. The modification of the current mode of the sSATA interface into the target mode comprises:

[0016] exporting a Setup corresponding to the BIOS system to a file by using a SCELNX_64 tool under an OS system;

[0017] modifying the current mode of the sSATA interface from the AHCI mode into the RAID mode;

[0018] writing the modified Setup corresponding to the BIOS system into a configuration file of the BIOS by using the SCELNX_64 tool.

[0019] The method for creating the on-board RAID provided in the embodiments of the present application can export the Setup corresponding to the BIOS system to a file by using the SCELNX_64 tool under the OS system, so as to facilitate the modification of the current mode of the sSATA interface. Then, the current mode of the sSATA interface is modified from the AHCI mode to the RAID mode, and the modified Setup corresponding to the BIOS system is written into the configuration file of the BIOS by using the SCELNX_64 tool. Thus, it is ensured that the on-board RAID can be successfully created, and no error occurs in the process of creating the on-board RAID.

[0020] In an optional embodiment, the target tool is the mdadm tool, and the at least two target hard disks are created into the on-board RAID by using the target tool, including:

[0021] creating a target container by using the mdadm tool;

[0022] putting the at least two target hard disks into the target container;

[0023] transforming the at least two target hard disks in the target container into the on-board RAID.

[0024] The method for creating the on-board RAID provided in the embodiments of the present application can create a target container by using the mdadm tool, so as to ensure the accuracy of the created target container. The at least two target hard disks are put into the target container, and the at least two target hard disks in the target container are transformed into the on-board RAID. Thus, the on-board RAID is created in the case that the RAID cannot be realized in the BIOS interface. On the one hand, the problem is solved, the project development is completed, and on the other hand, the factory operation mode can be optimized, the manpower investment is reduced, the automatic operation process is completed, and the factory production efficiency is improved.

[0025] In an optional embodiment, the attribute information corresponding to each hard disk in the computer device is acquired, including:

[0026] acquiring the hardware topology relationship of the computer device;

[0027] reading the attribute information corresponding to each hard disk by using the udevadm tool under the OS system according to the hardware topology relationship.

[0028] The method for creating the on-board RAID provided in the embodiments of the present application can acquire the hardware topology relationship of the computer device, so as to ensure the accuracy of the acquired hardware topology relationship of the computer device. The attribute information corresponding to each hard disk is read by using the udevadm tool under the OS system according to the hardware topology relationship, so as to ensure the accuracy of the read attribute information corresponding to each hard disk.

[0029] In an alternative embodiment, the method for creating the on-board RAID further comprises:

[0030] The creating process of the on-board RAID is monitored in real time, and the creating progress of the on-board RAID is displayed in real time.

[0031] When a fault occurs in the creating process of the on-board RAID, the fault reason is output.

[0032] The method for creating the on-board RAID provided by the embodiments of the present application monitors the creating process of the on-board RAID in real time, and displays the creating progress of the on-board RAID in real time, so that the creating process of the on-board RAID is monitored, and the user can obtain the creating progress of the on-board RAID in real time. In addition, when a fault occurs in the creating process of the on-board RAID, the fault reason is output, so that the user can obtain the fault reason, and then the user can correct the creating process of the on-board RAID according to the fault reason.

[0033] In a second aspect, the present application provides a device for creating an on-board RAID, which comprises:

[0034] A first obtaining module is configured to obtain attribute information corresponding to each hard disk in a computer device.

[0035] A determining module is configured to determine at least two target hard disks for creating the on-board RAID from the hard disks according to the attribute information corresponding to each hard disk.

[0036] A creating module is configured to create the at least two target hard disks into the on-board RAID by using a target tool.

[0037] The device for creating the on-board RAID provided by the embodiments of the present application obtains the attribute information corresponding to each hard disk in the computer device, and determines the at least two target hard disks for creating the on-board RAID from the hard disks according to the attribute information corresponding to each hard disk, so that the accuracy of determining the at least two target hard disks for creating the on-board RAID from the hard disks is ensured. Then, the at least two target hard disks are created into the on-board RAID by using the target tool, so that the on-board RAID is created in the case that the RAID cannot be realized in the BIOS interface. On the one hand, the problem is solved, the project development is completed, and on the other hand, the factory operation mode can be optimized, the manpower investment is reduced, the automatic operation process is completed, and the factory production efficiency is improved.

[0038] In an alternative embodiment, the device for creating the on-board RAID further comprises:

[0039] A second obtaining module is configured to obtain a current mode of an sSATA interface of a BIOS system corresponding to the computer device.

[0040] The modification module is configured to modify the current mode of the sSATA interface to a target mode.

[0041] The device for creating the on-board RAID provided in the embodiments of the present application acquires the current mode of the sSATA interface of the BIOS system corresponding to the computer device, and then modifies the current mode of the sSATA interface to a target mode, so that the computer device can successfully create the on-board RAID and no error occurs in the process of creating the on-board RAID.

[0042] In a third aspect, the present application provides a computer device, comprising a memory and a processor, which are communicatively connected with each other, and the memory stores computer instructions, and the processor executes the computer instructions to perform the method for creating the on-board RAID according to the first aspect or any one of the corresponding embodiments thereof.

[0043] In a fourth aspect, the present application provides a computer readable storage medium, which stores computer instructions, and the computer instructions are used to make a computer execute the method for creating the on-board RAID according to the first aspect or any one of the corresponding embodiments thereof. BRIEF DESCRIPTION OF DRAWINGS

[0044] In order to more clearly illustrate the specific embodiments of the present application or the technical solutions in the prior art, the drawings needed in the specific embodiments or the prior art description will be briefly introduced as follows. Obviously, the drawings in the following description are some embodiments of the present application, and those skilled in the art can obtain other drawings according to these drawings without creative labor.

[0045] Figure 1 is a flowchart of the method for creating the on-board RAID according to the embodiments of the present application;

[0046] Figure 2 is a schematic diagram of the hardware of the computer device in the method for creating the on-board RAID according to the embodiments of the present application;

[0047] Figure 3 is a flowchart of another method for creating the on-board RAID according to the embodiments of the present application;

[0048] Figure 4 is a flowchart of still another method for creating the on-board RAID according to the embodiments of the present application;

[0049] Figure 5 is a structural block diagram of the device for creating the on-board RAID according to the embodiments of the present application;

[0050] Figure 6is a structural block diagram of another on-board RAID creation device according to an embodiment of the present application;

[0051] Figure 7 is a structural block diagram of still another on-board RAID creation device according to an embodiment of the present application;

[0052] Figure 8 is a hardware structure schematic diagram of a computer device according to an embodiment of the present application. DETAILED DESCRIPTION

[0053] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.

[0054] At present, the demand for servers in various industries is increasing, and the domestic signal creation server industry is also rising. Currently, some signal creation servers do not complete the RAID of system disks through external RAID array cards. Therefore, it is necessary to create an on-board RAID through system software by connecting two hard disks to the PCH of the motherboard.

[0055] However, in the prior art, the implementation of the on-board RAID is generally completed manually in the BIOS interface, and some server BIOS systems do not support this function temporarily, and the BIOS system manufacturers have not included the development of the corresponding function in the plan, resulting in that many servers cannot implement the on-board RAID.

[0056] Therefore, the embodiments of the present application provide an on-board RAID creation method to solve the problem of how to create an on-board RAID when the RAID cannot be implemented in the BIOS interface.

[0057] According to the embodiments of the present application, an on-board RAID creation method is provided. It should be noted that the steps shown in the flowchart of the drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0058] A method for creating an on-board RAID is provided in the embodiment, and an execution subject of the method can be an on-board RAID creating device, which can be part or all of a computer device in a software, hardware or combination of software and hardware manner, and can be a server or a terminal. The server in the embodiment can be a single server or a server cluster composed of multiple servers. The terminal in the embodiment can be a smartphone, a personal computer, a tablet computer, a wearable device, a smart robot or other smart hardware devices. The following method embodiments are described by taking the computer device as an example.

[0059] A method for creating an on-board RAID is provided in the embodiment, and can be used in the computer device such as a server or a computer. Figure 1 A flowchart of the method for creating an on-board RAID is provided in the embodiment, as shown in Figure 1 The flowchart includes the following steps.

[0060] In step S101, attribute information corresponding to each hard disk in the computer device is obtained.

[0061] Specifically, the computer device can receive attribute information corresponding to each hard disk in the computer device input by a user, receive attribute information corresponding to each hard disk in the computer device sent by another device, or identify each hard disk in the computer device to determine attribute information corresponding to each hard disk in the computer device.

[0062] The method for obtaining attribute information corresponding to each hard disk in the computer device is not limited in the embodiment.

[0063] It should be noted that, as shown in Figure 2 In the computer device provided in the embodiment, two M.2 system hard disks are connected to a rear backplane, and the rear backplane is connected to a PCH of a mainboard through a SAS-SATA line.

[0064] The step will be described in detail below.

[0065] In step S102, at least two target hard disks for creating an on-board RAID are determined from each hard disk according to attribute information corresponding to each hard disk.

[0066] Specifically, after obtaining attribute information corresponding to each hard disk, the computer device can determine at least two target hard disks for creating an on-board RAID from each hard disk according to attribute information corresponding to each hard disk.

[0067] For example, the computer device can determine two target hard disks with attribute information of ata1 and ata2 from the hard disks according to the attribute information of the hard disks.

[0068] In step S103, the target tool is used to create the at least two target hard disks as the on-board RAID.

[0069] Specifically, after the at least two target hard disks are determined, the computer device can use the target tool to convert the at least two target hard disks into the on-board RAID.

[0070] This step will be described in detail below.

[0071] The method for creating the on-board RAID provided in the embodiment acquires attribute information of each hard disk in a computer device, determines at least two target hard disks for creating the on-board RAID from the hard disks according to the attribute information of the hard disks, and ensures the accuracy of determining the at least two target hard disks for creating the on-board RAID from the hard disks. Then, the target tool is used to create the at least two target hard disks as the on-board RAID, so that the on-board RAID is created in the case that the RAID cannot be realized in the BIOS interface. On the one hand, the problem is solved, the project development is completed, on the other hand, the factory operation mode can be optimized, the labor input is reduced, the automatic operation process is completed, and the factory production efficiency is improved.

[0072] In the embodiment, a method for creating an on-board RAID is provided, which can be used in the computer device described above, such as a server, a computer, etc. Figure 3 is a flowchart of the method for creating the on-board RAID provided in the embodiment, as shown in the figure, the flowchart includes the following steps: Figure 3

[0073] In step S201, attribute information of each hard disk in a computer device is acquired.

[0074] For details, please refer to step S101 of the embodiment shown in Figure 1 , which will not be repeated here.

[0075] In step S202, at least two target hard disks for creating the on-board RAID are determined from the hard disks according to the attribute information of the hard disks.

[0076] For details, please refer to step S102 of the embodiment shown in Figure 1 , which will not be repeated here.

[0077] In step S203, the current mode of the sSATA interface of the BIOS system corresponding to the computer device is acquired.

[0078] ​Specifically, the computer device can read the current mode of the sSATA interface of the BIOS system, so as to obtain the current mode of the sSATA interface of the BIOS system corresponding to the computer device.

[0079] Step S204, modifying the current mode of the sSATA interface to the target mode.

[0080] In some optional embodiments, the current mode of the sSATA interface is the AHCI mode, and the target mode is the RAID mode. The step S204 of modifying the current mode of the sSATA interface to the target mode includes:

[0081] Step S2041, under the OS system, using the SCELNX_64 tool to export the Setup corresponding to the BIOS system to a file.

[0082] Specifically, under the OS system, the computer device can use the SCELNX_64 tool to export the Setup corresponding to the BIOS system to a file.

[0083] Step S2042, modifying the current mode of the sSATA interface from the AHCI mode to the RAID mode.

[0084] Specifically, the computer device can modify the current mode of the sSATA interface from the AHCI mode to the RAID mode.

[0085] Step S2043, using the SCELNX_64 tool to write the modified Setup corresponding to the BIOS system into the configuration file of the BIOS.

[0086] Specifically, after modifying the current mode of the sSATA interface from the AHCI mode to the RAID mode, the computer device can again use the SCELNX_64 tool to write the modified Setup corresponding to the BIOS system into the configuration file of the BIOS.

[0087] Step S205, using a target tool to create at least two target hard disks as on-board RAID.

[0088] For details, please refer to Figure 1 Step S103 of the embodiment shown will not be repeated here.

[0089] The method for creating the on-board RAID provided in the embodiments of the present application comprises the following steps: obtaining the current mode of the sSATA interface of the BIOS system corresponding to the computer device; exporting the Setup corresponding to the BIOS system to a file under the OS system by using the SCELNX_64 tool, so as to facilitate the modification of the current mode of the sSATA interface; and modifying the current mode of the sSATA interface from the AHCI mode to the RAID mode, and writing the modified Setup corresponding to the BIOS system into the configuration file of the BIOS by using the SCELNX_64 tool. Thus, it is ensured that the computer device can successfully create the on-board RAID, and no error occurs in the process of creating the on-board RAID.

[0090] The method for creating the on-board RAID provided in the embodiments of the present application can be used for the computer device as described above, such as a server, a computer, etc. Figure 4 The method for creating the on-board RAID provided in the embodiments of the present application comprises the following steps: Figure 4 The method for creating the on-board RAID provided in the embodiments of the present application comprises the following steps:

[0091] In step S301, the attribute information of each hard disk in the computer device is obtained.

[0092] Specifically, the step S301 of obtaining the attribute information of each hard disk in the computer device can comprise the following steps:

[0093] In step S3011, the hardware topology relationship of the computer device is obtained.

[0094] Specifically, the computer device can identify the hardware corresponding to the computer device, and obtain the hardware topology relationship of the computer device; the computer device can also receive the hardware topology relationship of the computer device input by a user; and the computer device can also receive the hardware topology relationship of the computer device sent by another device.

[0095] The manner in which the computer device obtains the hardware topology relationship of the computer device is not limited in the embodiments of the present application.

[0096] In step S3012, the attribute information of each hard disk is read by using the udevadm tool under the OS system according to the hardware topology relationship.

[0097] Specifically, the attribute information of each hard disk can be read by using the udevadm tool under the OS system according to the hardware topology relationship.

[0098] Exemplarily, the attribute information can be a system identification number. According to the hardware topology relationship of the computer device, the computer device acquires the udev information corresponding to each hard disk under the system OS by using the udevadm tool, and identifies the system identification number of the hard disk in advance according to the SATA0 / SATA1 interface of the PCH to which each hard disk is connected. Then, according to the system identification number of the hard disk, the hard disk with the system identification number of atal / ata2 is determined as the target hard disk from each hard disk.

[0099] In step S302, at least two target hard disks used for creating the on-board RAID are determined from each hard disk according to the attribute information corresponding to each hard disk.

[0100] For details, please refer to Figure 3 In step S202 of the embodiment shown in the figure, details are not repeated here.

[0101] In step S303, at least two target hard disks are created as on-board RAIDs by using a target tool.

[0102] Specifically, the target tool is the mdadm tool, and the step S303 of "creating at least two target hard disks as on-board RAIDs by using a target tool" can include the following steps:

[0103] In step S3031, an target container is created by using the mdadm tool.

[0104] Specifically, the computer device can create an target container by using the mdadm tool.

[0105] In step S3032, at least two target hard disks are put into the target container.

[0106] Specifically, after the target container is created, the computer device puts at least two target hard disks into the target container.

[0107] In step S3033, at least two target hard disks in the target container are converted into on-board RAIDs.

[0108] Specifically, after at least two target hard disks are put into the target container, the computer device converts at least two target hard disks in the target container into on-board RAIDs.

[0109] For example, the computer device can first create a target container / dev / d / imsm0, mdadm -C / dev / md / imsm0 / dev / sda / dev / sdb -n 2 -e imsm, and then convert at least two target hard disks in the target container into an on-board RAID, mdadm -C / dev / md126 / dev / md / imsm0 -n 2 -l 1 -N Volume0. In this way, the on-board RAID named / dev / md126 is created.

[0110] In step S304, the creation process of the on-board RAID is monitored in real time, and the creation progress of the on-board RAID is displayed in real time.

[0111] Specifically, the computer device can monitor the creation process of the on-board RAID in real time, and display the creation progress of the on-board RAID in real time.

[0112] The computer device can display the creation progress of the on-board RAID in real time in the form of a progress bar, in the form of a disc, or in the form of a percentage. The present application does not limit the manner in which the computer device displays the creation progress of the on-board RAID in real time.

[0113] In step S305, when a fault occurs in the creation process of the on-board RAID, the cause of the fault is output.

[0114] Specifically, when the computer device monitors the creation process of the on-board RAID in real time, it can also monitor whether a fault occurs in the creation process of the on-board RAID. When a fault occurs in the creation process of the on-board RAID, the cause of the fault is output.

[0115] The computer device can output the cause of the fault in the form of fault information or by controlling the indicator light to flash. The present application does not limit the manner in which the computer device outputs the cause of the fault.

[0116] The method for creating an on-board RAID provided in the present application obtains the hardware topology relationship of the computer device, ensuring the accuracy of the obtained hardware topology relationship of the computer device. In the OS system, the udevadm tool is used to read the attribute information corresponding to each hard disk according to the hardware topology relationship, ensuring the accuracy of the read attribute information corresponding to each hard disk.

[0117] Further, the method for creating the on-board RAID provided by the embodiment of the present application creates a target container by using the mdadm tool, thereby ensuring the accuracy of the created target container. The at least two target hard disks are put into the target container, and the at least two target hard disks in the target container are converted into the on-board RAID. Thus, the on-board RAID is created in the case that the RAID cannot be realized in the BIOS interface. On the one hand, the problem is solved, the project development is completed, and on the other hand, the factory operation mode can be optimized, the manpower investment is reduced, the automatic operation process is completed, and the factory production efficiency is improved.

[0118] Then, the creation process of the on-board RAID is monitored in real time, and the creation progress of the on-board RAID is displayed in real time, so that the creation process of the on-board RAID is monitored, and the user can obtain the creation progress of the on-board RAID in real time. In addition, when a fault occurs in the creation process of the on-board RAID, the fault reason is output, so that the user can obtain the fault reason, and then the user can correct the creation process of the on-board RAID according to the fault reason.

[0119] In the embodiment, an on-board RAID creation device is also provided, which is used to implement the above-mentioned embodiments and preferred embodiments, and will not be described herein. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware or a combination of software and hardware is also possible and is contemplated.

[0120] The embodiment provides an on-board RAID creation device, as shown in Figure 5 , which comprises:

[0121] The first acquisition module 401 is configured to acquire attribute information corresponding to each hard disk in the computer device.

[0122] The determination module 402 is configured to determine at least two target hard disks for creating the on-board RAID from the hard disks according to the attribute information corresponding to each hard disk.

[0123] The creation module 403 is configured to create the at least two target hard disks into the on-board RAID by using a target tool.

[0124] As shown in Figure 6 , in some optional embodiments, the on-board RAID creation device further comprises:

[0125] The second acquisition module 404 is configured to acquire a current mode of an sSATA interface of a BIOS system corresponding to the computer device.

[0126] The modification module 405 is configured to modify the current mode of the sSATA interface to the target mode.

[0127] In some optional embodiments, the current mode of the sSATA interface is the AHCI mode, and the target mode is the RAID mode, and the modification module 405 includes:

[0128] The export unit 4051 is configured to export the Setup corresponding to the BIOS system to a file by using the SCELNX_64 tool under the OS system.

[0129] The modification unit 4052 is configured to modify the current mode of the sSATA interface from the AHCI mode to the RAID mode.

[0130] The writing unit 4053 is configured to write the modified Setup corresponding to the BIOS system into the configuration file of the BIOS by using the SCELNX_64 tool.

[0131] In some optional embodiments, the target tool is the mdadm tool, and the creation module 403 includes:

[0132] The creation unit 4031 is configured to create a target container by using the mdadm tool.

[0133] The putting unit 4032 is configured to put the at least two target hard disks into the target container.

[0134] The conversion unit 4033 is configured to convert the at least two target hard disks in the target container into the on-board RAID.

[0135] In some optional embodiments, the first acquisition module 401 includes:

[0136] The acquisition unit 4011 is configured to acquire the hardware topology relationship of the computer device.

[0137] The reading unit 4012 is configured to read the attribute information corresponding to each hard disk by using the udevadm tool according to the hardware topology relationship under the OS system.

[0138] As shown in Figure 7 In some optional embodiments, the on-board RAID creation device further includes:

[0139] The monitoring module 406 is configured to monitor the creation process of the on-board RAID in real time, and display the creation progress of the on-board RAID in real time.

[0140] The output module 407 is configured to output the fault reason when a fault occurs in the creation process of the on-board RAID.

[0141] In this embodiment, the onboard RAID creation device is presented in the form of a functional unit. Here, a unit refers to an ASIC circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.

[0142] Further functional descriptions of the above modules and units are the same as those in the corresponding embodiments described above, and will not be repeated here.

[0143] This invention also provides a computer device having the above-described features. Figures 5-7 The onboard RAID creation device shown.

[0144] Please see Figure 8 , Figure 8 This is a schematic diagram of the structure of a computer device provided in an optional embodiment of the present invention, such as... Figure 8 As shown, the computer device includes one or more processors 10, memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 8 Take a processor 10 as an example.

[0145] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GDA), or any combination thereof.

[0146] The memory 20 stores instructions executable by at least one processor 10 to cause at least one processor 10 to perform the method shown in the above embodiments.

[0147] The memory 20 can include a program storage area and a data storage area, where the program storage area can store an operating system and application programs required by at least one function; the data storage area can store data created by the use of the computer device according to the presentation of a small program landing page, and the like. In addition, the memory 20 can include a high-speed random access memory, and can also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state memory device. In some optional embodiments, the memory 20 can optionally include a memory disposed remotely relative to the processor 10, and these remote memories can be connected to the computer device through a network. Examples of the above network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0148] The memory 20 can include a volatile memory, such as a random access memory; the memory can also include a non-volatile memory, such as a flash memory, a hard disk, or a solid-state disk; and the memory 20 can also include a combination of the above kinds of memories.

[0149] The computer device also includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30, and the output device 40 can be connected through a bus or other means, Figure 8 Taking the connection through a bus as an example.

[0150] The input device 30 can receive input digital or character information, and generate key signal inputs related to the user settings and function controls of the computer device, such as a touch screen, a keypad, a mouse, a trackpad, a touchpad, a pointing stick, one or more mouse buttons, a trackball, a joystick, and the like. The output device 40 can include a display device, an auxiliary lighting device (such as an LED), a tactile feedback device (such as a vibration motor), and the like. The above display device includes, but is not limited to, a liquid crystal display, a light-emitting diode, a display, and a plasma display. In some optional embodiments, the display device can be a touch screen.

[0151] The embodiments of the present application further provide a computer readable storage medium, and the method according to the embodiments of the present application can be implemented in hardware, firmware, or recorded in a storage medium, or be implemented as computer codes stored in a remote storage medium or a non-transitory machine readable storage medium and downloaded through a network and stored in a local storage medium, so that the method described herein can be processed by such software on a storage medium using a general purpose computer, a special purpose processor, or programmable or special hardware. The storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, or a solid state disk, etc. Further, the storage medium can also include a combination of the above-mentioned types of memories. It can be understood that the computer, the processor, the microprocessor controller, or the programmable hardware includes a storage component that can store or receive software or computer codes, when the software or computer codes are accessed and executed by the computer, the processor, or the hardware, the method shown in the above embodiments is implemented.

[0152] Although the embodiments of the present application are described in conjunction with the accompanying drawings, various modifications and changes can be made by those skilled in the art without departing from the spirit and scope of the present application, and such modifications and changes fall within the scope defined by the appended claims.

Claims

1. A method of creating a RAID-on-a-board, characterized by, The method comprises: Obtaining attribute information corresponding to each hard disk in a computer device; According to the attribute information corresponding to each hard disk, at least two target hard disks for creating an on-board RAID are determined from each hard disk; At least two target hard disks are created into an on-board RAID by using a target tool; Before at least two target hard disks are created into an on-board RAID by using a target tool, the method further comprises: Obtaining a current mode of an sSATA interface of a BIOS system corresponding to the computer device; Modifying the current mode of the sSATA interface into a target mode; When the current mode of the sSATA interface is an AHCI mode and the target mode is a RAID mode, modifying the current mode of the sSATA interface into the target mode comprises: Under an OS system, exporting a Setup corresponding to the BIOS system into a file by using a SCELNX_64 tool; Modifying the current mode of the sSATA interface from the AHCI mode into the RAID mode; Writing the modified Setup corresponding to the BIOS system into a configuration file of the BIOS by using the SCELNX_64 tool.

2. The method of claim 1, wherein, The target tool is an mdadm tool, and creating at least two target hard disks into an on-board RAID by using a target tool comprises: Creating a target container by using the mdadm tool; Putting at least two target hard disks into the target container; Converting at least two target hard disks in the target container into the on-board RAID.

3. The method of claim 1, wherein, Obtaining attribute information corresponding to each hard disk in a computer device comprises: Obtaining a hardware topology relationship of the computer device; Under an OS system, reading the attribute information corresponding to each hard disk by using a udevadm tool according to the hardware topology relationship.

4. The method of claim 1, wherein, The method further comprises: Real-time monitoring a creation process of the on-board RAID and real-time displaying a creation progress of the on-board RAID; When a fault occurs in the creation process of the on-board RAID, outputting a fault reason.

5. An apparatus for creating onboard RAID, characterized by comprising: The device comprises: A first obtaining module for obtaining attribute information corresponding to each hard disk in a computer device; A determining module for determining at least two target hard disks for creating an on-board RAID from each hard disk according to the attribute information corresponding to each hard disk; A creating module for creating at least two target hard disks into an on-board RAID by using a target tool; before at least two target hard disks are created into an on-board RAID by using a target tool, the device further comprises: Obtaining a current mode of an sSATA interface of a BIOS system corresponding to the computer device; Modifying the current mode of the sSATA interface into a target mode; When the current mode of the sSATA interface is an AHCI mode and the target mode is a RAID mode, modifying the current mode of the sSATA interface into the target mode comprises: Under the OS system, the SCELNX_64 tool is used to export the Setup corresponding to the BIOS system to a file; the current mode of the sSATA interface is modified from the AHCI mode to the RAID mode; the SCELNX_64 tool is used to write the modified Setup corresponding to the BIOS system into the configuration file of the BIOS.

6. The apparatus of claim 5, wherein, The on-board RAID creating device further comprises: a second obtaining module configured to obtain the current mode of the sSATA interface of the BIOS system corresponding to the computer device; a modifying module configured to modify the current mode of the sSATA interface to a target mode.

7. A computer device, comprising: comprise: a memory and a processor, which are in communication connection with each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the on-board RAID creating method according to any one of claims 1 to 4.

8. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer instructions, and the computer instructions are used to make the computer perform the on-board RAID creating method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Method and device for quickly establishing various RAIDs in multi-hard-disk storage manner

    CN109783022A

  • Virtual disk array configuration method and device, computer equipment and storage medium

    CN115562588A