Disk correction method, device and equipment and computer readable storage medium

After the server's RAID card fails, disk letters are formed and generated in a specific order, the problem of disk array letter exchange is solved, ensuring the normal operation of the server and the user's convenience.

CN119473701APending Publication Date: 2025-02-18INSPUR (SHANDONG) COMPUTER TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411595434.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-08
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

After the server's RAID card fails, the drive letters of the two disk arrays formed may be exchanged, resulting in inconvenient use or affecting the normal operation of the server.

Method used

When the RAID card type of the target server is a specified fault type, determine the configuration parameters of the disk array to be grouped in the first order and the second order, and form and generate drive letters in a specific order, so that the RAID card can naturally swap disks. talisman, forming the drive letter that was originally intended to be generated.

Benefits of technology

Ensure that users can use the disk array according to the correct drive letters and ensure the normal operation of the server, avoiding inconvenience and potential server failures caused by drive letter errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119473701A_ABST
    Figure CN119473701A_ABST
Patent Text Reader

Abstract

The invention discloses a drive correction method, a drive correction device, drive correction equipment and a computer readable storage medium, and belongs to the field of storage. The method comprises the following steps: firstly, according to a disk array configuration file of a target server, determining building parameters of a to-be-assembled disk array in a first sequence and building parameters of a to-be-assembled disk array in a second sequence, and then according to the building parameters of the to-be-assembled disk array in the second sequence, building the to-be-assembled disk array in the target server; according to the RAID card of the target server, a to-be-assembled disk array is established and a drive letter is generated for the established to-be-assembled disk array, then according to the establishment parameters of the to-be-assembled disk array in the first order, a to-be-assembled disk array is established and a drive letter is generated for the established to-be-assembled disk array, and the RAID card of the target server can naturally interchange the drive letters of the two to-be-assembled disk arrays. Therefore, the drive to be generated originally is formed, a user can correctly use the disk array according to the drive, and normal operation of the server is also ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of storage, and in particular to a drive letter correction method, device, equipment and computer-readable storage medium. Background Art

[0002] The server may need to build a disk array through a RAID (Redundant Array of Independent Disks) card. In most cases, the server may need to build two disk arrays. The RAID card usually assigns drive letters to the two disk arrays according to fixed rules. However, in the event of a certain failure of the RAID card, after the two disk arrays are built and the server is restarted, the drive letters of the two disk arrays will be swapped, which may cause inconvenience at best and may affect the normal operation of the server at worst.

[0003] Therefore, how to provide a solution to the above technical problems is a problem that those skilled in the art need to solve at present. Summary of the invention

[0004] The purpose of the present invention is to provide a drive letter correction method, device, equipment and computer-readable storage medium. When the type of the RAID card of the target server is a specified fault type, first determine: the assembly parameters of the disk array to be assembled in the first order and the assembly parameters of the disk array to be assembled in the second order, then first assemble a disk array to be assembled according to the assembly parameters of the disk array to be assembled in the second order and generate a drive letter for the assembled disk array to be assembled, then assemble a disk array to be assembled according to the assembly parameters of the disk array to be assembled in the first order and generate a drive letter for the assembled disk array to be assembled, the RAID card of the target server can naturally interchange the drive letters of the two disk arrays to be assembled, thereby forming the drive letter originally intended to be generated, so that the user can correctly use the disk array according to the drive letter, and the normal operation of the server is also guaranteed.

[0005] In order to solve the above technical problems, the present invention provides a drive letter correction method, comprising:

[0006] If the type of the independent disk redundant array card of the target server is the specified fault type, determine: the first order of the disk array to be assembled and the second order of the disk array to be assembled according to the disk array configuration file of the target server, wherein the disk array configuration file refers to: a configuration file for assembling a disk array, the first order and the second order refer to: the assembly order of the disk array to be assembled specified in the disk array configuration file, and the assembly parameters include: the type of the independent disk redundant array, the required number of disks, and the start and end slot information of the disks;

[0007] According to the building parameters of the disk array to be built in the second order, a disk array to be built is built and a drive letter is generated for the built disk array to be built;

[0008] After the disk array is constructed according to the construction parameters of the disk array to be constructed in the second order, a disk array to be constructed is constructed according to the construction parameters of the disk array to be constructed in the first order and a drive letter is generated for the constructed disk array to be constructed.

[0009] On the other hand, according to the disk array configuration file of the target server, it is determined that the construction parameters of the disk array to be assembled in the first order and the construction parameters of the disk array to be assembled in the second order include:

[0010] Obtaining first configuration information and second configuration information in a disk array configuration file of a target server, wherein the first configuration information refers to configuration information for forming a disk array to be formed in a first sequence, and the second configuration information refers to configuration information for forming a disk array to be formed in a second sequence;

[0011] Exchanging the first target parameters in the first configuration information and the second configuration information, wherein the first target parameters refer to: the type of the redundant array of independent disks and the required number of disks;

[0012] Determine a second target parameter of the disk array to be assembled in the second order according to the required number of disks in the first configuration information and the required number of disks in the second configuration information, wherein the second target parameter refers to: disk start and end slot information;

[0013] Determine a second target parameter of the first order disk array to be assembled according to the required number of disks in the second configuration information;

[0014] The second target parameter of the disk array to be assembled in the second order and the first target parameter in the first configuration information are used together as the assembly parameters of the disk array to be assembled in the second order;

[0015] The second target parameter of the disk array to be assembled in the first order and the first target parameter in the second configuration information are used together as the assembly parameters of the disk array to be assembled in the first order.

[0016] On the other hand, according to the required number of disks in the first configuration information and the required number of disks in the second configuration information, determining the second target parameter of the disk array to be assembled in the second order includes:

