The present application relates to the computer field, and in particular, to a hard disk apparatus and a computer system.
As shown in
Because conversion needs to be performed on a message transmitted between the host and the hard disk apparatus, a delay in instruction execution is relatively long.
Embodiments of the present disclosure provide a hard disk apparatus and a computer system, which can reduce a delay in instruction execution.
The following technical solutions are used in the embodiments of the present disclosure.
According to a first aspect, a hard disk apparatus is provided, including an interface module, a CPU, and a storage module, where the interface module is connected to the CPU, the CPU is connected to the storage module, and the CPU communicates with a host using the interface module; the interface module is configured to receive a control instruction transmitted by the host, and transmit the control instruction to the CPU; the CPU is configured to receive the control instruction transmitted by the interface module, and control the storage module according to the instruction; and the CPU is further configured to acquire an execution result of the instruction, and feed back the execution result to the host using the interface module.
With reference to the first aspect, in a first possible implementation manner of the first aspect, the interface module includes a network interface, or the interface module includes a serial interface, or the interface module includes a network interface and a serial interface.
With reference to the first aspect, in a second possible implementation manner of the first aspect, the interface module includes a serial interface; and the CPU is further configured to check the control instruction transmitted by the host using the serial interface.
With reference to the first aspect, in a third possible implementation manner of the first aspect, the interface module includes a network interface and a serial interface, where the serial interface is configured to, when communication performed by the host with the CPU using the network interface fails, receive a configuration parameter of the network interface transmitted by the host, and transmit the configuration parameter to the network interface.
With reference to the first aspect, in a fourth possible implementation manner of the first aspect, the interface module includes a network interface and a serial interface, where the serial interface is configured to, when communication performed by the host with the CPU using the network interface fails, receive a check instruction for checking the storage module transmitted by the host, and transmit the check instruction to the CPU; and the CPU is further configured to perform fault detection on the storage module after receiving the check instruction, and when a fault is detected in the storage module, perform fault recovery on the storage module.
With reference to the first aspect, in a fifth possible implementation manner of the first aspect, the interface module includes a network interface and a serial interface, where the serial interface is configured to, when communication performed by the host with the CPU using the network interface fails, receive a collection instruction for collecting status information of the storage module transmitted by the host, and transmit the collection instruction to the CPU; and the CPU is further configured to collect the status information of the storage module after receiving the collection instruction, and feed back the status information of the storage module to the host using the serial interface.
With reference to the first aspect or with reference to any possible implementation manner of the first aspect, in a sixth possible implementation manner of the first aspect, the storage module includes a mechanical hard disk, or the storage module includes a solid state disk (SSD).
According to a second aspect, a computer system is provided, including a host and a hard disk apparatus, where the hard disk apparatus includes an interface module, a CPU, and a storage module, the interface module is connected to the CPU, the CPU is connected to the storage module, and the CPU communicates with the host using the interface module; the host is configured to transmit a control instruction to the hard disk apparatus using the interface module, and control the hard disk apparatus; the interface module is configured to receive the control instruction transmitted by the host, and transmit the control instruction to the CPU; the CPU is configured to receive the control instruction transmitted by the interface module, and control the storage module according to the instruction; and the CPU is further configured to acquire an execution result of the instruction, and feed back the execution result to the host using the interface module.
With reference to the second aspect, in a first possible implementation manner of the second aspect, the interface module of the hard disk apparatus includes a serial interface, the system further includes a backplane, the backplane is connected to the serial interface of the hard disk apparatus, and the host communicates with the hard disk apparatus using the backplane; the host is further configured to carry an address of the hard disk apparatus when transmitting the control instruction to the hard disk apparatus using the backplane; and the backplane is configured to transmit the control instruction to the hard disk apparatus using the serial interface of the hard disk apparatus according to the address of the hard disk apparatus.
With reference to the second aspect, in a second possible implementation manner of the second aspect, the interface module includes a serial interface; and the CPU is further configured to check the control instruction transmitted by the host using the serial interface.
With reference to the second aspect, in a third possible implementation manner of the second aspect, the interface module includes a network interface and a serial interface; and the host is further configured to, when communication performed by the host with the CPU using the network interface fails, adjust a configuration parameter of the network interface using the serial interface.
With reference to the second aspect, in a fourth possible implementation manner of the second aspect, the interface module includes a network interface and a serial interface; the host is further configured to, when communication performed by the host with the CPU using the network interface fails, transmit the check instruction to the CPU using the serial interface; and the CPU is further configured to: perform fault detection on the storage module after receiving the check instruction, and when a fault is detected in the storage module, perform fault recovery on the storage module.
With reference to the second aspect, in a fifth possible implementation manner of the second aspect, the interface module includes a network interface and a serial interface; the host is further configured to, when communication performed by the host with the CPU using the network interface fails, transmit the collection instruction to the CPU using the serial interface; and the CPU is further configured to collect status information of the storage module after receiving the collection instruction, and feed back the status information of the storage module to the host using the serial interface.
Based on the foregoing technical solutions, according to the hard disk apparatus and the computer system provided in the embodiments of the present disclosure, an interface module receives a control instruction transmitted by a host, and transmits the control instruction to a CPU; the CPU receives the control instruction transmitted by the interface module, and controls a storage module according to the instruction; and the CPU acquires an execution result of the instruction, and feeds back the execution result to the host using the interface module. In this way, a message is directly transmitted between a host and a hard disk apparatus without conversion, and therefore, a delay in instruction execution can be reduced.
To describe the technical solutions in the embodiments of the present disclosure more clearly, the following briefly describes the accompanying drawings required for describing the embodiments. The accompanying drawings in the following description show merely some embodiments of the present disclosure, and a person of ordinary skill in the art may still derive other drawings from these accompanying drawings without creative efforts.
To make the objectives, technical solutions, and advantages of the present disclosure clearer, the following further describes the embodiments of the present disclosure in detail with reference to the accompanying drawings.
A host in the embodiments of the present disclosure is a terminal device that has a computer function, which includes but is not limited to a desktop computer, a notebook computer, and a tablet computer.
A storage module in the embodiments of the present disclosure includes but is not limited to a flash component, a mechanical hard disk, and a solid state disk (SSD).
As shown in
The interface module 11 is configured to receive a control instruction transmitted by the host, and transmit the control instruction to the CPU 12.
The CPU 12 is configured to receive the control instruction transmitted by the interface module 11, and control the storage module 13 according to the instruction.
The CPU 12 is further configured to acquire an execution result of the instruction, and feed back the execution result to the host using the interface module 11.
Specifically, the interface module 11 transmits the control instruction of a network format to the CPU 12, where the control instruction of the network format is transmitted by the host. The CPU 12 controls the storage module 13 by directly applying the control instruction of the network format. After acquiring the execution result of the instruction, the CPU 12 directly feeds back the execution result to the host. The control instruction may be a data write instruction, a data read instruction, or the like, and the execution result may be execution success or execution failure.
According to the hard disk apparatus in this embodiment of the present disclosure, an interface module receives a control instruction transmitted by a host, and transmits the control instruction to the CPU; the CPU receives the control instruction transmitted by the interface module, and controls the storage module according to the instruction; and the CPU acquires an execution result of the instruction, and feeds back the execution result to the host using the interface module. In this way, a message is directly transmitted between a host and a hard disk apparatus without conversion, and therefore, a delay in instruction execution can be reduced.
In this embodiment of the present disclosure, the interface module 11 includes a network interface 111, or the interface module 11 includes a serial interface 112, or the interface module 11 includes a network interface 111 and a serial interface 112. In this way, the host is connected to the hard disk apparatus using multiple types of interfaces, which can improve reliability.
In this embodiment of the present disclosure, optionally, when the interface module 11 includes the serial interface 112, the CPU 12 is further configured to check the control instruction transmitted by the host using the serial interface 112. In this way, a control instruction that may cause a fault of the storage module may be filtered out.
In this embodiment of the present disclosure, optionally, when the interface module 11 includes the network interface 111 and the serial interface 112, the serial interface 112 is configured to, when communication performed by the host with the CPU 12 using the network interface 111 fails, receive a configuration parameter of the network interface 111 transmitted by the host, and transmit the configuration parameter to the network interface 111, so as to ensure normal communication between the network interface 111 and the host. For example, the configuration parameter may include an Internet Protocol (IP) address, a network mask, and the like.
In this embodiment of the present disclosure, optionally, the interface module 11 includes the network interface 111 and the serial interface 112, and the serial interface 112 is configured to, when communication performed by the host with the CPU 12 using the network interface 111 fails, receive a check instruction for checking the storage module 13 transmitted by the host, and transmit the check instruction to the CPU 12. Accordingly, the CPU 12 is further configured to perform fault detection on the storage module 13 after receiving the check instruction, and when a fault is detected in the storage module 13, perform fault recovery on the storage module 13. In this way, when a fault occurs on the network interface 111, the host can still control fault detection on the storage module 13, thereby improving system stability.
In this embodiment of the present disclosure, optionally, the interface module 11 includes the network interface 111 and the serial interface 112, and the serial interface 112 is configured to, when communication performed by the host with the CPU 12 using the network interface 111 fails, receive a collection instruction for collecting status information of the storage module 13 transmitted by the host, and transmit the collection instruction to the CPU 12. Accordingly, the CPU 12 is further configured to collect the status information of the storage module 13 after receiving the collection instruction, and feed back the status information of the storage module 13 to the host using the serial interface 112. For example, when the storage module 13 is a hard disk, the status information may include information, such as Self-Monitoring Analysis and Reporting Technology (SMART) data and a hard disk log. In this way, when a fault occurs on the network interface 111, the host can still collect the status information of the storage module 13, thereby improving system reliability.
According to the hard disk apparatus in this embodiment of the present disclosure, an interface module receives a control instruction transmitted by a host, and transmits the control instruction to the CPU; the CPU receives the control instruction transmitted by the interface module, and controls the storage module according to the instruction; and the CPU acquires an execution result of the instruction, and feeds back the execution result to the host using the interface module. In this way, a message is directly transmitted between a host and a hard disk apparatus without conversion, and therefore, a delay in instruction execution can be reduced.
According to the hard disk apparatus in this embodiment of the present disclosure, when a fault occurs on a network interface, the host communicates with the hard disk apparatus using a serial interface, thereby improving reliability of the hard disk apparatus. In addition, a peripheral converting circuit in the prior art is omitted from the hard disk apparatus in this embodiment of the present disclosure, so that a volume of the hard disk apparatus can be reduced and costs of components can be reduced.
As shown in
The host 20 is configured to transmit a control instruction to the hard disk apparatus 10 using the interface module 11, and control the hard disk apparatus 10.
The interface module 11 is configured to receive the control instruction transmitted by the host 20, and transmit the control instruction to the CPU 12.
The CPU 12 is configured to receive the control instruction transmitted by the interface module 11, and control the storage module 13 according to the instruction.
The CPU 12 is further configured to acquire an execution result of the instruction, and feed back the execution result to the host 20 using the interface module 11.
According to the computer system in this embodiment of the present disclosure, an interface module of a hard disk apparatus receives a control instruction transmitted by a host, and transmits the control instruction to the CPU; the CPU receives the control instruction transmitted by the interface module, and controls the storage module according to the instruction; and the CPU acquires an execution result of the instruction, and feeds back the execution result to the host using the interface module. In this way, a message is directly transmitted between a host and a hard disk apparatus without conversion, and therefore, a delay in instruction execution can be reduced.
In this embodiment of the present disclosure, optionally, the interface module 11 includes a network interface 111, or the interface module 11 includes a serial interface 112, or the interface module 11 includes a network interface 111 and a serial interface 112. In this way, the host is connected to the hard disk apparatus using multiple types of interfaces, which can improve reliability.
As shown in
In this embodiment of the present disclosure, the host 20 connected to the network interface 111 of the hard disk apparatus 10 using a network cable. A command sent by the host 20 passes through the network interface 111 and arrives at the CPU 12. After parsing the command, the CPU 12 directly controls the storage module 13 to execute the command sent by the host 20. After the command is executed, the CPU 12 feeds back an execution result of the command to the host 20 using the network interface 111. After receiving the command using the network interface 111, the hard disk apparatus 10 can directly control a disk sheet apparatus to read and write data. A converting circuit does not need to be added to an exterior of a hard disk, and conversion of an ATA/SCSI command is not needed either. The host is connected to the serial interface 112 of the hard disk apparatus 10 using a serial interface. A command sent by the host 20 passes through the serial interface 112 and arrives at the CPU 12. After parsing the command, the CPU 12 directly controls the storage module 13 to execute the command sent by the host. After the command is executed, the CPU 12 feeds back an execution result of the command to the host 20 using the serial interface 112. Using the serial interface, the command delivered by the host 20 using the network interface 111 may be monitored, so as to filter out a command that may cause a fault of the hard disk apparatus 10. When an IP address fails to be acquired using the network interface 111, a network parameter of the network interface 111, such as the IP address and a network mask, is set using the serial interface 112, so that the network interface 111 can normally communicate with the host. When communication between the network interface 111 and the host is abnormal, a command is delivered to the hard disk apparatus 10 using the serial interface 112, so as to perform diagnosis to determine whether a fault occurs in the hard disk apparatus and perform recovery. In addition, key information, such as SMART data and a hard disk log, of the hard disk is collected using the serial interface 112.
It should be noted that in this embodiment of the present disclosure, only an example in which the interface module includes both a network interface and a serial interface is used for description. In another embodiment of the present disclosure, the interface module may include only a network interface, or the interface module may include only a serial interface, functions implemented by the network interface and the serial interface are similar, and this embodiment of the present disclosure sets no specific limitation.
According to the computer system in this embodiment of the present disclosure, an interface module receives a control instruction transmitted by a host, and transmits the control instruction to the CPU; the CPU receives the control instruction transmitted by the interface module, and controls the storage module according to the instruction; and the CPU acquires an execution result of the instruction, and feeds back the execution result to the host using the interface module. In this way, a message is directly transmitted between a host and a hard disk apparatus without conversion, and therefore, a delay in instruction execution can be reduced. When a fault occurs on a network interface, the host communicates with the hard disk apparatus using a serial interface, thereby improving reliability of the hard disk apparatus. In addition, a peripheral converting circuit in the prior art is omitted from the hard disk apparatus in this embodiment of the present disclosure, so that a volume of the hard disk apparatus can be reduced and costs of components can be reduced.
As shown in
According to a serial interface cascading solution for the apparatus in the present disclosure, a serial interface cascading manner is greatly simplified, and multiple hard disk apparatuses share a same serial interface of a backplane, which improves maintainability of the system. Because the hard disk apparatus can directly provide a network interface, a hard disk can be directly accessed using a network interface without converting an ATA/SCSI command, and a command delay is reduced. However, when a fault occurs on the network interface of the hard disk apparatus, a host communicates with the hard disk apparatus using a provided serial interface, can set a parameter of the network interface, can monitor a command delivered using the network interface, can perform fault diagnosis and recovery on the hard disk apparatus, can collect key information of the hard disk apparatus, and the like, thereby improving reliability of the hard disk apparatus. In addition, a peripheral converting circuit is no longer needed to provide a network interface, a quantity of components in the hard disk apparatus is reduced, and the peripheral converting circuit is omitted from the hard disk apparatus, so that a volume of the hard disk apparatus can be reduced, and costs of the components can be reduced.
In another implementation manner shown in
According to a serial interface cascading solution for the apparatus in the present disclosure, a serial interface cascading manner is greatly simplified, and multiple hard disk apparatuses share a same serial interface of a backplane, which improves maintainability of the system.
In this embodiment of the present disclosure, optionally, when the interface module 11 includes the serial interface 112, the CPU 12 is further configured to check the control instruction transmitted by the host 20 using the serial interface 112. In this way, a control instruction that may cause a fault of the storage module 13 may be filtered out.
In this embodiment of the present disclosure, optionally, when the interface module 11 includes the network interface 111 and the serial interface 112, the host 20 is further configured to, when communication performed by the host 20 with the CPU 12 using the network interface 111 fails, adjust a configuration parameter of the network interface 111 using the serial interface 112, so as to ensure normal communication between the network interface 111 and the host. For example, the configuration parameter may include an IP address, a network mask, and the like.
In this embodiment of the present disclosure, optionally, when the interface module 11 includes the network interface 111 and the serial interface 112, the host 20 is further configured to transmit the check instruction to the CPU 12 using the serial interface 112 when communication performed by the host 20 with the CPU 12 using the network interface 111 fails. Accordingly, the CPU 12 is further configured to perform fault detection on the storage module 13 after receiving the check instruction, and when a fault is detected in the storage module 13, perform fault recovery on the storage module 13. In this way, when a fault occurs on the network interface 111, the host can still control fault detection on the storage module 13, thereby improving system stability.
In this embodiment of the present disclosure, optionally, when the interface module 11 includes the network interface 111 and the serial interface 112, the host 20 is further configured to transmit the collection instruction to the CPU 12 using the serial interface 112 when communication performed by the host 20 with the CPU 12 using the network interface 111 fails. Accordingly, the CPU 12 is further configured to collect status information of the storage module 13 after receiving the collection instruction, and feed back the status information of the storage module 13 to the host 20 using the serial interface 112. For example, when the storage module 13 is a hard disk, the status information may include information, such as SMART data and a hard disk log. In this way, when a fault occurs on the network interface 111, the host can still collect the status information of the storage module 13, thereby improving system reliability.
According to the computer system in this embodiment of the present disclosure, an interface module of a hard disk apparatus receives a control instruction transmitted by a host, and transmits the control instruction to the CPU; the CPU receives the control instruction transmitted by the interface module, and controls the storage module according to the instruction; and the CPU acquires an execution result of the instruction, and feeds back the execution result to the host using the interface module. In this way, a message is directly transmitted between a host and a hard disk apparatus without conversion, and therefore, a delay in instruction execution can be reduced.
In the computer system in this embodiment of the present disclosure, because the hard disk apparatus can directly provide a network interface, a hard disk can be directly accessed using a network interface without converting an ATA/SCSI command, and a command delay is reduced. However, when a fault occurs on the network interface of the hard disk apparatus, a host communicates with the hard disk apparatus using a provided serial interface, can set a parameter of the network interface, can monitor a command delivered using the network interface, can perform fault diagnosis and recovery on the hard disk apparatus, can collect key information of the hard disk, and the like, thereby improving reliability of the hard disk apparatus. In addition, a peripheral converting circuit is no longer needed to provide a network interface, a quantity of components in the hard disk apparatus is reduced, and the peripheral converting circuit is omitted from the hard disk apparatus, so that a volume of the hard disk apparatus can be reduced, and costs of the components can be reduced.
A person of ordinary skill in the art may be aware that, in combination with the examples described in the embodiments disclosed in this specification, units and algorithm steps may be implemented by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are performed by hardware or software depends on particular applications and design constraint conditions of the technical solutions. A person skilled in the art may use different methods to implement the described functions for each particular application, but it should not be considered that such implementation goes beyond the scope of the present disclosure.
According to the foregoing description of the embodiments, it may be clearly understood by a person skilled in the art that the present disclosure may be implemented by software plus universal hardware, where the universal hardware includes a universal integrated circuit, a universal CPU, a universal memory, a universal device, and the like, or certainly may be implemented by application-specific hardware, including an application-specific integrated circuit, an application-specific CPU, an application-specific memory, an application-specific device, and the like, but in many cases, the former one is preferred. Based on such an understanding, the technical solutions of the present disclosure essentially or the part contributing to the prior art may be implemented in a form of a software product. The software product is stored in a readable storage medium, such as a floppy disk, a hard disk or an optical disc of a computer, and includes several instructions for instructing a computer device (which may be a personal computer, a server, or a network device) to perform the methods described in the embodiments of the present disclosure.
The foregoing descriptions are merely exemplary embodiments of the present disclosure, but are not intended to limit the present disclosure. Any modification, equivalent replacement, and improvement made without departing from the spirit and principle of the present disclosure shall fall within the protection scope of the present disclosure.
Number | Date | Country | Kind |
---|---|---|---|
201410132202.1 | Apr 2014 | CN | national |
This application is a continuation of International Application No. PCT/CN2014/092993, filed on Dec. 4, 2014, which claims priority to Chinese Patent Application No. 201410132202.1, filed on Apr. 2, 2014. The disclosures of the aforementioned applications are hereby incorporated by reference in their entireties.
Number | Date | Country | |
---|---|---|---|
Parent | PCT/CN2014/092993 | Dec 2014 | US |
Child | 15281952 | US |