CONTROL SYSTEM AND METHOD FOR STORAGE CONFIGURATION

A control system for storage configuration of a first computer includes a switch apparatus and a storage module. The switch apparatus determines whether a second computer or a hard disk drive (HDD) is connected to a first interface of the switch apparatus. The second computer accesses the storage module of the first computer in response to the storage module being idle. The HDD is added to the storage of the first computer to expand the storage space of the first computer in response to the HDD being connected to the first interface.

DETAILED DESCRIPTION

FIG. 1shows an embodiment of a control system for storage configuration. The control system includes a first interface102, a second interface104, a third interface100, a control module106, a power supply module108, and a storage module20. The first interface102, the second interface104, the third interface100, the control module106, and the power supply module108are arranged on a switch apparatus10. The storage module20includes a plurality of hard disk drives (HDDs).

In the embodiment, the third interface100is an external serial advanced technology attachment (eSATA) interface, the first interface102is a compatibility serial advanced technology attachment (cSATA) interface, and the second interface104is a peripheral component interconnect express (PCIe) interface. The cSATA interface is a self-definable serial interface with substantially the same functionality as the eSATA interface. When a computer or an HDD is connected to the first interface102, the control module106communicates with the computer or the HDD through the first interface102. When an HDD is connected to either the first interface102or the third interface100, the power supply module108supplies power for the HDD.

FIG. 2shows that the switch apparatus10and the storage module20are arranged in a first computer40. In the embodiment, the switch apparatus10is connected to the first computer40through the second interface104. A second computer30is coupled to the switch apparatus10through the first interface102for accessing the storage module20.

FIG. 3shows that the control module106includes a transmitting unit201and a processing unit203. The transmitting unit201transmits data between the storage module20and the first to third interfaces102,104, and100.

The processing unit203determines whether the first interface102is connected to a computer motherboard or a HDD, and whether the third interface100is connected to a HDD, by transmitting detection signals to the first and third interfaces102and100. For example, when the processing unit203outputs a detection signal to the first interface102, if a HDD is connected to the first interface102, the HDD sends back a first conforming signal to the processing unit203through the first interface102and the transmitting unit201, in that order. Hence, the processing unit203determines that the HDD is connected to the first interface102when the processing unit203receives the first conforming signal. Alternatively, if the second computer30is connected to the first interface102, the second computer30outputs a second conforming signal to the processing unit203. Thus, the processing unit203determines that the second computer30is connected to the first interface102.

If the HDD is connected to the first interface102or the third interface100, the processing unit203adds the HDD to the storage module20to expand the storage space of the first computer40. Accordingly, the first computer40can access the HDD through the first interface102or the third interface100.

If the second computer30is connected to the first interface102, the processing unit203obtains states of the storage module20. In the embodiment, the state of the storage module20is either an operation state or an idle state. When the storage module20is in the operation state, which indicates that the first computer40is accessing the storage module20. The processing unit203sets an interrupt to the first computer40, thereby stopping the first computer40to perform the operation on the storage module20, the processing unit203then stores the data being handled by the first computer40, so as to prevent data from being lost After that, the second computer30can access data stored in the storage module20of the first computer40through the first interface102.

FIG. 4shows that the control method of the present disclosure includes the following steps.

In step S1, the processing unit203determines whether a HDD is connected to the first interface102or the third interface100, or whether the second computer30is connected to the first interface102. If an HDD is connected to the first interface102or the third interface100, step S2is implemented; if the second computer30is connected to the first interface102, step S3is implemented.

In step S2, the processing unit203adds the HDD to the storage module20to expand the storage space of the first computer40.

In step S3, the processing unit203determines the state of the storage module20. If the storage module20is operating, step S5is implemented; if the storage module20is idle, step S4is implemented.

In step S4, the second computer30accesses the storage module20through the first interface102, and the process goes to step S6.

In step S5, the processing unit203sets an interrupt to stop the operation of the storage module20, and the process returns to step S3.

In step S6, the processing unit203determines whether the second computer30is still connected to the first interface102. If the second computer30is still connected to the first interface102, step S7is implemented; if the computer is disconnected from the first interface102, the process returns to step S1.

In step S7, the processing unit203allows the second computer30to access the storage module20.