[0017] The required number of disks in the second configuration information is used as the starting slot number of the disk of the disk array to be assembled in the second order;

[0018] Subtract one from the sum of the disk start slot number of the disk array to be assembled in the second order and the disk requirement quantity in the first configuration information to obtain the disk end slot number of the disk array to be assembled in the second order;

[0019] The disk start and end slot information includes the disk start slot number and the disk end slot number.

[0020] On the other hand, according to the required number of disks in the second configuration information, determining the second target parameter of the disk array to be assembled in the first order includes:

[0021] The zeroth slot number is used as the starting slot number of the disk of the disk array to be assembled in the first order;

[0022] The result of subtracting one from the required number of disks in the second configuration information is used as the disk termination slot number of the disk array to be assembled in the first order;

[0023] The disk start and end slot information includes the disk start slot number and the disk end slot number.

[0024] On the other hand, after a disk array to be assembled is assembled according to the assembly parameters of the disk array to be assembled in the first order and a drive letter is generated for the assembled disk array to be assembled, the drive letter correction method further includes:

[0025] According to the disk array configuration file of the target server, determine whether the target server needs to build a cache disk array;

[0026] If necessary, a cache disk array is built based on the disks in the target server that are not involved in building the disk array.

[0027] On the other hand, after a disk array to be assembled is assembled according to the assembly parameters of the disk array to be assembled in the first order and a drive letter is generated for the assembled disk array to be assembled, the drive letter correction method further includes:

[0028] Controlling the target server to restart so that the disk array to be formed takes effect;

[0029] Determine whether the drive letters of the disk array to be grouped in the first order and the disk array to be grouped in the second order are both correct;

[0030] If all are correct, then end;

[0031] If there is an error, the control prompter will prompt the error.

[0032] On the other hand, if the type of the independent disk redundant array card of the target server is the specified fault type, it is determined according to the disk array configuration file of the target server that the construction parameters of the disk array to be formed in the first order and the construction parameters of the disk array to be formed in the second order include:

[0033] Get the type of independent disk redundant array card of the target server;

[0034] Determine whether the type of the independent disk redundant array card of the target server is a specified failure type;

[0035] If the fault type is specified, determining, according to the disk array configuration file of the target server: the building parameters of the disk array to be built in the first order and the building parameters of the disk array to be built in the second order;

[0036] If the fault type is not specified, the disk array is constructed according to the disk array configuration file of the target server and the default process of constructing the disk array in the target server.

[0037] In order to solve the above technical problems, the present invention further provides a drive letter correction device, comprising:

[0038] A first determination module is used to determine, if the type of the independent disk redundant array card of the target server is a specified fault type, the first order of the disk array to be assembled and the second order of the disk array to be assembled according to the disk array configuration file of the target server, wherein the disk array configuration file refers to: a configuration file for assembling a disk array, the first order and the second order refer to: the assembly order of the disk array to be assembled specified in the disk array configuration file, and the assembly parameters include: the type of the independent disk redundant array, the required number of disks, and the start and end slot information of the disks;

[0039] A first building module is used to build a disk array to be built according to the building parameters of the disk array to be built in the second order and generate a drive letter for the built disk array to be built;

[0040] The second assembly module is used to assemble a disk array to be assembled according to the assembly parameters of the disk array to be assembled in the second order and generate a drive letter for the assembled disk array to be assembled according to the assembly parameters of the disk array to be assembled in the first order after the disk array is assembled according to the assembly parameters of the disk array to be assembled in the second order.

[0041] In order to solve the above technical problems, the present invention further provides a drive letter correction device, comprising:

[0042] Memory for storing computer programs;

[0043] The processor is used to implement the steps of the drive letter correction method described above when executing the computer program.

[0044] In order to solve the above technical problem, the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the drive letter correction method described above are implemented.

[0045] Beneficial effect: The present invention provides a drive letter correction method. Considering that (1) the generation of the drive letters of the disk array corresponds to the assembly order of the disk array and (2) after the faulty RAID card has assembled the disk array, the drive letters generated in succession will be interchanged. Therefore, when the type of the RAID card of the target server is the specified fault type, the present invention first determines according to the disk array configuration file of the target server: the assembly parameters of the first-order disk array to be assembled and the assembly parameters of the second-order disk array to be assembled, and then first assembles a disk array to be assembled according to the assembly parameters of the second-order disk array to be assembled and generates a drive letter for the assembled disk array to be assembled, and then assembles another disk array to be assembled according to the assembly parameters of the first-order disk array to be assembled and generates a drive letter for the assembled disk array to be assembled. The RAID card of the target server can naturally interchange the drive letters of the two disk arrays to be assembled, thereby forming the drive letter originally intended to be generated, so that the user can use the disk array correctly according to the drive letter, and the normal operation of the server is also guaranteed.

[0046] The present invention also provides a drive letter correction method device, equipment and computer-readable storage medium, which have the same beneficial effects as the above drive letter correction method. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the relevant technologies and the drawings required for use in the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0048] Figure 1 A schematic diagram of a process flow of a drive letter correction method provided by the present invention;

[0049] Figure 2 A corresponding relationship diagram between a disk array and disk slots provided by the present invention;

[0050] Figure 3 A corresponding relationship diagram between another disk array and disk slots provided by the present invention;

[0051] Figure 4 A schematic flow chart of another drive letter correction method provided by the present invention;

[0052] Figure 5 A schematic diagram of the structure of a drive letter correction device provided by the present invention;

[0053] Figure 6 A schematic diagram of the structure of a drive letter correction device provided by the present invention;

