Abstract:
A method and apparatus for automatic discovery of logical units (LUs) and storage devices connected to a device in a storage network, the LUs being discovered with their associated LU paths. The method and apparatus performs, for each target path, discovering LUs exposed on said target path; iteratively, for each discovered LU generating a list of LU paths associated with the discovered LU; retrieving at least attributes related to said discovered LU; and, correlating between identical LUs, thereby identifying LU paths directing to the same LU.

Description:
TECHNICAL FIELD  
       [0001]     The present invention relates generally to storage area networks and, more particularly, to a method for discovering the topology of logical and storage devices connected through a small computer systems interface (SCSI) interface.  
       BACKGROUND OF THE INVENTION  
       [0002]     The rapid growth in data intensive applications continues to fuel the demand for raw data storage capacity. As a result, there is an ongoing need to add more storage, file servers, and storage services to an increasing number of users. To meet this growing demand, the concept of storage area network (SAN) was introduced. A SAN is defined as a network having the primary purpose of the transfer of data between computer systems and storage devices. In a SAN environment, storage devices and servers are generally interconnected through various switches and appliances. This structure generally allows for any server on the SAN to communicate with any storage device and vice versa. It also provides alternative paths from a server to a storage device.  
         [0003]     To increase the utilizations of SANs, extend the scalability of storage devices, and increase the availability of data, the concept of storage virtualization has recently developed. Storage virtualization offers the ability to isolate a host from the diversity of storage devices. The result is a substantial reduction in support effort and end-user impact.  
         [0004]     A SAN enabling storage virtualization operation typically includes one or more virtualization switches. A virtualization switch is connected to a plurality of hosts through a network, such as a local area network (LAN) or a wide area network (WAN). The connections formed between the hosts and the virtualization switches can utilize any protocol including, but not limited to, Gigabit Ethernet carrying packets in accordance with the internet small computer systems interface (iSCSI) protocol, Infiniband protocol, and others. A virtualization switch is further connected to a plurality of storage devices through a interconnect interface, such as Fibre Channel (FC), Parallel SCSI (P.SCSI), and the likes. A storage device is addressable using a logical unit number (LUN). LUNs are used to identify a logical storage device that is presented by a storage subsystem or network device and specified in a SCSI command.  
         [0005]     Hosts (i.e., initiators) and storage devices (i.e., targets) connected in a SAN architecture need to find and identify each other to communicate. The process used by the host for identifying exposed targets and establishing their address locations is called discovery. In a SAN where hosts are connected directly to storage devices, e.g., through a SCSI bus, a host can automatically discover storage devices on a SCSI bus, for example, by using a SCSI ‘devices’ command. The SCSI ‘devices’ command initiates a discovery process on the SCSI bus and returns to the host a list of attached storage devices. The list includes the number of attached storage devices, and for each attached device the bus ID and target ID. The SCSI ‘devices’ command may also return, for each attached device, attributes associated with the device such as vendor name, vendor unique identifier, serial number, capacity, and so on.  
         [0006]     In a SAN including a virtualization switch, storage devices are not directly attached to the hosts, merely communicating with the hosts through a virtualization switch, an IP network, and a storage communication medium. In such a configuration, a host needs to establish three elements for successful discovery: IP address, TCP port number, and iSCSI target name. The host uses the IP address and the TCP port to establish a TCP connection. The iSCSI target name is then used to establish an iSCSI session with the target.  
         [0007]     In addition, virtualization switches automatically discover logical units (LUs) exposed on the storage devices and LU paths of the discovered LUs. The discovery process only uses SCSI target name and LUN for identifying the LUs and does not take into consideration the LU attributes (e.g., serial number). For that reason, an automatic discovery process carried by the virtualization switches may identify two or more LU paths directing to the same LU as two different LUs. This may result in an incorrect and inconsistent representation of the storage network connected to the virtualization switch, and thus to data corruption. For instance, two different LU paths directing to the same LU may be identified as two different LU paths of two different LUs. Consequently, the virtualization switch may report, for example, on two LUs having total capacity double than the actual capacity.  
         [0008]     Therefore, it would be advantageous to provide a method for identifying discovered LU paths directing to the same LU. It would be further advantageous if the provided method would automatically update changes in the configuration of the discovered LUs and storage devices.  
       SUMMARY OF THE INVENTION  
       [0009]     A method and apparatus is described for monitoring and controlling a storage network having established one or more paths to connect with at least one storage device, each storage device including at least one logical unit (LU). The method and apparatus performs a discovery of LUs exposed on each target path. For each discovered LU, LU paths associated with each discovered LU are determined. For each discovered LU, attributes related to the discovered LU are identified and the attributes are compared with already discovered LU attributes. When the attributes of a discovered LU are the same as another LU, the determined LU paths of said discovered LU are associated with the other LU, otherwise the determined LU paths of said discovered LU are associated with said discovered LU.  
         [0010]     In another embodiment a method for automatic discovery of logical units (LUs) and storage devices connected to a virtualization switch is described. In this embodiment for each target path, LUs exposed on said target path are discovered. For each discovered LU a list of LU paths associated with said LU is determined and at least attributes related to said discovered LU are identified. Attributes of discovered LUs and their paths are compared and correlated.  
     
    
     BRIEF DESCRIPTION OF THE DRAWINGS  
       [0011]      FIG. 1 —is an exemplary diagram of a storage area network (SAN) for the purpose of illustrating the principles of the present invention;  
         [0012]      FIG. 2 —is a schematic diagram illustrating the relationship between targets, logical units and a virtualization switch&#39;s output ports;  
         [0013]      FIG. 3 —a non-limiting flowchart describing the method for automatic discovering of LUs and storage devices attached to a virtualization switch. 
     
    
     DETAILED DESCRIPTION OF THE INVENTION  
       [0014]     Reference is now made to  FIG. 1  where an exemplary diagram of a storage area network (SAN)  100  is shown for the purpose of illustrating the principles of the present invention. SAN  100  comprises of a virtualization switch  110  connected to a plurality of storage devices  140 . SAN  100  further includes a plurality of hosts  120  connected to an IP network  150  through, for example, a local area network (LAN) or a wide area network (WAN). Hosts  120  communicate with virtualization switch  110  through IP network  150 . The connections formed between hosts  120  and virtualization switch  110  can utilize any protocol including, but not limited to, Gigabit Ethernet carrying packets in accordance with the FC protocol, iSCSI protocol, Infiniband protocol, and others. The connections may be routed to virtualization switch  10  through an Ethernet switch. Storage devices  140  may include, but are not limited to, tape drives, optical drives, disks, and redundant array of independent disks (RAID). Each storage device (also referred to as a “target”) may include one or more LUs as defined by the storage device&#39;s vendor or by a system administrator. For example, RA/D stores data on multiple storage devices in a redundant fashion, such that data can be recovered in the event of failure of any one of the storage devices in the redundant array. Each storage device or group of storage devices in the RAID may be configured to operate as an independent LU. Another example is a storage subsystem that packages multiple storage devices in a separate cabinet, along with its own power supply, control software, diagnostics, and so on. Storage devices  140  communicate with virtualization switch  110  through storage communication medium  160 . Storage communication medium  160  may be, but is not limited to, a fabric of FC switches, a SCSI bus, and the like.  
         [0015]     Virtualization switch  110  operates within SAN  100  and is further connected in the data path between the hosts and the LUs. Virtualization switch  110  includes a plurality of input ports  112  and a plurality of output ports  114 . Input ports  112  may be, but are not limited to, gigabit Ethernet ports, FC ports, pSCSI ports, and the others. Output ports  114  may be, but are not limited to, FC ports, iSCSI ports, pSCSI ports, and the others. An input port  112  is capable of carrying packets in accordance with transport protocols including, but not limited to, iSCSI protocol, TCP/IP protocol, Infiniband protocol, or any other transport protocol. An output port  114  is capable of carrying frames in accordance with the transport protocols including, but not limited to, SCSI parallel interface (SPI) protocol, iSCSI protocol, FCP protocol, or any other protocols. Virtualization switch  110  further includes a common layer of storage drivers (not shown) that allows interfacing with output ports  114 . The storage drivers conceal the type of the accessed port&#39;s type (e.g., SPI, FCP, and iSCSI) to virtualization switch  110 . This way virtualization switch  110  may communicate with a target storage device  140  connected to an output port  114  using a common application interface. The operation of virtualization switch  110  is further disclosed in U.S. patent application Ser. No. 10/694,115 entitled “A Virtualization Switch and Method for Performing Virtualization in the Data-Path” assigned to common assignee and which is hereby incorporated for all that it contains.  
         [0016]     As discussed above, the connection between virtualization switch  110  and a storage device  140  is formed through one of the output ports  114  and storage communication medium  160 . The path established between an output port  114  and an input port of a storage device  140  is defined as a “target path”. For each target there exists a list of associated target paths. A single output port  114  may be connected to one or more targets. For each target path, a LU discovery process for identifying LUs and LU paths is performed. An LU path defines the connection path between an output port  114  and a LU that resides in a designated target via a specific input port of the target. For each LU, there exists a list of associated LU paths. Additionally, for each discovered LU its attributes are retrieved. These attributes may be, but are not limited to, vendor identification, serial number, device identification, capacity, and the LU configurations. The LU configurations determine, for example, type of errors reported by the LU, caching capabilities, firmware version, and the like. The LU attributes allow identifying if a single LU has more than one LU path.  
         [0017]     Reference is now made to  FIG. 2  where a schematic diagram illustrating the relationship between targets, LUs, and the virtualization switch output ports is shown.  FIG. 2  shows virtualization switch  210  having two output ports  214 - 1  and  214 - 2 , as well as a disk  240 , and a RAID  250 . Disk  240  has a single port  242  and includes a single LU “LU3” with a LUN ‘3’. RAID  250  has two ports  252  and  254  and includes two LUs “LU1” and “LU2” with LUNs ‘1’ and ‘2’ respectively.  
         [0018]     In this example, there is a direct connection between output port  214 - 1  and RAID  250 , while the connection between output port  214 - 2 , disk  240  and RAID  250  is formed through a FC switch  260 . Thus, for disk  240  a single target path is discovered while for RAID  250  two target paths are found. A discovered target path is presented using the pair &lt;I, T&gt;, where ‘I’ is the virtualization switch&#39;s output port number (e.g., output port  214 ), and ‘T’ is the target port number. That is, the discovered target paths are: 
        1) &lt; 214 - 2 ,  242 &gt;    2) &lt; 214 - 1 ,  254 &gt;    3) &lt; 214 - 2 ,  252 &gt;.        
 
         [0022]     Each target path may be further represented using the type connection (e.g. PSCSI, FC, and so on) and a target identifier. For FC connection a target path is uniquely identified by local and remote port names. For each target path, a LU discovery process is performed and a list of LU paths is generated. Each LU path is defined as a combination of target path and LUN. That is, a discovered LU path may be presented using the notation &lt;I, T, LUN&gt;. In this example, five different LU paths can be discovered: 
        1) &lt; 214 - 2 ,  242 , ‘3’&gt;    2) &lt; 214 - 2 ,  252 , ‘1’&gt;    3) &lt; 214 - 2 ,  252 , ‘2’&gt;    4) &lt; 214 - 1 ,  254 , ‘1’&gt;    5) &lt; 214 - 1 ,  254 , ‘2’&gt;       
 
         [0028]     The present invention identifies and distinguishes between multiple LU paths connected to the same LU using the attributes of the LU and not by the LUN. That is to say that different LUNs may not indicate, necessarily, different LUs.  
         [0029]     In an embodiment of this invention, virtualization switch  210  may perform load-balancing and failover between LU paths. The load-balancing algorithm may be, but is not limited to, random, round-robin, weighted round robin, or any other priority based load balancing algorithm. The load balancing and failover functions are executed and controlled by a proprietary data object called “LU strategy”. The LU strategy object maintains a list of active LU paths and a list of inactive LU paths. For example, inactive and active LU paths may be associated with a RAID having two controllers, each with its own port. In such a RAID, a first controller is flagged as active and a second controller is flagged as inactive and failover strategy is defined between these controllers. The inactive paths are used in the case of failover, where alternate active paths are used for load balancing purposes. Once an active LU path is overloaded or the connection on this path is broken, the LU strategy object switches to a different active LU path. For instance, if LU path &lt; 214 - 2 ,  252 , ‘2’&gt; is overloaded the LU strategy object may switch to LU path &lt; 214 - 1 ,  254 , ‘2’&gt;.  
         [0030]     Reference is now made to  FIG. 3  where a non-limiting flowchart  300  describing the method for automatic discovery of logical and physical storage devices attached to a virtualization switch and for identifying LU paths with the same LU, is shown. The method described herein is executed, each time a new target path is discovered and reported to the virtualization switch by a transport layer. At step S 310 , a new target path to be handled is reported by a driver controlling one of the output ports  114 . A target path is defined by the port identifier of output port  114  and an input port identifier of the target (i.e., that pair &lt;I, T&gt;). The detected target path is saved in a target path list, which includes all target paths detected by the output ports  114 . At step S 320 , all LUs exposed on the new reported target path are discovered. For each LU, a LU identifier is allocated. The LU identifier may be a combination of a LUN and the target&#39;s name in which the LU resides. Alternatively, the LU identifier can be set to an identification descriptor value as described in the device identification page. The device identification page provides the means to retrieve one or more identification descriptors applying to a LU. A LU may have more than one identification descriptor. Subsequently, for each target path a list of LU paths is generated. A LU path is defined by the port identifier of an output port  114 , target&#39;s input port identifier, and LUN i.e., &lt;I, T, LUN&gt;. Each LU maintains a list of its paths. At step S 330  a single LU from the LUs that were discovered at step S 320  is chosen. At step S 340 , the attributes of the selected LU are retrieved through the selected LU path. The LU&#39;s attributes include, but are not limited to, a LU identifier, vendor identification, a serial number, device identification, capacity, and LU&#39;s configurations. At step S 350 , the method tries to merge LUs having the same attributes. Specifically, the method searches for an already discovered LU having the same attributes as the selected LU. If such a LU is found, then the LU paths of the selected LU are later added to the LU path list of the already discovered LU. If such a LU is not found, then the selected LU is defined as a new discovered LU. The exposed LUs are saved in a global list maintained by the virtualization switch. Each new discovered LU is added to the list of the discovered LUs. This list does not include two or more identical LUs, i.e., LUs having the same attributes. At step  360 , the new discovered LU path is added to the LU strategy object. Additionally, for each new LU path it is determined whether the path is active or inactive. At step S 370 , a check is made to determine if there are more LUs to be handled, and if there are the execution continues with step S 330 ; otherwise, the execution is ended.  
         [0031]     In another embodiment of this invention the method described herein handles notifications of changes in the storage devices topology. That is, if a new storage device or a LU is added or removed, the method detects the changes and updates the target path list, the LU path list, and the list of the exposed LUs accordingly. Furthermore, the method handles any notifications of any changes in the configuration of the storage device or LU. To facilitate this, the method provided monitors the execution of the SCSI commands. If a SCSI command fails to complete its execution, a check is performed to determine if the cause is a change in the storage device configuration. If so, the changes are retrieved from the storage device and updated in the virtualization switch. The changes in the storage devices topology and configuration are further reported to the user.  
         [0032]     In another embodiment of the disclosed invention a graphical user interface (GUI) is used to display the physical SAN topology and the topology information of the plurality of storage devices and their LUs. Topological data for each LU includes, but is not limited to, a LUN, a number of LU paths, capacity, and other attributes associated with the LU. The storage devices topology shows the actual connection between an output port  114  to the target storage device  140  through the storage communication medium  160 . Furthermore, the various targets and LU paths discovered during the discovery process are presented. The displayed topology is automatically updated if a LU or a storage device is added or removed.