1. Technical Field
The present disclosure relates to a control system for storage configuration.
2. Description of Related Art
In order to expand storage space of a computer, a hub may be used to connect two computers. A network address of each computer then needs to be configured, so as to allow access between the computers. However, this is inconvenient and time-consuming to configure the computers.
Therefore, there is room for improvement in the art.
Many aspects of the present disclosure can be better understood with reference to the following drawing(s). The components in the drawing(s) are not necessarily drawn to scale, the emphasis instead being placed upon clearly illustrating the principles of the present disclosure. Moreover, in the drawing(s), like reference numerals designate corresponding parts throughout the several views.
In the embodiment, the third interface 100 is an external serial advanced technology attachment (eSATA) interface, the first interface 102 is a compatibility serial advanced technology attachment (cSATA) interface, and the second interface 104 is 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 interface 102, the control module 106 communicates with the computer or the HDD through the first interface 102. When an HDD is connected to either the first interface 102 or the third interface 100, the power supply module 108 supplies power for the HDD.
The processing unit 203 determines whether the first interface 102 is connected to a computer motherboard or a HDD, and whether the third interface 100 is connected to a HDD, by transmitting detection signals to the first and third interfaces 102 and 100. For example, when the processing unit 203 outputs a detection signal to the first interface 102, if a HDD is connected to the first interface 102, the HDD sends back a first conforming signal to the processing unit 203 through the first interface 102 and the transmitting unit 201, in that order. Hence, the processing unit 203 determines that the HDD is connected to the first interface 102 when the processing unit 203 receives the first conforming signal. Alternatively, if the second computer 30 is connected to the first interface 102, the second computer 30 outputs a second conforming signal to the processing unit 203. Thus, the processing unit 203 determines that the second computer 30 is connected to the first interface 102.
If the HDD is connected to the first interface 102 or the third interface 100, the processing unit 203 adds the HDD to the storage module 20 to expand the storage space of the first computer 40. Accordingly, the first computer 40 can access the HDD through the first interface 102 or the third interface 100.
If the second computer 30 is connected to the first interface 102, the processing unit 203 obtains states of the storage module 20. In the embodiment, the state of the storage module 20 is either an operation state or an idle state. When the storage module 20 is in the operation state, which indicates that the first computer 40 is accessing the storage module 20. The processing unit 203 sets an interrupt to the first computer 40, thereby stopping the first computer 40 to perform the operation on the storage module 20, the processing unit 203 then stores the data being handled by the first computer 40, so as to prevent data from being lost After that, the second computer 30 can access data stored in the storage module 20 of the first computer 40 through the first interface 102.
In step S1, the processing unit 203 determines whether a HDD is connected to the first interface 102 or the third interface 100, or whether the second computer 30 is connected to the first interface 102. If an HDD is connected to the first interface 102 or the third interface 100, step S2 is implemented; if the second computer 30 is connected to the first interface 102, step S3 is implemented.
In step S2, the processing unit 203 adds the HDD to the storage module 20 to expand the storage space of the first computer 40.
In step S3, the processing unit 203 determines the state of the storage module 20. If the storage module 20 is operating, step S5 is implemented; if the storage module 20 is idle, step S4 is implemented.
In step S4, the second computer 30 accesses the storage module 20 through the first interface 102, and the process goes to step S6.
In step S5, the processing unit 203 sets an interrupt to stop the operation of the storage module 20, and the process returns to step S3.
In step S6, the processing unit 203 determines whether the second computer 30 is still connected to the first interface 102. If the second computer 30 is still connected to the first interface 102, step S7 is implemented; if the computer is disconnected from the first interface 102, the process returns to step S1.
In step S7, the processing unit 203 allows the second computer 30 to access the storage module 20.
While the disclosure has been described by way of example and in terms of a preferred embodiment, it is to be understood that the disclosure is not limited thereto. On the contrary, it is intended to cover various modifications and similar arrangements as would be apparent to those skilled in the art. Therefore, the range of the appended claims should be accorded the broadest interpretation so as to encompass all such modifications and similar arrangements.
Number | Date | Country | Kind |
---|---|---|---|
101129817 | Aug 2012 | TW | national |