[0054] Figure 7A schematic diagram of the structure of a computer-readable storage medium provided by the present invention. DETAILED DESCRIPTION

[0055] The core of the present invention is to provide a drive letter correction method, device, equipment and computer-readable storage medium. When the type of the RAID card of the target server is a specified fault type, first determine: the assembly parameters of the first-order disk array to be assembled and the assembly parameters of the second-order disk array to be assembled, then first assemble a disk array to be assembled according to the assembly parameters of the second-order disk array to be assembled and generate a drive letter for the assembled disk array to be assembled, and then assemble a disk array to be assembled according to the assembly parameters of the first-order disk array to be assembled and generate a drive letter for the assembled disk array to be assembled. The RAID card of the target server can naturally interchange the drive letters of the two disk arrays to be assembled, thereby forming the drive letter originally intended to be generated, so that the user can correctly use the disk array according to the drive letter, and the normal operation of the server is also guaranteed.

[0056] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0057] Please refer to Figure 1 , Figure 1 A flowchart of a drive letter correction method provided by the present invention is provided, and the drive letter correction method comprises:

[0058] S101: If the type of the independent disk redundant array card of the target server is the specified fault type, determine: the first order of the disk array to be assembled and the second order of the disk array to be assembled according to the disk array configuration file of the target server, wherein the disk array configuration file refers to: a configuration file for assembling a disk array, the first order and the second order refer to: the assembly order of the disk array to be assembled specified in the disk array configuration file, and the assembly parameters include: the type of the independent disk redundant array, the required number of disks, and the start and end slot information of the disks;

[0059] Specifically, considering the technical problems in the above background technology, and considering (1) that the generation of the drive letters of the disk array corresponds to the order in which the disk array is assembled, and (2) that after the faulty RAID card completes the assembly of the disk array, the drive letters generated in succession will be interchanged. Therefore, in the embodiment of the present invention, the second-order disk array to be assembled is first constructed, and then the first-order disk array to be assembled is constructed. In this way, since "a specific fault of the RAID card will cause the drive letters of the two assembled disk arrays to be interchanged after the server is restarted", when this type of RAID card is used, the "exchange of drive letters" will instead restore the drive letters of the two disk arrays to the ideal drive letters, that is, the drive letter corresponding to the first-order disk array to be assembled is the first-order drive letter sda, and the drive letter corresponding to the second-order disk array to be assembled is the second-order drive letter sdb.

[0060] Among them, it is worth mentioning that when the RAID card is assembling disks, the drive letter generated for the first disk array is sda, and the drive letter generated for the second disk array is sdb.

[0061] Specifically, the specified fault type refers to a RAID card type having a specific fault (ie, a fault that can cause the drive letters of two established disk arrays to be swapped after the server is restarted).

[0062] Specifically, considering that no matter which order the disk array to be assembled is assembled, the assembly process requires the support of assembly parameters, and the assembly parameters include the type of independent disk redundant array, the required number of disks, and the disk start and end slot information, and the disk array configuration file of the target server has these assembly parameters, so in the embodiment of the present invention, firstly, when the type of independent disk redundant array card of the target server is a specified fault type, according to the disk array configuration file of the target server, the assembly parameters of the disk array to be assembled in the first order and the assembly parameters of the disk array to be assembled in the second order can be determined, and used as the data basis for subsequent steps.

[0063] S102: According to the building parameters of the disk array to be built in the second order, a disk array to be built is built and a drive letter is generated for the built disk array to be built;

[0064] Specifically, based on the above principles, the embodiment of the present invention can first build a second-order disk array to be built according to the building parameters of the second-order disk array to be built, and generate a drive letter for the built disk array to be built. It is worth mentioning that since it is the first disk array to be built, the drive letter generated for it is usually the drive letter of the first order, that is, sda.

[0065] S103: After the disk array is constructed according to the construction parameters of the disk array to be constructed in the second order, a disk array to be constructed is constructed according to the construction parameters of the disk array to be constructed in the first order and a drive letter is generated for the constructed disk array to be constructed.

[0066] Specifically, after the second-order disk array to be assembled is constructed, a disk array to be assembled can be constructed according to the construction parameters of the first-order disk array to be assembled and a drive letter can be generated for the constructed disk array to be assembled, that is, the first-order disk array to be assembled is constructed. Since it is the second disk array to be assembled, the drive letter generated for it is usually the second-order drive letter, that is, sdb.

[0067] Specifically, since the type of RAID card in the target server belongs to the specified fault type, that is, the two disk arrays formed by the RAID card will have their drive letters swapped after the target server is restarted. Since the embodiment of the present invention has already "changed the formation order" so that the "drive letter before the server restart" of the second-order disk array to be formed is the first-order drive letter sda, and the "drive letter before the server restart" of the first-order disk array to be formed is the second-order drive letter sdb, after the target server is restarted, due to the drive letter swapping action caused by the "RAID fault", the drive letter of the first-order disk array to be formed will naturally become the first-order drive letter sda, and the drive letter of the second-order disk array to be formed will become the second-order drive letter sdb, that is, the actual drive letters of the two disk arrays are kept consistent with the expected drive letters, so that the user can accurately use the corresponding disk array according to the expected drive letters, and the target server can access the correct disk array through the drive letters, thereby ensuring the normal operation of the server.

[0068] In addition, it is worth mentioning that the impact of drive letter errors is significant. For example, when the operating system needs to be installed on a server with a disk array through PXE technology, since PXE technology installs the operating system in the disk array corresponding to the first-order drive letter sda by default, when a drive letter swap error occurs, the operating system will be mistakenly installed in the second-order disk array through PXE technology, causing the operating system to be installed on the wrong disk.

