Hard disk identification method, identification system, storage medium and computer equipment
By implementing the hard disk recognition method in the server controller and identifying and adapting to the NVMe hard disk with U.2 and U.3 interfaces, the problem of inability to compatible with the two interfaces in the prior art is solved, and the sharing of hard disks and wider application is realized.
Patent Information
- Application Number
- CN202210789876.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-05
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2042-07-05
AI Technical Summary
The existing server motherboard cannot be compatible with NVMe hard disks with U.2 and U.3 interfaces at the same time, resulting in the inability to share the hard disks with both interfaces.
By implementing the hard disk recognition method in the controller, identifying the type of hard disk to be connected in response to external signals, determining the interface information according to the preset hard disk interface comparison table, and setting the corresponding interface when the hard disk is connected, the configuration of the PCIE switch switch is realized to support different types of NVMe hard disks.
It realizes compatibility between U.2 and U.3 interface hard disks, and can share two interfaces of hard disks, improving practicality and application prospects.
Smart Images

Figure CN115061958B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of servers, and in particular to a hard disk identification method, an identification system, a storage medium and a computer device. Background Art
[0002] With the rapid development of modern server technology, solid state disks (SSDs) have become mainstream server storage devices due to their fast read and write, light weight, low energy consumption, and small size. With the iteration of solid state drive technology, NVMe (Non-Volatile Memory Express) hard drives have become mainstream hard drives. NVMe hard drives include hard drives with U.2 interfaces based on SFF-8639 connectors and hard drives with U.3 interfaces based on SFF-8639 connectors. The two hard drives have the same physical form but different signal interface definitions, and are not compatible. Therefore, how to solve the problem of server motherboards being compatible with both U.2 hard drives and U.3 hard drives needs to be solved urgently. Summary of the invention
[0003] In order to solve at least one of the above problems, a first embodiment of the present invention provides a hard disk identification method, which is applied to a controller and includes the following steps:
[0004] S20: identifying the type of the hard disk to be connected in response to the received external signal;
[0005] S40: determining interface information according to the hard disk type and a preset hard disk interface comparison table, wherein the hard disk interface comparison table includes the hard disk type and interface information corresponding to the hard disk type;
[0006] S60: In response to the hard disk to be connected being connected, setting the hard disk interface according to the interface information.
[0007] Furthermore, the hard disk is an NVME hard disk.
[0008] Furthermore, the hard disk type includes a first NVME hard disk supporting the U.2 standard and a second NVME hard disk supporting the U.3 standard.
[0009] Furthermore, the first NVME hard disk and the second NVME hard disk correspond to different PCIE interfaces.
[0010] Furthermore, step S60 further includes:
[0011] In response to the access of the hard disk to be connected, the controller transmits the interface information to the PCIE switch, so that the PCIE switch sets the PCIE NVME controller according to the interface information to configure the PCIE interface corresponding to the hard disk to be connected.
[0012] Further, before step S60, the hard disk identification method further includes: the PCIE switch is set to a PCIE interface corresponding to the first NVME hard disk;
[0013] Step S60 further includes: when the interface information is the interface information corresponding to the second NVME hard disk, the PCIE switch is set to the PCIE interface corresponding to the second NVME hard disk.
[0014] Furthermore, the controller is CPLD or FPGA.
[0015] A second embodiment of the present invention provides a hard disk identification system, comprising a controller, a PCIE switch and a PCIE NVME controller, wherein the controller is configured as follows:
[0016] identifying the hard disk type of the hard disk to be connected in response to the received external signal;
[0017] Determining interface information according to the hard disk type and a preset hard disk interface comparison table, wherein the hard disk interface comparison table includes the hard disk type and interface information corresponding to the hard disk type;
[0018] In response to the access of the hard disk to be connected, the interface information is transmitted to the PCIE switch, so that the PCIE switch sets the PCIE NVME controller according to the interface information to configure the PCIE interface corresponding to the hard disk to be connected.
[0019] A third embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the method described in the first embodiment is implemented.
[0020] A fourth embodiment of the present invention provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in the first embodiment when executing the program.
[0021] The beneficial effects of the present invention are as follows:
[0022] In view of the existing problems, the present invention develops a hard disk identification method, which identifies the hard disk type of the hard disk to be connected in response to a received external signal, determines interface information according to the hard disk type and a preset hard disk interface comparison table, and sets the hard disk interface according to the interface information in response to the connection of the hard disk to be connected, thereby solving the problem that the U.2 and U.3 interfaces of the existing hard disks have the same physical form but different signal interface definitions, and can realize the sharing of hard disks with the two interfaces, which has high practicality and broad application prospects. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of 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 creative work.
[0024] Figure 1 A flowchart showing a hard disk identification method according to an embodiment of the present invention;
[0025] Figure 2 A structural block diagram of a hard disk identification system according to another embodiment of the present invention is shown;
[0026] Figure 3 A PCIE channel definition diagram of a hard disk identification system according to another embodiment of the present invention is shown;
[0027] Figure 4 A schematic structural diagram of a computer device according to another embodiment of the present invention is shown. DETAILED DESCRIPTION
[0028] In order to more clearly illustrate the present invention, the present invention is further described below in conjunction with preferred embodiments and accompanying drawings. Similar components in the accompanying drawings are represented by the same reference numerals. It should be understood by those skilled in the art that the content specifically described below is illustrative rather than restrictive, and should not be used to limit the scope of protection of the present invention.
[0029] In response to the above situation, the inventor has proposed after extensive research and experiments that the reason why there are a huge number of existing U.2 interface motherboards and the problem of being unable to achieve compatibility with U.3 interface hard drives is that they cannot identify the hard drive type and dynamically adapt the hard drive interface.
[0030] According to the above problems and the causes of the problems, such as Figure 1 As shown, an embodiment of the present invention provides a hard disk identification method, which is applied to a controller and includes the steps of:
[0031] S20: identifying the type of the hard disk to be connected in response to the received external signal;
[0032] S40: determining interface information according to the hard disk type and a preset hard disk interface comparison table, wherein the hard disk interface comparison table includes the hard disk type and interface information corresponding to the hard disk type;
[0033] S60: In response to the hard disk to be connected being connected, setting the hard disk interface according to the interface information.
[0034] In view of the current existing problems, this embodiment develops a hard disk identification method, thereby solving the problem that the U.2 and U.3 interfaces of existing hard disks have the same physical form but different signal interface definitions. It can realize the sharing of hard disks with the two interfaces and has high practicality and broad application prospects.
[0035] The U.2 and U.3 are the standards of the hard disk, and the U.2 standard and the U.3 standard have different pin assignments, wherein the 4-way PCIE (Peripheral Component Interconnect Express, high-speed serial computer expansion bus standard), SAS (Serial Attached SCSI, serial connection SCSI interface) SAS0, SAS1 of U.2 all use different pins, and the SAS0 / PCIE0, SAS1 / PCIE1, SAS2 / PCIE2, SAS3 / PCIE3 of U.3 share the same pin. Therefore, in the prior art, the U.2 hard disk and the U.3 hard disk are consistent in interface physical form, and the signal interface definition is different, and the compatibility of the hard disks of the two interfaces cannot be achieved. The hard disk type described in the present invention includes a first NVME hard disk supporting the U.2 standard and a second NVME hard disk supporting the U.3 standard.
[0036] In a specific example, Figure 2 As shown, a hard disk identification system in this example includes a controller 100, a PCIE switching switch 200 and a PCIE NVME controller 300, wherein the controller 100 is a CPLD (Complex Programmable Logic Device) for controlling the logic flow of hard disk adaptation; the PCIE switching switch 200 is used to switch the interface information of each hard disk; and the PCIE NVME controller 300 is used to perform interface settings according to the interface information.
[0037] In a specific embodiment, first, the controller 100 receives an external signal to identify the type of hard disk to be connected, specifically, to identify whether the hard disk to be connected is a U.2 hard disk or a U.3 hard disk; secondly, the controller 100 determines the interface information according to the hard disk type and a pre-set hard disk interface comparison table, and the hard disk interface comparison table includes the hard disk type and the interface information corresponding to the hard disk type; thirdly, the controller 100 transmits the interface information to the PCIE switching switch 200 in response to the access of the hard disk to be connected, so that the PCIE switching switch sets the PCIE NVME controller 300 according to the interface information to configure the PCIE interface corresponding to the hard disk to be connected.
[0038] Specifically, the PCIE switch 200 receives the interface information sent by the CPLD, and sets the configuration of the PCIE NVME controller 300 according to the interface information, so that the PCIE NVME controller 300 sets the channel information of the PCIE NVME controller. The specific channel definition is as follows: Figure 3 As shown, taking the first PCIE interface PCIE0 as an example, when the PCIE switching switch 200 sets the interface information configuration of the PCIE NVME controller 300 to be a U.2 hard disk, its pin numbering is E7-E16; when the interface information is configured to be a U.3 hard disk, its pin numbering is S1-S7.
[0039] At this point, the hard disk identification system completes the identification and adaptation of the hard disk to be connected, thereby solving the problem that the U.2 and U.3 interfaces of existing hard disks have the same physical form but different signal interface definitions. It can realize the sharing of hard disks with the two interfaces, and has high practicality and broad application prospects.
[0040] In this embodiment, the hard disk is an NVME hard disk. NVME (Non-Volatile Memory Express) is a solid-state memory specially designed for flash memory, which can make full use of the low latency and parallelism of the PCIE interface channel, allowing the SSD to be directly connected to the CPU (central processing unit) through PCIE, further reducing the latency, and NVME also has good performance in terms of concurrency, QoS (Quality of Service), manageability, etc., so that the hard disk identification system has high practicality and can be applied to application scenarios with more stringent latency requirements.
[0041] In this embodiment, the first NVME hard disk and the second NVME hard disk correspond to different PCIE interfaces, such as Figure 3As shown, the first NVME hard disk supporting the U.2 standard and the second NVME hard disk supporting the U.3 standard both include 4 PCIE interfaces, namely PCIE0-PCIE3. Because the NVMe protocol must use the PCIE channel, the more PCIE channels are occupied, the greater the bandwidth used by the hard disk, that is, the faster the read and write speed of the hard disk. In this embodiment, the PCIE refers to the channel, and the NVME is the protocol (interface specification) of the hard disk. The solid-state hard disk supporting the NVME protocol occupies the PCIE channels of the motherboard and CPU, including PCIE3.0x2 channels and PCIE3.0x4 channels. The sequential read and write speed of the solid-state hard disk of the PCIE3.0x2 channel is between 1000 and 2000MB / s, and the read and write speed of the solid-state hard disk of the PCIE3.0x4 channel is 3000MB per second.
[0042] In this embodiment, if Figure 2 and Figure 3 As shown, the PCIE NVME controller 300 responds to the configuration of the PCIE switch 200 and sets the channel information of the PCIE NVME controller. The specific channel definition takes the first PCIE interface PCIE0 as an example. When the PCIE switch 200 sets the interface information of the PCIE NVME controller 300 to be configured as a U.2 hard disk, its pin number is E7-E16; when the interface information is configured as a U.3 hard disk, its pin number is S1-S7. This solves the problem that the U.2 and U.3 interfaces of existing hard disks have the same physical form but different signal interface definitions, and can realize the sharing of hard disks with two interfaces, which has high practicality and broad application prospects.
[0043] In an optional embodiment, before step S60, the hard disk identification method further includes: the PCIE switch is set 200 to a PCIE interface corresponding to the first NVME hard disk;
[0044] Step S60 further includes: when the interface information is the interface information corresponding to the second NVME hard disk, the PCIE switch 200 is set to the PCIE interface corresponding to the second NVME hard disk.
[0045] In this embodiment, the initial value of the PCIE NVME controller 300 is the PCIE interface corresponding to the first NVME hard disk, that is, the U.3 hard disk is supported by default; when the PCIE switch 200 is set to the second NVME hard disk, that is, the U.2 hard disk, the PCIE NVME controller 300 is configured according to the channel definition of the U.2 hard disk. In this embodiment, by setting the default support for U.3 hard disks with wider application, larger quantity and faster speed, the configuration time of the PCIE NVME controller 300 can be effectively reduced, and the execution efficiency of the hard disk identification system can be improved.
[0046] In an optional embodiment, the controller is a CPLD or FPGA (Field-Programmable Gate Array). The FPGA is a semi-custom circuit in the field of application-specific integrated circuits (ASICs) based on programmable devices such as PAL, GAL, and CPLD. It can solve the problem of the insufficiency of custom circuits and overcome the disadvantage of the limited number of gate circuits of the original programmable devices, and can effectively improve the execution efficiency of the hard disk identification system.
[0047] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0048] It can be understood that the above examples are merely examples listed for better understanding of the technical solutions of the embodiments of the present invention, and are not intended to be the sole limitations on the embodiments of the present invention.
[0049] Another embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements: the hard disk identification method, applied to a controller, comprising the steps of:
[0050] S20: identifying the type of the hard disk to be connected in response to the received external signal;
[0051] S40: determining interface information according to the hard disk type and a preset hard disk interface comparison table, wherein the hard disk interface comparison table includes the hard disk type and interface information corresponding to the hard disk type;
[0052] S60: In response to the hard disk to be connected being connected, setting the hard disk interface according to the interface information.
[0053] In practical applications, the computer-readable storage medium can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present embodiment, the computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.
[0054] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0055] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0056] Computer program code for performing the operations of the present invention may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0057] like Figure 4As shown, a structural schematic diagram of a computer device provided by another embodiment of the present invention. Figure 4 The computer device 12 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0058] like Figure 4 As shown, the computer device 12 is in the form of a general-purpose computing device. The components of the computer device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that connects various system components (including the system memory 28 and the processing unit 16).
[0059] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. By way of example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
[0060] The computer device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the computer device 12, including volatile and non-volatile media, removable and non-removable media.
[0061] The system memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The computer device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Figure 4 not shown, usually called a "hard drive"). Although Figure 4 Not shown in the figure, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present invention.
[0062] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in the memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 42 generally perform the functions and / or methods of the embodiments described herein.
[0063] The computer device 12 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, etc.), one or more devices that enable a user to interact with the computer device 12, and / or any device that enables the computer device 12 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed through an input / output (I / O) interface 22. Furthermore, the computer device 12 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) through a network adapter 20. Figure 4 As shown, the network adapter 20 communicates with other modules of the computer device 12 via the bus 18. It should be understood that although Figure 4 Not shown, other hardware and / or software modules may be used in conjunction with computer device 12, including but not limited to microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0064] The processor unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, such as implementing a hard disk identification method provided in an embodiment of the present invention.
[0065] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not limitations on the implementation methods of the present invention. For ordinary technicians in the relevant field, other different forms of changes or modifications can be made based on the above description. It is impossible to list all the implementation methods here. All obvious changes or modifications derived from the technical solution of the present invention are still within the protection scope of the present invention.
Claims
1. A hard disk identification method, characterized in that: Applied to the controller, including the steps: S20: identifying the type of the hard disk to be connected in response to the received external signal; S40: determining interface information according to the hard disk type and a preset hard disk interface comparison table, wherein the hard disk interface comparison table includes the hard disk type and interface information corresponding to the hard disk type; S60: In response to the hard disk to be connected being connected, setting the hard disk interface according to the interface information; The hard disk is an NVME hard disk; The hard disk type includes a first NVME hard disk supporting the U.2 standard and a second NVME hard disk supporting the U.3 standard; The first NVME hard disk and the second NVME hard disk correspond to different PCIE interfaces; Step S60 further includes: In response to the hard disk to be connected, the controller transmits the interface information to the PCIE switch, so that the PCIE switch sets the PCIE NVME controller according to the interface information to configure the PCIE interface corresponding to the hard disk to be connected; When the PCIE switch sets the interface information configuration of the PCIE NVME controller to U.2 hard disk, its pin numbering is E7-E16; when the interface information configuration is U.3 hard disk, its pin numbering is S1-S7.
2. The hard disk identification method according to claim 1, characterized in that: Before step S60, the hard disk identification method further includes: the PCIE switch is set to a PCIE interface corresponding to the first NVME hard disk; Step S60 further includes: when the interface information is the interface information corresponding to the second NVME hard disk, the PCIE switch is set to the PCIE interface corresponding to the second NVME hard disk.
3. The hard disk identification method according to any one of claims 1 to 2, characterized in that: The controller is CPLD or FPGA.
4. A hard disk identification system, characterized in that: The invention comprises a controller, a PCIE switch and a PCIE NVME controller, wherein the controller is configured as follows: identifying the hard disk type of the hard disk to be connected in response to the received external signal; Determining interface information according to the hard disk type and a preset hard disk interface comparison table, wherein the hard disk interface comparison table includes the hard disk type and interface information corresponding to the hard disk type; In response to the access of the hard disk to be connected, the interface information is transmitted to the PCIE switch, so that the PCIE switch sets the PCIE NVME controller according to the interface information to configure the PCIE interface corresponding to the hard disk to be connected.
5. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 3 is implemented.
6. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 3 is implemented.
Citation Information
Patent Citations
Hard disk backboard, manufacturing and implementation method thereof
CN107357376A
Solid state disk based on NVMe protocol
CN111104360A