Drive letter allocation method, system and server

By introducing controllable switches into the server, priority is given to allocating disk letters to the system disk and allocating them to other hard disks in a predetermined order, the problem that the allocation of hard disk drive letters does not conform to operation and maintenance habits is solved, reducing the probability of error operation and facilitating subsequent maintenance.

CN114840142BActive Publication Date: 2025-08-26INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210461430.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-28
Publication Date
2025-08-26
Estimated Expiration
2042-04-28

AI Technical Summary

Technical Problem

In the prior art, after the server is installed on the OS, the drive letter allocation order of the hard disk is difficult to predict and control, resulting in the drive letter allocation of the system disk does not conform to the habits of the operation and maintenance personnel, and it is prone to misoperation, affecting subsequent maintenance.

Method used

By introducing controllable switches into the server, the conduction and shutdown of the controllable switches are controlled according to the pre-stored system disk-notch correspondence relationship, ensuring that the system disk is assigned priority to the disk letters, and allocating disk letters to other hard disks after the judgment is completed, which is in line with the habits of operation and maintenance personnel.

Benefits of technology

It ensures that the disk letters assigned by the system disk meet the habits of the operation and maintenance personnel, reduces the probability of misoperation, and facilitates subsequent maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114840142B_ABST
    Figure CN114840142B_ABST
Patent Text Reader

Abstract

The present invention discloses a drive letter assignment method, system and server, which relate to the field of computer technology. Regardless of whether the power supply port of the i-th hard disk is connected to the first end of the i-th controllable switch and the second end of the i-th controllable switch is connected to the power supply, or the data transmission interface of the i-th hard disk is connected to the first end of the i-th controllable switch and the second end of the i-th controllable switch is connected to the CPU through a conversion module, it can be ensured that the i-th hard disk is cut out when the i-th controllable switch is turned off. When the server is turned on or restarted, the controllable switch corresponding to the slot where the system disk is located is controlled to be turned on and the remaining controllable switches are all turned off to give priority to assigning a drive letter to the system disk, and then the remaining controllable switches are controlled to be turned on to assign drive letters to the remaining hard disks, ensuring that the drive letter assigned to the system disk is what the operation and maintenance personnel want, in line with the habits of the operation and maintenance personnel, reducing the probability of misoperation due to improper location of the system disk drive letter, and facilitating maintenance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a drive letter allocation method, system and server. Background Art

[0002] Servers are often equipped with different types of hard drives. The operating system (OS) is installed on a specific hard drive, which is referred to as the system drive. To assign drive letters to each hard drive, the system assigns drive letters to each hard drive in the order in which the OS is installed and booted.