[0069] Among them, PXE (Preboot eXecuion Environment) provides a mechanism for starting a computer using a network interface (Network Interface). With the development of computer networks and the popularization of virtualization technology, PXE has become a popular startup method, widely used in scenarios such as diskless workstations, server deployment, and system recovery, simplifying the complexity of large-scale system management and maintenance. This mechanism allows the computer to start without relying on local database storage devices (such as hard disks) or locally installed operating systems. PXE technology can install Linux operating systems in batches on servers, which is an efficient system deployment technology. Batch installation requires the configuration of a kickstart file, and the default installation drive letter set in the kickstart file is sda.

[0070] The present invention provides a drive letter correction method. Considering that (1) the generation of drive letters of a disk array corresponds to the assembly order of the disk array and (2) after a faulty RAID card has assembled the disk array, the drive letters generated in succession will be interchanged. Therefore, when the type of the RAID card of a target server is a specified fault type, the present invention first determines, according to the disk array configuration file of the target server: the assembly parameters of the first-order disk array to be assembled and the assembly parameters of the second-order disk array to be assembled. Then, according to the assembly parameters of the second-order disk array to be assembled, a disk array to be assembled is assembled and a drive letter is generated for the assembled disk array to be assembled. Then, according to the assembly parameters of the first-order disk array to be assembled, a disk array to be assembled is assembled and a drive letter is generated for the assembled disk array to be assembled. The RAID card of the target server can naturally interchange the drive letters of the two disk arrays to be assembled, thereby forming the drive letter originally intended to be generated, so that the user can correctly use the disk array according to the drive letter, and the normal operation of the server is also guaranteed.

[0071] Based on the above embodiments:

[0072] As an optional embodiment, the following are determined according to the disk array configuration file of the target server: the first order of the disk array to be assembled and the second order of the disk array to be assembled include:

[0073] Obtaining first configuration information and second configuration information in a disk array configuration file of a target server, wherein the first configuration information refers to configuration information for forming a disk array to be formed in a first sequence, and the second configuration information refers to configuration information for forming a disk array to be formed in a second sequence;

[0074] Exchanging the first target parameters in the first configuration information and the second configuration information, wherein the first target parameters refer to: the type of the redundant array of independent disks and the required number of disks;

[0075] Determine the second target parameter of the disk array to be assembled in the second order according to the required number of disks in the first configuration information and the required number of disks in the second configuration information, wherein the second target parameter refers to: disk start and end slot information;

[0076] Determine a second target parameter of the first order disk array to be assembled according to the required number of disks in the second configuration information;

[0077] The second target parameter of the disk array to be assembled in the second order and the first target parameter in the first configuration information are used together as the assembly parameters of the disk array to be assembled in the second order;

[0078] The second target parameter of the disk array to be assembled in the first order and the first target parameter in the second configuration information are used together as the assembly parameter of the disk array to be assembled in the first order.

[0079] Specifically, considering that the disk array configuration file of the target server itself has configuration information of two disk arrays to be assembled, namely, the first configuration information and the second configuration information, the RAID card needs to assemble the disk array according to the two configuration information. By modifying the two configuration information, the RAID card can continue to use the two configuration information to assemble the disk array, thereby improving work efficiency by utilizing existing data. Considering that both the first configuration information and the second configuration information have the first target parameter in the assembly parameters (that is, the type of independent disk redundant array and the required number of disks), the embodiment of the present invention can first obtain the first configuration information and the second configuration information in the disk array configuration file of the target server, and then exchange the first target parameters in the first configuration information and the second configuration information, so that the first configuration information has the first target parameter of the disk array to be assembled in the second order, and the second configuration information has the first target parameter of the disk array to be assembled in the first order, so as to use them as the data basis for subsequent steps.

[0080] Among them, it is worth mentioning that under normal circumstances, the RAID card first forms a first disk array according to the first configuration information (corresponding to the disk array to be formed in the first order), and then forms a second disk array according to the second configuration information (corresponding to the disk array to be formed in the second order). Therefore, in the embodiment of the present invention, by exchanging the first target parameters in the two configuration information, the RAID card can use the first configuration information and the second configuration information in the original order.

[0081] Specifically, considering that the assembly parameters include the second target parameter in addition to the first target parameter, namely, the disk start and end slot information, and the disk start and end slot information is not in the configuration information but is related to the required number of disks of the two disk arrays to be assembled, the embodiments of the present invention can (1) determine the second target parameter of the disk array to be assembled in the second order according to the required number of disks in the first configuration information and the required number of disks in the second configuration information, and (2) determine the second target parameter of the disk array to be assembled in the first order according to the required number of disks in the second configuration information, that is, respectively determine the second target parameters of the disk arrays to be assembled in the first order and the second order. At this point, the disk arrays to be assembled in the first order and the second order both have the assembly parameters (including the first target parameter and the second target parameter), and the RAID card can first use the first configuration information to assemble the disk array to be assembled in the second order, and then use the second configuration information to assemble the disk array to be assembled in the first order in the original order, thereby reducing the changes to the original program and improving work efficiency.

[0082] Among them, the disk array configuration file can be located in the configuration file of the server's production line process, for example, it can be a file named PICI.INI, PRIMARY_RAID in the file can be the first configuration information, SECINDARY_RAID can be the second configuration information, and the type of RAID can be multiple, for example, it can be RAID0, RAID1, RAID5 or RAID10, etc., which is not limited in the embodiment of the present invention.

[0083] As an optional embodiment, determining the second target parameter of the disk array to be assembled in the second order according to the required number of disks in the first configuration information and the required number of disks in the second configuration information includes:

