This application is based upon and claims the benefit of priority of the prior Japanese Patent Application No. 2010-258165, filed on Nov. 18, 2010, the entire contents of which are incorporated herein by reference.
The embodiments discussed herein are related to a relay apparatus, a method of controlling a relay apparatus, and a device controller.
Recently, storage devices and the like have employed Serial Attached SCSI (SAS) or Serial Advanced Technology Attachment (SATA) as standards for connecting devices such as hard disks. Relay apparatuses, such as expanders, that have physical ports compliant with such an SAS or SATA standard and that relay transmission and receiving of data between a higher-level apparatus and devices are known.
In cases where a change occurs in the state of the connected device because a device is removed and attached due to failure or for maintenance of the device, such a relay apparatus notifies a higher-level apparatus of the state change by broadcasting.
Specifically as illustrated in
Here the processing of the relay apparatus is described using an example illustrated in
Then, the expander “#1” that has received the notification acquires information related to the connection state held by the lower-level expander “#2”, and updates a direct table for the expander “#1” and a routing table that stores information related to the connection state between an expander lower in level than the expander “#1” and devices connected to the lower-level expander. The expander “#1” issues a broadcast notifying a higher-level expander “#0” of the state change. Thereafter, the expander “#0” acquires information related to the connection state held by the lower-level expander “#2”, and updates a direct table and a routing table, and notifies the ROC of the change in the connection state. Note that the direct table stores information related to the connection state between the expander addressed and devices connected directly thereto. The routing table stores information related to the connection state between a lower-level expander and devices connected thereto.
However, with the aforementioned technique of issuing a broadcast, a broadcast notifying a higher-level apparatus of information related to the connection state is issued every time a change occurs in the connection state of devices. This technique therefore has a problem in that resources such as a memory and a central processing unit (CPU) are wastefully consumed. In other words, even in cases in which a change in the connection state of devices is a temporary change and therefore a broadcast notifying a higher-level apparatus of information related to the connection state need not be issued, a broadcast is issued every time, which results in wasteful consumption of resources, such as a memory and a CPU, of a relay apparatus.
A relay apparatus for relaying data transmission between devices, the rely apparatus includes a storing unit configured to store information related to a connection state between the relay apparatus and a device connected thereto, a determining unit configured to determine whether a change in the connection state is a temporary change, based on a change factor responsible for the change in the connection state, in a case in which the change occurs in the connection state between the relay apparatus and the connected device, an updating unit configured to discontinue updating information related to the connection state stored in the first storing unit when it is determined by the determining unit that the change in the connection state is a temporary change, and update, based on the change in the connection state, the information related to the connection state stored in the first storing unit when it is determined by the determining unit that the change in the connection state is not a temporary change, and a notifying unit configured to discontinue notifying a higher level apparatus of the change in the connection state when it is determined by the determining unit that the change in the connection state is a temporary change, and notify the higher level apparatus of the change in the connection state when it is determined by the determining unit that the change in the connection state is not a temporary change.
The object and advantages of the invention will be realized and attained at least of the elements, features, and combinations particularly pointed out in the claims.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory and are not restrictive of the invention, as claimed.
Preferred embodiments of a relay apparatus, a relay method and a device controller according to this technique is described in detail below with reference to the accompanying drawings.
The configuration of a device control system including expanders according to a first embodiment is described with reference to
Each expander 10 is connected to the HDDs 30, which are devices compliant with the SAS or SATA standard, and controls data communications carried out between the expander 10 and the HDDs 30. Each expander 10 also notifies a higher-level expander 10 or a ROC 20 of various events that have occurred in the HDDs 30 connected directly to that expander 10. For example, using an example illustrated in
The ROC 20 is connected to the highest-level expander EXP#0 and is a device that controls the entirety of the expanders 10 and executes an instruction received from a server (not illustrated). For example, upon accepting a data acquisition instruction from a server, the ROC 20 acquires data through the expanders 10 from the HDD 30 and transmits the acquired data to the server. The ROC 20 holds information related to the connection states of the HDDs 30 as a routing table (to be described in detail later with reference to
Next, with reference to
The Phys 21 to 28 are physical ports compliant with a SAS or SATA standard, and each connects the expander 10 and another device through a bus. Specifically, the Phys 22 to 27 are connected to the HDDs 30, which are devices connected to the expander 10, the Phy 21 is connected to the expander 10 which is lower in level than the expander 10 addressed, and the Phy 28 is connected to an expander which is higher in level than the expander 10 addressed or the ROC 20.
The CPU 32 loads the memory 31 with firmware and performs processing for the PHY change detecting unit 11, the direct table acquisition waiting unit 12, the table acquisition unit 13, the table control unit 14, and the broadcast issuing unit 15, which are described later. In the memory 31, firmware used for various processing is loaded, and a direct table 16a and a routing table 16b described later are stored.
With reference back to
The routing table 16b stores information related to the connection state between lower-level expanders and devices connected thereto. Specifically, as exemplarily illustrated in
In the case in which a change occurs in the connection state between the expander addressed and a device connected thereto, the PHY change detecting unit 11 determines, based on a change factor responsible for the change in the connection state, whether the change in the connection state is a temporary change. Specifically, the PHY change detecting unit 11 detects whether the connection state of the device connected to the expander addressed has changed. If the PHY change detecting unit 11 detects that the connection state of the device connected to the expander addressed has changed, the PHY change detecting unit 11 identifies the change factor responsible for the change in the connection state, and determines, based on the change factor, whether the change in the connection state is a temporary change.
Here, with reference to
In the case in which the PHY change detecting unit 11 detects, for example, from mount information that removal or insertion of a disk or a cable is the change factor, and in the case in which powering off or on of a device is the change factor, the PHY change detecting unit 11 determines that the change in the connection state is not a temporary change and the change may continue for a long time.
In the case in which a notification of a change in the connection state is received from a lower-level expander by broadcasting, the PHY change detecting unit 11 notifies the table acquisition unit 13 of the receipt of a broadcast.
If, based on the change factor, it is determined that the change in the connection state is a temporary change, the direct table acquisition waiting unit 12 waits, for a certain time, for processing of generating a direct table to be performed. Specifically, the direct table acquisition waiting unit 12 provides a timer by firmware processing so that the processing of a direct table is controlled, wait for a certain period.
The table acquisition unit 13 acquires the direct table 16a from the storing unit 16 in the case in which the connection state between the expander addressed and devices connected thereto changes. In the case in which a notification of a change in the connection state is received as a broadcast from a lower-level expander, the table acquisition unit 13 acquires the routing table 16b from the lower-level apparatus and acquires the routing table 16b from the storing unit 16 of the expander addressed.
Specifically, in the case in which a change occurs in the connection state between the expander addressed and the HDD 30, which is a device connected to the expander addressed, the table acquisition unit 13 acquires information from the device connected to the expander addressed, generates a new direct table that reflects the acquired information and causes the storing unit 16 to store the new direct table. Here, a new direct table is generated, and, at substantially the same time, the old direct table that does not reflect information related to the current connection state is held in the storing unit 16. This is because the table control unit 14 described later compares new and old direct tables.
Upon receiving, from the PHY change detecting unit 11, a notification to the effect that the notification has been received by broadcasting, the table acquisition unit 13 acquires the routing table 16b from a lower-level expander and acquires the routing table 16b from the storing unit 16 of the expander addressed.
If the change in the connection state is a temporary change, then the table control unit 14 discontinues updating information related to the connection state stored in the direct table 16a and the routing table 16b. By contrast, if the change in the connection state is not a temporary change, then, based on the change in the connection state, the table control unit 14 updates information related to the connection states stored in the direct table 16a and the routing table 16b.
Specifically, in the case in which a change occurs in the connection state between the expander addressed and the HDD 30, which is a device connected to the expander addressed, the table control unit 14 compares an old direct table acquired from the storing unit by the table acquisition unit 13 with a new direct table in which information related to the current connection status is reflected by the table acquisition unit 13. As a result, if the new and old direct tables match, the table control unit 14 discontinues updating information related to the connection state stored in the direct table 16a and maintains the direct table 16a stored in the storing unit 16 as the old direct table. If the new and old direct tables do not match each other, the table control unit 14 updates the direct table 16a stored in the storing unit 16 to the new direct table.
Here, with reference to
The comparison process is described using an example in which it is assumed that the direct table exemplarily illustrated in
In the case in which the table control unit 14 receives a notification of a change in the connection state from a lower-level expander by broadcasting, the table control unit 14 compares an old routing table acquired from the storing unit by the table acquisition unit 13 with a new routing table in which information related to the current connection status is reflected by the table acquisition unit 13. As a result, if the new and old routing tables match, the table control unit 14 discontinues updating information related to the connection state stored in the routing table 16b and maintains the routing table 16b stored in the storing unit 16 as of the old routing table. If the new and old routing tables do not match, the table control unit 14 updates the routing table 16b stored in the storing unit 16 to the new routing table.
Here, with reference to
The comparison process is described using an example in which it is assumed that the routing table exemplarily illustrated in
If it is determined that the change in the connection state is a temporary change, the broadcast issuing unit 15 discontinues issuing a broadcast to the expander 10 higher in level than the expander addressed or the ROC 20. In the case in which it is determined that the change in the connection state is not a temporary change, the broadcast issuing unit 15 issues a broadcast to the higher-level expander 10 or the ROC 20.
Specifically, if it is determined by the table control unit 14 that new and old direct tables or new and old routing tables do not match, the broadcast issuing unit 15 issues a broadcast to the higher-level expander 10 or the ROC 20.
Next, with reference to
As illustrated in
As a result, if the PHY change detecting unit 11 determines that the change in the link status does not result in immediate restoration of the link status (No in S103), the table acquisition unit 13 generates a new direct table (S105). If the PHY change detecting unit 11 determines that the change in the link status results in immediate restoration of the link status (Yes in S103), the table acquisition unit 13 waits for a specified time (S104) and generates a new direct table (S105). Here, as generating a new direct table, the table acquisition unit 13 acquires information related to the current connection state from a device connected to the expander addressed, and generates a new direct table that reflects the acquired information related to the current connection status.
The table control unit 14 compares an old direct table acquired from the storing unit by the table acquisition unit 13 with a new direct table in which information related to the current connection status is reflected by the table acquisition unit 13 (S106). As a result, if the new and old direct tables match (Yes in S107), the table control unit 14 discontinues updating the direct table 16a and issuing a broadcast, and the table control unit 14 ends the flow. If the new and old direct tables do not match (No in S107), the table control unit 14 updates the direct table 16a stored in the storing unit 16 to the new direct table (S108). The broadcast issuing unit 15 issues a broadcast to the higher-level expander 10 or the ROC 20 (S109).
Next, with reference to
The table control unit 14 compares the old routing table with the new routing table (S202). As a result, if the new and old routing tables match (Yes in S203), the table control unit 14 discontinues updating the routing table 16b and issuing a broadcast to a higher-level device, and the table control unit 14 ends the flow.
If the new and old routing tables do not match (No in S203), the table control unit 14 updates the routing table 16b stored in the storing unit 16 to the new routing table (S204). The broadcast issuing unit 15 issues a broadcast to the higher-level expander 10 or the ROC 20 (S205).
As described above, in the case in which a change occurs in the connection state between the expander 10 and a device connected thereto, that expander 10 determines, based on the change factor responsible for the change in the connection state, whether the change in the connection state is a temporary change. If it is determined that the change in the connection state is a temporary change, the expander 10 discontinues updating information related to the connection state stored in the direct table 16a. If it is determined that the change in the connection state is not a temporary change, the expander 10 updates information related to the connection state stored in the direct table 16a, based on the change in the connection state. The expander 10 discontinues notifying an apparatus higher in level than the expander 10 of the change in the connection state if it is determined that the change in the connection state is a temporary change, whereas the expander 10 notifies the higher-level apparatus of the change in the connection state if it is determined that the change in the connection state is not a temporary change. This can reduce or prevent resources of the expander 10 from being wastefully consumed.
In other words, in the case in which a change occurs in the connection state between the expander 10 and a device, the expander 10 determines from the change factor whether the change in the connection state is not a temporary change, and discontinues issuing a broadcast if the change is a temporary change. Wasteful consumption of resources of the expander 10 can therefore be reduced or prevented.
According to the first embodiment, the expander 10 identifies whether the change factor responsible for the change in the connection state is a reset from a higher-level apparatus, removal or insertion of a cable, or powering on or off, and, depending on the identified change factor, the expander 10 determines whether the change in the connection state is a temporary change. Therefore, whether the change in the connection state is a temporary change can be appropriately determined from the change factor responsible for the change in the connection state of a device. This can appropriately reduce or prevent resources of the expander 10 from being wastefully consumed.
According to the first embodiment, the expander 10 includes the routing table 16b storing information related to the connection state between an apparatus lower in level than that of expander 10 and a device connected to the lower-level apparatus. Upon receiving a notification of a change in the connection state from the lower-level apparatus by broadcasting, the expander 10 requests information related to the connection state held by the lower-level apparatus and acquires the information related to the connection state. The expander 10 compares the acquired information related to the connection state that is held by the lower-level apparatus with information related to the connection state between the apparatus lower in level than that expander 10 and a device connected to the lower-level apparatus that is stored in the storing unit 16. The expander 10 discontinues updating information related to the connection state stored in the routing table 16b if the acquired information and the stored information match as a result of comparison, whereas the expander 10 updates information related to the connection state stored in the routing table 16b if the acquired information and the stored information do not match. The expander 10 discontinues notifying an apparatus higher in level than that expander 10 of the change in the connection state if the acquired information and the stored information match as a result of comparison, whereas the expander 10 notifies the higher-level apparatus of the change in the connection state if the acquired information and the stored information do not match. As a result, if there is no change in the routing table 16b before and after the receipt of a broadcast, the expander 10 discontinues issuing a broadcast. Consequently, wasteful consumption of resources of the expander 10 can be appropriately reduced or prevented.
The embodiment of the technique has been described above; however, it is to be understood that the technique may be embodied in various forms other than the foregoing embodiment. Another embodiment included in the technique is described as a second embodiment hereinbelow.
The constituent elements of apparatuses illustrated in the drawings are functionally conceptual, and need not be physically configured as illustrated. In other words, specific forms of distribution and integration of the apparatuses are not limited to those illustrated in the drawings, and all or part thereof may be functionally or physically distributed and integrated in arbitrary units in accordance with various loads and the status of use. For example, the table acquisition unit 13 and the table control unit 14 may be integrated. Further, all or an arbitrary part of processing functions to be performed in the apparatuses may be implemented by a CPU and programs to be analyzed and executed by the CPU, or may be implemented as hardware by wired logic.
It is to be noted that the relay method described in this embodiment may be implemented by executing a prepared program on a computer such as a personal computer or a workstation. The program may be distributed over a network such as the Internet. Moreover, the program may be recorded on a computer-readable recording medium such as a hard disk, a flexible disk (FD), a compact disk-read only memory (CD-ROM), a magneto-optical (MO) disk or a digital versatile disk (DVD), and be read from the recording medium by the computer so that the program is executed.
All examples and conditional language recited herein are intended for pedagogical purposes to aid the reader in understanding the invention and the concepts contributed by the inventor to furthering the art, and are to be construed as being without limitation to such specifically recited examples and conditions, nor does the organization of such examples in the specification relate to a showing of the superiority and inferiority of the invention. Although the embodiments of the present invention have been described in detail, it should be understood that the various changes, substitutions, and alterations could be made hereto without departing from the spirit and scope of the invention.
Number | Date | Country | Kind |
---|---|---|---|
2010-258165 | Nov 2010 | JP | national |