[0003] Specifically, because the OS includes different communication protocols, the initialization speed of the connection links under different communication protocols varies. That is, the order in which the drivers of each hard disk are completed varies, resulting in the OS assigning drive letters to each hard disk at different times. Moreover, the order in which the drivers are completed is difficult to predict and control for OS loading. As a result, the above-mentioned method of automatically assigning drive letters often results in the system drive being assigned a different drive letter than the operator intended (for example, in Linux systems, the operator's habit is to assign the system drive letter to SDA). This is inconsistent with operator habits and is prone to misoperation, which is not conducive to subsequent maintenance. Summary of the Invention

[0004] The purpose of the present invention is to provide a drive letter assignment method, system and server, which ensure that the drive letter assigned to the system disk is what the operation and maintenance personnel want, conform to the operation and maintenance habits of the operation and maintenance personnel, reduce the probability of misoperation caused by improper location of the drive letter of the system disk, and facilitate subsequent maintenance.

[0005] To solve the above technical problems, the present invention provides a drive letter assignment method, which is applied to a BMC in a server. The server also includes a CPU and N hard disks. The power supply port of the i-th hard disk is connected to the first end of the i-th controllable switch, and the second end of the i-th controllable switch is connected to the power supply. Alternatively, the data transmission interface of the i-th hard disk is connected to the first end of the i-th controllable switch, and the second end of the i-th controllable switch is connected to the CPU via a conversion module. Where 1≤i≤N and N is not less than 2, and i and N are both integers, the drive letter assignment method includes:

[0006] When the server is powered on or restarted, the controllable switch corresponding to the slot where the system disk is located is controlled to be turned on and the remaining controllable switches are all turned off according to the pre-stored system disk-slot correspondence relationship, so as to assign a drive letter to the system disk;

[0007] After determining that the drive letter assignment to the system disk is completed, the remaining controllable switches are controlled to be turned on to assign drive letters to the remaining hard disks.

[0008] Preferably, the drive letter assignment method further includes:

[0009] Upon receiving the OS to be installed-hard disk type correspondence relationship sent by the operation and maintenance personnel, determining the slot where the hard disk for installing the OS is located according to the OS to be installed-hard disk type correspondence relationship and the pre-stored hard disk type-slot correspondence relationship;

[0010] Establishing and storing a system disk-slot correspondence relationship according to the hard disk used to install the OS and the slot where it is located;

[0011] The controllable switch corresponding to the slot where the hard disk for installing the OS is located is controlled to be turned on and the remaining controllable switches are all turned off, so as to install the OS.

[0012] Preferably, the drive letter assignment method further includes:

[0013] Upon receiving the IP-OS to be installed-hard disk type correspondence sent by the out-of-band BMC, the current OS to be installed-hard disk type correspondence is determined based on the IP-OS to be installed-hard disk type correspondence and the IP of the server itself, and the step of determining the slot where the hard disk for installing the OS is located is performed based on the OS to be installed-hard disk type correspondence and the pre-stored hard disk type-slot correspondence.

[0014] Preferably, the type of the hard disk includes one of a SAS disk, a SATA disk, an M.2 interface SATA hard disk, an NVMe hard disk and an M.2 interface NVMe hard disk;

[0015] The method of connecting the data transmission interface of the i-th hard disk to the first end of the i-th controllable switch and connecting the second end of the i-th controllable switch to the CPU via the conversion module includes:

[0016] When the i-th hard disk is the SAS disk or the SATA disk, a data transmission interface of the SAS disk or the SATA disk is connected to a first end of the i-th controllable switch, and a second end of the i-th controllable switch is connected to the CPU through a RAID card or an HBA card;

[0017] When the i-th hard disk is the M.2 interface SATA hard disk, the data transmission interface of the M.2 interface SATA hard disk is connected to the first end of the i-th controllable switch, and the second end of the i-th controllable switch is connected to the CPU through the SATA controller;

[0018] When the i-th hard disk is the NVMe hard disk or the M.2 interface NVMe hard disk, the data transmission interface of the NVMe hard disk or the M.2 interface NVMe hard disk is connected to the first end of the i-th controllable switch, and the second end of the i-th controllable switch is connected to the CPU through a PCIE expansion card.

[0019] Preferably, controlling the remaining controllable switches to be turned on to assign drive letters to the remaining hard disks includes:

[0020] Determining the drive letter assignment order of the remaining hard disks except the system disk according to a pre-stored hard disk-drive letter assignment correspondence;

[0021] Determine the hard disk to which a drive letter is currently to be assigned based on the drive letter assignment sequence;

[0022] Determine the slot of the hard disk to be assigned a drive letter based on the pre-stored hard disk type-slot correspondence;

[0023] The controllable switch corresponding to the slot where the hard disk to be currently assigned a drive letter is located is controlled to be turned on, and the controllable switches corresponding to the remaining hard disks to be assigned drive letters are all turned off until the drive letter assignment to the remaining hard disks except the system disk is completed.

[0024] Preferably, the server further includes a control module;

[0025] The input end of the control module is connected to the BMC, and the N output ends of the control module are connected to the control ends of the controllable switches in a one-to-one correspondence, so as to control the on and off of the controllable switches according to the switch instructions sent by the BMC.

[0026] Preferably, the control module is a CPLD.

[0027] Preferably, the drive letter assignment method further includes:

[0028] Upon receiving the hard disk data to be taken offline sent by the operation and maintenance personnel, the slot where each hard disk to be taken offline is located is determined according to the pre-stored hard disk type-slot correspondence;

[0029] The controllable switches corresponding to the slots where the hard disks to be taken offline are located are all turned off, and the remaining controllable switches are all turned on.

[0030] To solve the above technical problems, the present invention further provides a drive letter assignment system, which is applied to a BMC in a server. The server also includes a CPU and N hard disks. The power supply port of the i-th hard disk is connected to the first end of the i-th controllable switch, and the second end of the i-th controllable switch is connected to the power supply. Alternatively, the data transmission interface of the i-th hard disk is connected to the first end of the i-th controllable switch, and the second end of the i-th controllable switch is connected to the CPU via a conversion module. Where 1≤i≤N and N is not less than 2, and i and N are both integers, the drive letter assignment system includes:

[0031] a first control unit, configured to control, when the server is powered on or restarted, the controllable switch corresponding to the slot where the system disk is located to be turned on and the remaining controllable switches to be turned off according to a pre-stored system disk-slot correspondence relationship, so as to assign a drive letter to the system disk;

[0032] The second control unit is configured to control the remaining controllable switches to be turned on after determining that the drive letter allocation for the system disk is completed, so as to allocate drive letters for the remaining hard disks.

[0033] To solve the above technical problems, the present invention further provides a server, including a BMC, a CPU, a memory, and N hard disks, wherein the power supply port of the i-th hard disk is connected to the first end of the i-th controllable switch and the second end of the i-th controllable switch is connected to the power supply, or the data transmission interface of the i-th hard disk is connected to the first end of the i-th controllable switch and the second end of the i-th controllable switch is connected to the CPU through a conversion module, wherein 1≤i≤N and N is not less than 2, and i and N are both integers;

[0034] The memory is connected to the BMC and is used to store computer programs;

[0035] The BMC is used to execute the steps of the drive letter allocation method as described above.

[0036] The present invention provides a drive letter assignment method, system, and server, applicable to the server's BMC. Whether connecting the power supply port of the i-th hard drive to the first end of the i-th controllable switch and the second end of the i-th controllable switch to the power supply, or connecting the data transmission interface of the i-th hard drive to the first end of the i-th controllable switch and the second end of the i-th controllable switch to the CPU via a conversion module, the i-th hard drive can be disconnected when the i-th controllable switch is turned off. Therefore, when the server is powered on or restarted, the controllable switch corresponding to the slot where the system drive resides is turned on based on a pre-stored system drive-slot correspondence, while the remaining controllable switches are turned off. At this point, the system drive is preferentially assigned a drive letter. After determining that the drive letter assignment for the system drive is complete, the remaining controllable switches are turned on to assign drive letters to the remaining hard drives. Compared to existing technologies, this solution ensures that the drive letter assigned to the system drive is the one intended by the operator, conforming to the operator's maintenance habits. It reduces the probability of misoperation caused by improper placement of the system drive letter, facilitating subsequent maintenance. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the prior art and the drawings required for use in the embodiments. 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 paying any creative work.

[0038] Figure 1 A flow chart of a drive letter assignment method provided by the present invention;

[0039] Figure 2 A schematic diagram of the connection structure between a hard disk, a controllable switch, a CPU, a conversion module, a CPLD, and a BMC in a server provided by the present invention;

[0040] Figure 3 This is a structural diagram of a drive letter allocation system provided by the present invention. DETAILED DESCRIPTION

[0041] The core of the present invention is to provide a drive letter assignment method, system and server, which ensures that the drive letter assigned to the system disk is what the operation and maintenance personnel want, conforms to the operation and maintenance habits of the operation and maintenance personnel, reduces the probability of misoperation caused by improper location of the drive letter of the system disk, and facilitates subsequent maintenance.

[0042] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only 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 making creative efforts shall fall within the scope of protection of the present invention.

[0043] Please refer to Figure 1 , Figure 1 The present invention provides a flowchart of a drive letter allocation method.

[0044] The drive letter assignment method is applied to a BMC in a server. The server also includes a CPU and N hard disks. The power supply port of the i-th hard disk is connected to the first end of the i-th controllable switch, and the second end of the i-th controllable switch is connected to the power supply. Alternatively, the data transmission interface of the i-th hard disk is connected to the first end of the i-th controllable switch, and the second end of the i-th controllable switch is connected to the CPU via a conversion module. Where 1≤i≤N, N is not less than 2, and i and N are both integers, the drive letter assignment method includes:

[0045] S11: When the server is powered on or restarted, the controllable switch corresponding to the slot where the system disk is located is controlled to be turned on and the remaining controllable switches are turned off according to the pre-stored system disk-slot correspondence relationship, so as to assign a drive letter to the system disk;

[0046] S12: After determining that the drive letter assignment to the system disk is completed, the remaining controllable switches are controlled to be turned on to assign drive letters to the remaining hard disks.

[0047] In this embodiment, after the OS is installed, when the server is restarted or powered on, in the prior art, drive letters are assigned according to the order in which the hard disks are installed. This may result in the system drive being assigned a drive letter that is not what the operator wants. To address this technical issue, this application provides a drive letter assignment method that ensures that the drive letter assigned to the system drive is consistent with the operator's maintenance habits.

[0048] Specifically, whether the power supply port of the i-th hard drive is connected to the first end of the i-th controllable switch and the second end of the i-th controllable switch is connected to the power supply, or whether the data transmission interface of the i-th hard drive is connected to the first end of the i-th controllable switch and the second end of the i-th controllable switch is connected to the CPU via a conversion module, both ensure that the i-th hard drive is disconnected when the i-th controllable switch is turned off. The controllable switch here can be a MOSFET or a high-speed switch chip, and there is no specific limitation here, and it can be set according to actual needs.

[0049] Therefore, when the server is turned on or restarted, each hard disk will be assigned a drive letter. To ensure the priority allocation of the system disk, the controllable switch corresponding to the slot where the system disk is located is controlled to be turned on according to the pre-stored system disk-slot correspondence relationship, and the remaining controllable switches are all turned off, so that the system disk is assigned a drive letter first and the other hard disks are temporarily cut out; after it is determined that the drive letter allocation for the system disk is completed, the remaining controllable switches are controlled to be turned on, so that the drive letters for the remaining hard disks are assigned. It should be noted that the method for determining that the drive letter allocation for the system disk is completed here can be that the OS is loaded and the drive letter allocation for the system disk is completed when the OS is loaded; it can also be determined that the drive letter allocation for the system disk is completed when the preset time is reached by setting a preset time; the specific method for controlling the remaining controllable switches to be turned on can be that the remaining controllable switches are all turned on at the same time, or the remaining controllable switches are turned on in a certain order, so as to meet the operation and maintenance personnel's requirements for drive letter allocation for hard disks other than the system disk. There is no special limitation here, and it can be set according to actual needs.

[0050] In addition, the types of the N hard disks here can be the same or different, and the types of hard disks include but are not limited to SAS disks, SATA disks, etc., which are not particularly limited here.

[0051] In summary, the present application provides a drive letter assignment method. Compared with the existing technology, this solution ensures that the drive letter assigned to the system disk is what the operation and maintenance personnel want (for example, under the Linux system, the operation and maintenance personnel's operation and maintenance habits are to assign the system disk's drive letter to SDA), which is in line with the operation and maintenance personnel's operation and maintenance habits, reduces the probability of erroneous operation caused by improper location of the system disk's drive letter, and facilitates subsequent maintenance.

[0052] Based on the above embodiment:

[0053] As a preferred embodiment, the drive letter assignment method further includes:

[0054] Upon receiving the OS to be installed-hard disk type correspondence relationship sent by the operation and maintenance personnel, determine the slot where the hard disk for installing the OS is located based on the OS to be installed-hard disk type correspondence relationship and the pre-stored hard disk type-slot correspondence relationship;

[0055] Establish and store the system disk-slot mapping relationship based on the hard disk used to install the OS and the slot where it is located;

[0056] The controllable switch corresponding to the slot where the hard disk for installing the OS is located is controlled to be turned on and the remaining controllable switches are all turned off to install the OS.

[0057] In this embodiment, when the operation and maintenance personnel have requirements for the hard disk type to be installed on the OS, the control method for each controllable switch in this case is provided to ensure reliable installation of the OS. The specific process is as described above and will not be repeated here.

[0058] As a preferred embodiment, the drive letter assignment method further includes:

[0059] Upon receiving the IP-OS to be installed-hard disk type correspondence sent by the out-of-band BMC, the current OS to be installed-hard disk type correspondence is determined based on the IP-OS to be installed-hard disk type correspondence and the server's own IP, and the step of determining the slot where the hard disk for installing the OS is located is performed based on the OS to be installed-hard disk type correspondence and the pre-stored hard disk type-slot correspondence.

[0060] In this embodiment, the inventors further consider that for a control system including various servers, when there are requirements for an OS to be installed and a corresponding hard disk type for installing the OS for each server, batch deployment can be performed through out-of-band instructions to ensure installation efficiency.

[0061] Specifically, the operation and maintenance personnel can send batch deployment instructions through the out-of-band BMC. That is, when receiving the IP-to-be-installed OS-hard disk type correspondence sent by the out-of-band BMC, the current to-be-installed OS-hard disk type correspondence can be determined based on the IP-to-be-installed OS-hard disk type correspondence and the server's own IP, and then enter the step of determining the slot where the hard disk used to install the OS is located based on the to-be-installed OS-hard disk type correspondence and the pre-stored hard disk type-slot correspondence, so as to realize the installation of the OS system of the server itself.

[0062] As a preferred embodiment, the type of the hard disk includes one of a SAS disk, a SATA disk, an M.2 interface SATA hard disk, an NVMe hard disk, and an M.2 interface NVMe hard disk;

[0063] Connecting the data transmission interface of the i-th hard disk to the first end of the i-th controllable switch and connecting the second end of the i-th controllable switch to the CPU through the conversion module, including:

[0064] When the i-th hard disk is a SAS disk or a SATA disk, the data transmission interface of the SAS disk or the SATA disk is connected to the first end of the i-th controllable switch, and the second end of the i-th controllable switch is connected to the CPU through the RAID card or the HBA card;

[0065] When the i-th hard disk is an M.2 interface SATA hard disk, the data transmission interface of the M.2 interface SATA hard disk is connected to the first end of the i-th controllable switch, and the second end of the i-th controllable switch is connected to the CPU through the SATA controller;

[0066] When the i-th hard disk is an NVMe hard disk or an M.2 interface NVMe hard disk, the data transmission interface of the NVMe hard disk or the M.2 interface NVMe hard disk is connected to the first end of the i-th controllable switch, and the second end of the i-th controllable switch is connected to the CPU through the PCIE expansion card.

[0067] In this embodiment, for N hard drives, the hard drive types can include SAS drives, SATA drives, M.2 interface SATA drives, NVMe drives, and M.2 interface NVMe drives. The hard drives and CPU cannot be directly connected. When the i-th hard drive is a SAS drive or SATA drive, the conversion module is a RAID card or HBA card; when the i-th hard drive is an M.2 interface SATA drive, the conversion module is a SATA controller; when the i-th hard drive is an NVMe drive or an M.2 interface NVMe drive, the conversion module is a PCIE expansion card. This configuration ensures reliable operation of different hard drive types.

[0068] It should also be noted that the server may further include a hard disk backplane to set hard disk types such as SAS disks, SATA disks and NVMe hard disks on the hard disk backplane.

[0069] As a preferred embodiment, controlling the remaining controllable switches to be turned on to assign drive letters to the remaining hard disks includes:

[0070] Determine the drive letter assignment order of each hard disk except the system disk according to the pre-stored hard disk-drive letter assignment correspondence;

[0071] Determine the hard disk to be currently assigned a drive letter based on the drive letter assignment sequence;

[0072] Determine the slot of the hard disk to be assigned a drive letter based on the pre-stored hard disk type-slot correspondence;

[0073] The controllable switch corresponding to the slot where the hard disk to be currently assigned a drive letter is located is controlled to be turned on, and the controllable switches corresponding to the remaining hard disks to be assigned drive letters are all turned off until the drive letter assignment for the remaining hard disks except the system disk is completed.

[0074] In this embodiment, the inventor further takes into account that the operation and maintenance personnel may also have drive letter allocation requirements for the remaining hard disks other than the system disk. Therefore, the drive letter allocation order of the remaining hard disks other than the system disk is determined according to the pre-stored hard disk-drive letter allocation correspondence, and the current hard disk to be assigned a drive letter is determined. For the current hard disk to be assigned a drive letter, the slot where it is located is determined, and the controllable switch corresponding to the slot where the current hard disk to be assigned a drive letter is located is controlled to be turned on and the controllable switches corresponding to the remaining hard disks to be assigned a drive letter are all turned off, so as to ensure that the current hard disk to be assigned a drive letter is allocated according to demand, and determine the next remaining hard disk as the current hard disk to be assigned a drive letter according to the drive letter allocation order, until the drive letter allocation of the remaining hard disks except the system disk is completed.

[0075] It can be seen that this method can ensure that the drive letters of all hard disks in the server are set according to the allocation requirements of the operation and maintenance personnel, which is more in line with the operation and maintenance habits of the operation and maintenance personnel and avoids misoperation.

[0076] As a preferred embodiment, the server further includes a control module;

[0077] The input end of the control module is connected to the BMC, and the N output ends of the control module are connected to the control ends of each controllable switch in a one-to-one correspondence, for controlling the conduction and shutdown of each controllable switch according to the switch instructions sent by the BMC.

[0078] In this embodiment, further considering that the BMC has a small number of interfaces for connecting to other managed devices, etc., the server may further include a control module. The BMC then sends switch instructions for controlling N controllable switches through a connection link between the BMC and the input end of the control module. The N output ends of the control module correspondingly output control signals to control the conduction and shutdown of each controllable switch, thereby enhancing practicality and operability.

[0079] As a preferred embodiment, the control module is a CPLD.

[0080] In this embodiment, the control module can be a CPLD (Complex Programmable Logic Device). CPLD has the advantages of low cost, easy operation, programmability, low logic complexity, and the ability to implement combinational logic. It can simply and reliably implement the processing logic of the control module in this application.

[0081] For details, please refer to Figure 2 , Figure 2A structural diagram of the circuit connection is given, in which N=5 and the hard disk types are SAS disk, SATA disk, M.2 interface SATA hard disk, NVMe hard disk and M.2 interface NVMe hard disk, respectively. The figure symbol SW represents a controllable switch. Since the hard disk types are SAS disks, SATA disks and NVMe hard disks, they are usually set on the HDD BP (Hard Disk Device Backplane). Therefore, the controllable switches corresponding to them can also be specifically set on the hard disk backplane.

[0082] As a preferred embodiment, the drive letter assignment method further includes:

[0083] When receiving the data of the hard disks to be taken offline from the operation and maintenance personnel, the slots of the hard disks to be taken offline are determined according to the pre-stored hard disk type-slot correspondence;

[0084] The controllable switches corresponding to the slots where the hard disks to be taken offline are located are all turned off and the remaining controllable switches are all turned on.

[0085] In this embodiment, the inventor further considers that when the business volume is very small, some hard disks in the server may not need to be used. Therefore, when receiving the data of the hard disks to be taken offline sent by the operation and maintenance personnel, the slots of the hard disks to be taken offline are determined according to the pre-stored hard disk type-slot correspondence. Then, the controllable switches corresponding to the slots of the hard disks to be taken offline are controlled to be turned off and the remaining controllable switches are turned on to ensure that the hard disks to be taken offline are offline and the hard disks still in use work normally, thereby achieving energy saving.

[0086] It should be noted that when it is determined that a hard disk that has been offline needs to be used again, it is only necessary to control the corresponding controllable switch to be turned on again.

[0087] Please refer to Figure 3 , Figure 3 This is a structural diagram of a drive letter allocation system provided by the present invention.

[0088] The drive letter assignment system is applied to a BMC in a server. The server also includes a CPU and N hard disks. The power supply port of the i-th hard disk is connected to the first end of the i-th controllable switch, and the second end of the i-th controllable switch is connected to the power supply. Alternatively, the data transmission interface of the i-th hard disk is connected to the first end of the i-th controllable switch, and the second end of the i-th controllable switch is connected to the CPU via a conversion module. Where 1≤i≤N and N is not less than 2, and i and N are both integers, the drive letter assignment system includes:

[0089] The first control unit 21 is configured to control the switch corresponding to the slot where the system disk is located to be turned on and the remaining controllable switches to be turned off when the server is powered on or restarted, according to the pre-stored system disk-slot correspondence relationship, so as to assign a drive letter to the system disk;

[0090] The second control unit 22 is configured to control the remaining controllable switches to be turned on after determining that the drive letter assignment to the system disk is completed, so as to assign drive letters to the remaining hard disks.

[0091] For an introduction to the drive letter assignment system provided in the present invention, please refer to the embodiment of the drive letter assignment method described above, which will not be described in detail here.

[0092] The present invention also provides a server, including a BMC, a CPU, a memory, and N hard disks, wherein the power supply port of the i-th hard disk is connected to the first end of the i-th controllable switch and the second end of the i-th controllable switch is connected to the power supply, or the data transmission interface of the i-th hard disk is connected to the first end of the i-th controllable switch and the second end of the i-th controllable switch is connected to the CPU through a conversion module, wherein 1≤i≤N and N is not less than 2, and i and N are both integers;

[0093] The memory is connected to the BMC and is used to store computer programs;

[0094] The BMC is used to execute the steps of the drive letter allocation method described above.

[0095] For an introduction to the server provided in the present invention, please refer to the embodiment of the drive letter allocation method described above, which will not be described in detail here.

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

[0097] It should also be noted that, in this specification, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus comprising the element.

[0098] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.

[0099] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily 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 is not limited to the embodiments shown herein but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A drive letter assignment method, characterized in that: A BMC applied to a server, the server also including a CPU and N hard disks, wherein the power supply port of the i-th hard disk is connected to the first end of the i-th controllable switch and the second end of the i-th controllable switch is connected to the power supply; or, the data transmission interface of the i-th hard disk is connected to the first end of the i-th controllable switch and the second end of the i-th controllable switch is connected to the CPU via a conversion module, wherein 1≤i≤N and N is not less than 2, and i and N are both integers, and the drive letter assignment method includes: When the server is powered on or restarted, the controllable switch corresponding to the slot where the system disk is located is controlled to be turned on and the remaining controllable switches are all turned off according to the pre-stored system disk-slot correspondence relationship, so as to assign a drive letter to the system disk; After determining that the drive letter assignment for the system disk is completed, controlling the remaining controllable switches to be turned on to assign drive letters to the remaining hard disks; The drive letter allocation method further includes: Upon receiving the IP-to-installed OS-hard disk type correspondence sent by the out-of-band BMC, determining the current OS-to-installed hard disk type correspondence based on the IP-to-installed OS-hard disk type correspondence and the server's own IP address, and determining the slot where the hard disk for installing the OS is located based on the OS-to-installed hard disk type correspondence and the pre-stored hard disk type-slot correspondence; Establish and store a system disk-slot correspondence based on the hard disk used to install the OS and the slot where it is located; Controlling the controllable switch corresponding to the slot where the hard disk for installing the OS is located to be turned on and the remaining controllable switches to be turned off, so as to install the OS; The correspondence between IP address, OS to be installed, and hard disk type is derived from the batch deployment instructions.

2. The drive letter assignment method according to claim 1, wherein: The type of the hard disk includes one of a SAS disk, a SATA disk, an M.2 interface SATA hard disk, an NVMe hard disk and an M.2 interface NVMe hard disk; The method of connecting the data transmission interface of the i-th hard disk to the first end of the i-th controllable switch and connecting the second end of the i-th controllable switch to the CPU via a conversion module includes: When the i-th hard disk is the SAS disk or the SATA disk, a data transmission interface of the SAS disk or the SATA disk is connected to a first end of the i-th controllable switch, and a second end of the i-th controllable switch is connected to the CPU through a RAID card or an HBA card; When the i-th hard disk is the M.2 interface SATA hard disk, the data transmission interface of the M.2 interface SATA hard disk is connected to the first end of the i-th controllable switch, and the second end of the i-th controllable switch is connected to the CPU through the SATA controller; When the i-th hard disk is the NVMe hard disk or the M.2 interface NVMe hard disk, the data transmission interface of the NVMe hard disk or the M.2 interface NVMe hard disk is connected to the first end of the i-th controllable switch, and the second end of the i-th controllable switch is connected to the CPU through a PCIE expansion card.

3. The drive letter assignment method according to claim 1, wherein: Controlling the remaining controllable switches to be turned on to assign drive letters to the remaining hard disks includes: Determining the drive letter assignment order of the remaining hard disks except the system disk according to a pre-stored hard disk-drive letter assignment correspondence; Determine the hard disk to which a drive letter is currently to be assigned based on the drive letter assignment sequence; Determine the slot of the hard disk to be assigned a drive letter based on the pre-stored hard disk type-slot correspondence; The controllable switch corresponding to the slot where the hard disk to be currently assigned a drive letter is located is controlled to be turned on, and the controllable switches corresponding to the remaining hard disks to be assigned drive letters are all turned off until the drive letter assignment to the remaining hard disks except the system disk is completed.

4. The drive letter assignment method according to claim 1, wherein: The server further includes a control module; The input end of the control module is connected to the BMC, and the N output ends of the control module are connected to the control ends of the controllable switches in a one-to-one correspondence, so as to control the on and off of the controllable switches according to the switch instructions sent by the BMC.

5. The drive letter assignment method according to claim 4, wherein: The control module is a CPLD.

6. The drive letter assignment method according to any one of claims 1 to 5, wherein: The drive letter allocation method further includes: Upon receiving the hard disk data to be taken offline sent by the operation and maintenance personnel, the slot where each hard disk to be taken offline is located is determined according to the pre-stored hard disk type-slot correspondence; The controllable switches corresponding to the slots where the hard disks to be taken offline are located are all turned off, and the remaining controllable switches are all turned on.

7. A drive letter assignment system, characterized in that: A BMC applied to a server, the server also including a CPU and N hard disks, wherein the power supply port of the i-th hard disk is connected to the first end of the i-th controllable switch and the second end of the i-th controllable switch is connected to the power supply; or, the data transmission interface of the i-th hard disk is connected to the first end of the i-th controllable switch and the second end of the i-th controllable switch is connected to the CPU via a conversion module, wherein 1≤i≤N and N is not less than 2, and i and N are both integers. The drive letter allocation system includes: a first control unit, configured to control, when the server is powered on or restarted, the controllable switch corresponding to the slot where the system disk is located to be turned on and the remaining controllable switches to be turned off according to a pre-stored system disk-slot correspondence relationship, so as to assign a drive letter to the system disk; a second control unit, configured to, after determining that the drive letter assignment to the system disk is completed, control the remaining controllable switches to be turned on, so as to assign drive letters to the remaining hard disks; The drive letter allocation device is further used for: Upon receiving the IP-to-installed OS-hard disk type correspondence sent by the out-of-band BMC, determining the current OS-to-installed hard disk type correspondence based on the IP-to-installed OS-hard disk type correspondence and the server's own IP address, and determining the slot where the hard disk for installing the OS is located based on the OS-to-installed hard disk type correspondence and the pre-stored hard disk type-slot correspondence; Establishing and storing a system disk-slot correspondence relationship according to the hard disk used to install the OS and the slot where it is located; Controlling the controllable switch corresponding to the slot where the hard disk for installing the OS is located to be turned on and the remaining controllable switches to be turned off, so as to install the OS; The correspondence between IP address, OS to be installed, and hard disk type is derived from the batch deployment instructions.

8. A server, characterized in that: The system includes a BMC, a CPU, a memory, and N hard disks, wherein the power supply port of the i-th hard disk is connected to the first end of the i-th controllable switch and the second end of the i-th controllable switch is connected to the power supply; or, the data transmission interface of the i-th hard disk is connected to the first end of the i-th controllable switch and the second end of the i-th controllable switch is connected to the CPU via a conversion module, where 1≤i≤N, N is not less than 2, and i and N are both integers. The memory is connected to the BMC and is used to store computer programs; The BMC is used to execute the steps of the drive letter assignment method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Logical drive allocation method, device and system, electronic equipment and storage medium

    CN114020681A