[0084] The required number of disks in the second configuration information is used as the starting slot number of the disk of the disk array to be assembled in the second order;

[0085] Subtract one from the sum of the disk start slot number of the disk array to be assembled in the second order and the disk requirement quantity in the first configuration information to obtain the disk end slot number of the disk array to be assembled in the second order;

[0086] The disk start and end slot information includes the disk start slot number and the disk end slot number.

[0087] Specifically, in order to better illustrate the embodiments of the present invention, please refer to Figure 2 , Figure 2 A corresponding relationship diagram between a disk array and a disk slot provided by the present invention, Figure 2First, there are 7 disk slots from slot 0 to slot 6. The number of disks required for the first order disk array to be assembled is 2, and the number of disks required for the second order disk array to be assembled is 3. That is, the first order disk array to be assembled theoretically needs to use the disks in slots 0 and 1, and the second order disk array to be assembled theoretically needs to use the disks in slots 2 to 4. In order to determine the disk start and end slot information of the second order disk array to be assembled, considering that the disks from slot 0 of the first order disk array to be assembled are used in sequence, the disk start slot number of the second order disk array to be assembled is theoretically That is, it is equal to the required number of disks of the disk array to be grouped in the first order. Therefore, in the embodiment of the present invention, the required number of disks in the second configuration information (at this time, it actually refers to the required number of disks of the disk array to be grouped in the first order) can be used as the starting slot number of the disk of the disk array to be grouped in the second order, and the ending slot number of the disk of the disk array can be expressed by the sum of the starting slot number of the disk and the required number of disks minus one. Therefore, in the embodiment of the present invention, the sum of the starting slot number of the disk array to be grouped in the second order and the required number of disks in the first configuration information can be subtracted by one to obtain the ending slot number of the disk of the disk array to be grouped in the second order.

[0088] Specifically, in the embodiment of the present invention, the required number of disks is called from the first configuration information and the second configuration information, and then a simple addition and subtraction operation is performed to obtain the second target parameter of the disk array to be assembled in the second order. The data processing flow is simple, which is conducive to improving work efficiency.

[0089] Of course, in addition to this method, other methods may be used to "determine the second target parameter of the disk array to be assembled in the second order according to the required number of disks in the first configuration information and the required number of disks in the second configuration information", which is not limited in the embodiment of the present invention.

[0090] As an optional embodiment, determining the second target parameter of the disk array to be assembled in the first order according to the required number of disks in the second configuration information includes:

[0091] The zeroth slot number is used as the starting slot number of the disk of the disk array to be assembled in the first order;

[0092] The result of subtracting one from the required number of disks in the second configuration information is used as the disk termination slot number of the disk array to be assembled in the first order;

[0093] The disk start and end slot information includes the disk start slot number and the disk end slot number.

[0094] Specifically, considering that the first-order disk array to be assembled usually starts to be used from the disk in the 0th slot, in an embodiment of the present invention, the 0th slot number can be used as the starting slot number of the disks of the first-order disk array to be assembled, and because the ending slot number of the disks of the disk array can be represented by the sum of the starting slot number of the disks and the required number of disks minus one, in an embodiment of the present invention, the result of subtracting one from the required number of disks in the second configuration information can be used as the ending slot number of the disks of the first-order disk array to be assembled.

[0095] Among them, in the embodiment of the present invention, by obtaining the required number of disks from the second configuration information and performing a subtraction operation, the second target parameter of the first-order disk array to be assembled can be determined, which is conducive to further simplifying the data processing process and improving work efficiency.

[0096] Of course, in addition to this specific form, "determining the second target parameter of the first-order disk array to be assembled according to the required number of disks in the second configuration information" can also be performed in many other ways, which are not limited in this embodiment of the present invention.

[0097] As an optional embodiment, after a disk array to be assembled is assembled according to the assembly parameters of the disk array to be assembled in the first order and a drive letter is generated for the assembled disk array to be assembled, the drive letter correction method further includes:

[0098] According to the disk array configuration file of the target server, determine whether the target server needs to build a cache disk array;

[0099] If necessary, a cache disk array is built based on the disks in the target server that are not involved in building the disk array.

[0100] Specifically, in order to better illustrate the embodiments of the present invention, please refer to Figure 3 , Figure 3 Another disk array and disk slot correspondence diagram provided by the present invention. Considering that in addition to the conventional disk array, a cache disk array may be planned to be built in the target server, in order to more completely build the disk array, in the embodiment of the present invention, after building the first order of disk arrays to be built, it can be determined whether the target server needs to build a cache disk array according to the disk array configuration file of the target server. If necessary, a cache disk array can be built based on the disks in the target server that are not involved in building the disk array. For example, Figure 3 The disks in slots 5 and 6 can be used to form a cache disk array, thereby meeting the disk array building requirements of the target server.

[0101] In addition, it is worth mentioning that the number of disks required for the disk array to be assembled can include the sum of the basic required number of disks and the hot spare disk required number. The hot spare disk required number is usually 1, and the basic required number of disks refers to the number of disks required to build the disk array to be assembled without considering the hot spare disk. For example, the disk array configuration file of the target server stipulates that a certain disk array to be assembled requires hot spare disks, and the basic required number of disks of the disk array to be assembled is X, then the number of disks required for the disk array to be assembled can be X+1, for example Figure 2 The basic number of disks required for the disk array to be assembled in the second order is 3, and a hot spare disk is required. Therefore, the number of disks required for the disk array to be assembled in the second order can be 3+1=4.

[0102] The information of whether the disk array to be formed needs a hot spare disk and whether a cache disk array needs to be formed in the target server can be set in the disk array configuration file.

[0103] Specifically, in order to better illustrate the embodiments of the present invention, please refer to Figure 4 , Figure 4 A flow chart of another drive letter correction method provided by the present invention, after the process starts, a disk array configuration file can be obtained, and then the first configuration information and the second configuration information can be obtained, and then the first target parameters in the first configuration information and the second configuration information can be exchanged, and then the second target parameters of the two disk arrays to be grouped can be determined, thereby forming complete assembly parameters of the two disk arrays to be grouped, and then the second-order disk array to be grouped can be assembled first, and then the first-order disk array to be grouped can be assembled, after which it can be determined whether a cache disk array is needed, and if so, a cache disk array can be constructed, and then after the server is restarted, the drive letters of the two disk arrays to be grouped can be exchanged, and if not, the server can be directly restarted, and since the disk array with the correct drive letter has been assembled, the operating system can be installed through the pre-execution environment PXE.

[0104] As an optional embodiment, after a disk array to be assembled is assembled according to the assembly parameters of the disk array to be assembled in the first order and a drive letter is generated for the assembled disk array to be assembled, the drive letter correction method further includes:

[0105] Control the target server to restart so that the disk array to be assembled can take effect;

[0106] Determine whether the drive letters of the first-order disk array to be assembled and the second-order disk array to be assembled are correct;

[0107] If all are correct, then end;

[0108] If there is an error, the control prompter will prompt the error.

[0109] Specifically, in order to make the disk array to be assembled effective and to facilitate the verification of the drive letter of the disk array to be assembled, in the embodiment of the present invention, the target server can be controlled to restart so that the disk array to be assembled can take effect, and then it is determined whether the drive letters of the disk array to be assembled in the first sequence and the disk array to be assembled in the second sequence are both correct (that is, the drive letter of the disk array to be assembled in the first sequence is the drive letter of the first sequence, and the drive letter of the disk array to be assembled in the second sequence is the drive letter of the second sequence). If both are correct, the verification can be terminated. If there is an error, the prompter can be controlled to prompt the error, so that the staff can repair the error.

[0110] In addition, considering that for a server with a RAID card of a specified fault type, after the disk array to be assembled is formed, more than one restart action may trigger the exchange of drive letters, or generate other errors other than drive letters. Therefore, in order to ensure that the target server can have a stable and accurate disk array, in an embodiment of the present invention, after the target server is restarted for the first time, a preset number of restart actions of the target server can be performed, and after the target server is restarted any time, a correctness check is performed on the corresponding disk array according to the assembly parameters (that is, according to the assembly parameters of the disk array to be assembled in the first order, verify whether the RAID type, the number of disks, and the start and end slot information of the disk array to be assembled in the first order are correct, and according to the assembly parameters of the disk array to be assembled in the second order, verify whether the RAID type, the number of disks, and the start and end slot information of the disk array to be assembled in the second order are correct). If the target server passes the "correctness check" each time during the preset number of restart actions, then it can be determined that the disk array is correct. If the target server fails to pass the "correctness check" before the number of restarts reaches the preset number, then it can be determined that the disk array is wrong, and the specific error content is prompted.

[0111] As an optional embodiment, if the type of the independent disk redundant array card of the target server is a specified fault type, it is determined according to the disk array configuration file of the target server that the construction parameters of the disk array to be formed in the first order and the construction parameters of the disk array to be formed in the second order include:

[0112] Get the type of independent disk redundant array card of the target server;

[0113] Determine whether the type of the independent disk redundant array card of the target server is a specified failure type;

[0114] If the fault type is specified, determining, according to the disk array configuration file of the target server: the building parameters of the disk array to be built in the first order and the building parameters of the disk array to be built in the second order;

[0115] If the fault type is not specified, the disk array is constructed according to the disk array configuration file of the target server and the default process of constructing the disk array in the target server.

[0116] Specifically, considering that there may be multiple types of RAID cards in the servers to be shipped, in order to make a set of processing methods applicable to servers with different types of RAID cards, in the embodiment of the present invention, it can be determined whether the type of independent disk redundant array card of the target server is a specified fault type. If it is a specified fault type, the "disk array assembly process corresponding to the RAID card with a specific fault" can be executed, that is, according to the disk array configuration file of the target server, determine: the assembly parameters of the disk array to be assembled in the first order and the assembly parameters of the disk array to be assembled in the second order; if it is not a specified fault type, the disk array can be assembled according to the disk array configuration file of the target server and the default process for assembling the disk array in the target server. That is, the default process for assembling the disk array in the target server will not be changed in the embodiment of the present invention, but a set of "disk array assembly process corresponding to the RAID card with a specific fault" is added, so that the drive letter correction method can be applicable to servers with different types of RAID cards.

[0117] Please refer to Figure 5 , Figure 5 A schematic diagram of the structure of a drive letter correction device provided by the present invention, the drive letter correction device comprises:

[0118] The first determination module 51 is used to determine, if the type of the independent disk redundant array card of the target server is the specified fault type, the first order of the disk array to be assembled and the second order of the disk array to be assembled according to the disk array configuration file of the target server, wherein the disk array configuration file refers to: a configuration file for assembling a disk array, the first order and the second order refer to: the assembly order of the disk array to be assembled specified in the disk array configuration file, and the assembly parameters include: the type of the independent disk redundant array, the required number of disks, and the disk start and end slot information;

[0119] A first forming module 52 is used to form a disk array to be formed according to the forming parameters of the disk array to be formed in the second order and generate a drive letter for the formed disk array to be formed;

[0120] The second building module 53 is used to build a disk array to be built according to the building parameters of the disk array to be built in the second order and generate a drive letter for the built disk array to be built according to the building parameters of the disk array to be built in the first order after the disk array is built according to the building parameters of the disk array to be built in the second order.

[0121] Based on the above embodiments:

[0122] As an optional embodiment, the first determining module 51 includes:

[0123] A first acquisition module is used to acquire first configuration information and second configuration information in a disk array configuration file of a target server, wherein the first configuration information refers to configuration information for forming a disk array to be formed in a first sequence, and the second configuration information refers to configuration information for forming a disk array to be formed in a second sequence;

[0124] A first action module is used to exchange the first target parameter in the first configuration information with the first target parameter in the second configuration information, wherein the first target parameter refers to: the type of the redundant array of independent disks and the required number of disks;

[0125] A second determination module is used to determine a second target parameter of the disk array to be assembled in a second order according to the required number of disks in the first configuration information and the required number of disks in the second configuration information, wherein the second target parameter refers to: disk start and end slot information;

[0126] A third determination module, configured to determine a second target parameter of the disk array to be assembled in the first order according to the required number of disks in the second configuration information;

[0127] A second action module is used to use the second target parameter of the disk array to be assembled in the second order and the first target parameter in the first configuration information as the assembly parameter of the disk array to be assembled in the second order;

[0128] The third action module is used to use the second target parameter of the disk array to be assembled in the first order and the first target parameter in the second configuration information as the assembly parameter of the disk array to be assembled in the first order.

[0129] As an optional embodiment, the first building module 52 includes:

[0130] A fourth action module is used to use the required number of disks in the second configuration information as the starting slot number of the disk of the disk array to be assembled in the second order;

[0131] A fifth action module is used to obtain the disk ending slot number of the disk array to be assembled in the second order by subtracting one from the sum of the disk starting slot number of the disk array to be assembled in the second order and the disk required quantity in the first configuration information;

[0132] The disk start and end slot information includes the disk start slot number and the disk end slot number.

[0133] As an optional embodiment, the second building module 53 includes:

[0134] A fourth determining module is used to use the zeroth slot number as the starting slot number of the disk of the disk array to be grouped in the first order;

[0135] A fifth determining module, configured to use the result of subtracting one from the required number of disks in the second configuration information as the disk termination slot number of the disk array to be assembled in the first order;

[0136] The disk start and end slot information includes the disk start slot number and the disk end slot number.

[0137] As an optional embodiment, the drive letter correction device further includes:

[0138] A first judgment module is used to judge whether the target server needs to build a cache disk array according to the disk array configuration file of the target server, and if so, trigger a sixth action module;

[0139] The sixth action module is used to build a cache disk array based on the disks in the target server that are not involved in building the disk array.

[0140] As an optional embodiment, the drive letter correction device further includes:

[0141] The seventh action module is used to control the target server to restart so that the disk array to be formed takes effect;

[0142] The second judgment module is used to judge whether the drive letters of the disk array to be grouped in the first sequence and the disk array to be grouped in the second sequence are both correct. If they are both correct, the end module is triggered; if there is an error, the prompt module is triggered;

[0143] End module, used for ending;

[0144] The prompt module is used to control the prompter to prompt errors.

[0145] As an optional embodiment, the first determining module 51 includes:

[0146] An eighth action module is used to obtain the type of the redundant array of independent disks card of the target server;

[0147] A third judgment module is used to judge whether the type of the independent disk redundant array card of the target server is a specified fault type, and if it is a specified fault type, the first determination submodule is triggered; if it is not a specified fault type, the ninth action module is triggered;

[0148] A first determination submodule is used to determine, according to the disk array configuration file of the target server: the construction parameters of the disk array to be assembled in the first order and the construction parameters of the disk array to be assembled in the second order;

[0149] The ninth action module is used to build a disk array according to the disk array configuration file of the target server and the default process of building a disk array in the target server.

[0150] For an introduction to the drive letter correction device provided in the embodiment of the present invention, please refer to the aforementioned embodiment of the drive letter correction method, and the embodiment of the present invention will not be described in detail here.

[0151] Please refer to Figure 6 , Figure 6 A schematic diagram of the structure of a drive letter correction device provided by the present invention, the drive letter correction device comprises:

[0152] A memory 61, used for storing computer programs;

[0153] The processor 62 is used to implement the steps of the drive letter correction method in the above embodiment when executing the computer program.

[0154] For an introduction to the drive letter correction device provided in an embodiment of the present invention, please refer to the aforementioned embodiment of the drive letter correction method, and the embodiment of the present invention will not be described in detail here.

[0155] Please refer to Figure 7 , Figure 7 This is a schematic diagram of the structure of a computer-readable storage medium provided by the present invention. A computer program 72 is stored on the computer-readable storage medium 71. When the computer program 72 is executed by the processor, the steps of the drive letter correction method in the aforementioned embodiment are implemented.

[0156] For an introduction to the computer-readable storage medium provided in an embodiment of the present invention, please refer to the aforementioned embodiment of the drive letter correction method, and the embodiment of the present invention will not be described in detail here.

[0157] The embodiment of the present invention further provides a computer program product, including a computer program / instruction, which implements the steps of the drive letter correction method in the above embodiment when executed by a processor.

[0158] For an introduction to the computer program product provided by the embodiment of the present invention, please refer to the aforementioned embodiment of the drive letter correction method, and the embodiment of the present invention will not be described in detail here.

[0159] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same and similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description. It should also be noted that in this specification, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the term "include", "comprise" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or equipment including a series of elements includes not only those elements, but also includes other elements that are not explicitly listed, or also includes elements inherent to such process, method, article or equipment. In the absence of more restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the process, method, article or equipment including the element.

[0160] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A drive letter correction method, characterized in that: include: If the type of the independent disk redundant array card of the target server is the specified fault type, determine: the first order of the disk array to be assembled and the second order of the disk array to be assembled according to the disk array configuration file of the target server, wherein the disk array configuration file refers to: a configuration file for assembling a disk array, the first order and the second order refer to: the assembly order of the disk array to be assembled specified in the disk array configuration file, and the assembly parameters include: the type of the independent disk redundant array, the required number of disks, and the start and end slot information of the disks; According to the building parameters of the disk array to be built in the second order, a disk array to be built is built and a drive letter is generated for the built disk array to be built; After the disk array is constructed according to the construction parameters of the disk array to be constructed in the second order, a disk array to be constructed is constructed according to the construction parameters of the disk array to be constructed in the first order and a drive letter is generated for the constructed disk array to be constructed.

2. The drive letter correction method according to claim 1, characterized in that: According to the disk array configuration file of the target server, the parameters of the disk array to be assembled in the first order and the parameters of the disk array to be assembled in the second order are determined as follows: Obtaining first configuration information and second configuration information in a disk array configuration file of a target server, wherein the first configuration information refers to configuration information for forming a disk array to be formed in a first sequence, and the second configuration information refers to configuration information for forming a disk array to be formed in a second sequence; Exchanging the first target parameters in the first configuration information and the second configuration information, wherein the first target parameters refer to: the type of the redundant array of independent disks and the required number of disks; Determine a second target parameter of the disk array to be assembled in the second order according to the required number of disks in the first configuration information and the required number of disks in the second configuration information, wherein the second target parameter refers to: disk start and end slot information; Determine a second target parameter of the first order disk array to be assembled according to the required number of disks in the second configuration information; The second target parameter of the disk array to be assembled in the second order and the first target parameter in the first configuration information are used together as the assembly parameters of the disk array to be assembled in the second order; The second target parameter of the disk array to be assembled in the first order and the first target parameter in the second configuration information are used together as the assembly parameters of the disk array to be assembled in the first order.

3. The drive letter correction method according to claim 2, characterized in that: Determining the second target parameter of the disk array to be assembled in the second order according to the required number of disks in the first configuration information and the required number of disks in the second configuration information includes: The required number of disks in the second configuration information is used as the starting slot number of the disk of the disk array to be assembled in the second order; Subtract one from the sum of the disk start slot number of the disk array to be assembled in the second order and the disk requirement quantity in the first configuration information to obtain the disk end slot number of the disk array to be assembled in the second order; The disk start and end slot information includes the disk start slot number and the disk end slot number.

4. The drive letter correction method according to claim 2, characterized in that: Determining the second target parameter of the disk array to be assembled in the first order according to the required number of disks in the second configuration information includes: The zeroth slot number is used as the starting slot number of the disk of the disk array to be assembled in the first order; The result of subtracting one from the required number of disks in the second configuration information is used as the disk termination slot number of the disk array to be assembled in the first order; The disk start and end slot information includes the disk start slot number and the disk end slot number.

5. The drive letter correction method according to claim 1, characterized in that: After a disk array to be assembled is assembled according to the assembly parameters of the disk array to be assembled in the first order and a drive letter is generated for the assembled disk array to be assembled, the drive letter correction method further comprises: According to the disk array configuration file of the target server, determine whether the target server needs to build a cache disk array; If necessary, a cache disk array is built based on the disks in the target server that are not involved in building the disk array.

6. The drive letter correction method according to claim 1, characterized in that: After a disk array to be assembled is assembled according to the assembly parameters of the disk array to be assembled in the first order and a drive letter is generated for the assembled disk array to be assembled, the drive letter correction method further comprises: Controlling the target server to restart so that the disk array to be formed takes effect; Determine whether the drive letters of the disk array to be grouped in the first order and the disk array to be grouped in the second order are both correct; If all are correct, then end; If there is an error, the control prompter will prompt the error.

7. The drive letter correction method according to any one of claims 1 to 6, characterized in that: If the type of the independent disk redundant array card of the target server is the specified fault type, the establishment parameters of the disk array to be established in the first order and the establishment parameters of the disk array to be established in the second order are determined according to the disk array configuration file of the target server, including: Get the type of independent disk redundant array card of the target server; Determine whether the type of the independent disk redundant array card of the target server is a specified failure type; If the fault type is specified, determining, according to the disk array configuration file of the target server: the building parameters of the disk array to be built in the first order and the building parameters of the disk array to be built in the second order; If the fault type is not specified, the disk array is constructed according to the disk array configuration file of the target server and the default process of constructing the disk array in the target server.

8. A drive letter correction device, characterized in that: include: A first determination module is used to determine, if the type of the independent disk redundant array card of the target server is a specified fault type, the first order of the disk array to be assembled and the second order of the disk array to be assembled according to the disk array configuration file of the target server, wherein the disk array configuration file refers to: a configuration file for assembling a disk array, the first order and the second order refer to: the assembly order of the disk array to be assembled specified in the disk array configuration file, and the assembly parameters include: the type of the independent disk redundant array, the required number of disks, and the start and end slot information of the disks; A first building module is used to build a disk array to be built according to the building parameters of the disk array to be built in the second order and generate a drive letter for the built disk array to be built; The second assembly module is used to assemble a disk array to be assembled according to the assembly parameters of the disk array to be assembled in the second order and generate a drive letter for the assembled disk array to be assembled according to the assembly parameters of the disk array to be assembled in the first order after the disk array is assembled according to the assembly parameters of the disk array to be assembled in the second order.

9. A drive letter correction device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the drive letter correction method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the drive letter correction method according to any one of claims 1 to 7 are implemented.