# Patent

## Title
Virtual array failover

## Abstract

Failover is provided between groups of logical units of storage presented as virtual arrays. A primary virtual array has at least one primary virtual port coupled to a fabric, each primary virtual port having a source virtual port name and a source virtual port address. A secondary virtual array has one or more secondary virtual ports coupled to the fabric, each secondary virtual port having a secondary virtual port name and a secondary virtual port address. All data resident on the primary virtual array is copied to the secondary virtual array. If a failure occurs in the primary virtual array, the secondary virtual port names and LUN names and numbers are replaced with the primary virtual port names and LUN names and numbers. The fabric then updates its name server database so that the database associates the primary virtual port names and LUN names and numbers with the secondary virtual port addresses.

## Background
FIELD OF THE INVENTION
The present invention relates generally to the field of storage systems, and particularly to the migration of data between virtual arrays.
BACKGROUND OF THE INVENTION
Today's enterprise data centers store ever-larger amounts of business critical data that must be immediately and continuously available. Ever larger and more complex storage systems are used for storage of the data. Many different hosts and applications access data on these storage systems. In order to provide security and prevent data corruption, it is often necessary to ensure that the applications and hosts have exclusive access to particular areas of storage in the system.
One mechanism for partitioning storage systems employs the concept of “virtual arrays”. Accordingly, software is provided within a storage array to logically partition the array into separate storage groups. Each storage group includes at least one host and a set of logical units of storage. The logical units of storage in the group are accessible only to the hosts in the group. Other hosts cannot access a storage group to which they have not been granted access. Unfortunately, the current methods for partitioning storage arrays into virtual arrays are highly complex and expensive, and operate only at the storage array level. It is desirable to provide a simpler, inexpensive means of presenting virtual arrays to host systems, and to provide a way of centralizing array partitioning from another part of the system—for example, the fabric. It is also desirable to be able to migrate data from one such presented virtual array to another. It would be further advantageous to provide a failover mechanism between such virtual arrays.
SUMMARY OF THE INVENTION
In accordance with the principles of the invention, there are provided apparatus, methods, and program products for providing failover between virtual arrays. Accordingly, there is provided a plurality of groups of logical units of storage. At least one physical port is coupled to the groups through which the groups can be coupled to a fabric. Each group is assigned a unique virtual port address for each physical port to which it is coupled. A first group comprises a primary virtual array. The primary virtual array has at least one primary virtual port coupled to the fabric, each primary virtual port having a primary virtual port name and a primary virtual port address. A second group comprises a secondary virtual array. The secondary virtual array has one or more secondary virtual ports coupled to the fabric, each secondary virtual port having a secondary virtual port name and a secondary virtual port address. All data resident on the primary virtual array is copied to the secondary virtual array. In response to a failure, the secondary virtual port names are replaced with the primary virtual port names. The fabric then updates its name server database so that the database associates the primary virtual port name with the secondary virtual port address.
Furthermore, the primary virtual array includes primary LUNs for use by the host(s), each primary LUN having a primary LUN name and primary LUN number. The secondary virtual array includes secondary LUNs for use by the hosts, each secondary LUN having a secondary LUN name and a secondary LUN number. In response to the failure indication, the secondary LUN names are replaced with the primary LUN names. Secondary and primary LUN numbers are replaced in the same manner.
By replacing secondary virtual port names and LUN names and numbers with primary virtual port names and LUN names and numbers, a primary virtual array fails over to a secondary virtual array in a manner transparent to the hosts and applications.



BRIEF DESCRIPTION OF THE DRAWINGS
In order to facilitate a fuller understanding of the present invention, reference is now made to the appended drawings. These drawings should not be construed as limiting the present invention, but are intended to be exemplary only.
FIG. 1 is a representation of a storage area network. The storage area network includes a Fibre Channel array and hosts coupled to a Fibre Channel fabric switch.
FIG. 2 is a representation of the storage area network of FIG. 1, showing Fibre Channel port IDs and LUN names and numbers.
FIG. 3A is a flow diagram representing the operation of the array controller during Fibre Channel system initialization.
FIG. 3B is a flow diagram representing the operation of the switch during Fibre Channel system initialization.
FIG. 4 is a representation of a name table managed by the name server database in the switch.
FIG. 5 is a representation of a LUN table in a host.
FIG. 6 is a representation of a storage area network wherein the LUNs in the storage array are arranged into groups and are separately addressable via virtual port IDs in accordance with the invention.
FIG. 7A is a flow diagram representing the operation of the array controller during Fibre Channel system initialization when virtual port IDs are implemented on the storage array.
FIG. 7B is a flow diagram representing the operation of the switch during Fibre Channel system initialization when virtual port IDs are implemented on the storage array.
FIG. 8 is a representation of the name table in the switch in accordance with the invention.
FIG. 9 is a representation of a LUN table in a host in accordance with the invention.
FIG. 10 is a representation of the system of FIG. 6 wherein the name server database in the switch further includes a zoning table.
FIG. 11 is a representation of the zoning table of FIG. 10.
FIG. 12A is a representation of a LUN table in one host when the zoning table in the switch is operational.
FIG. 12B is a representation of a LUN table in a second host when the zoning table in the switch is operational.
FIG. 13 is a flow diagram representing the operation of the switch when a zoning table is in use.
FIG. 14 is a representation of a storage area network including two physical storage arrays, each physical array presenting two virtual arrays.
FIG. 15 is a representation of the database server name table in the switch of FIG. 14.
FIG. 16 is a representation of a LUN table in a host of FIG. 14.
FIG. 17 is a flow diagram of the basic process by which a source virtual array is migrated to a destination virtual array in accordance with the invention.
FIG. 18 is a representation of the database name server table in the switch after virtual port names have been exchanged between the source and destination virtual arrays in accordance with the invention.
FIG. 19 is a representation of the LUN table in a host after LUN name and number tables have been exchanged between the source and destination virtual arrays in accordance with the invention.
FIG. 20 is a representation of the storage area network of FIG. 14 after the source virtual array 120h is migrated to the destination virtual array 120i. 
FIG. 21 is a representation of the storage area network of FIG. 14 further showing source and destination array controllers and translation tables.
FIG. 22 is a flow diagram representing the general operation of the migration process as controlled by the source and destination array controllers.
FIG. 23 is a flow diagram representing the operation of the source array controller.
FIG. 24 is an example of a source virtual port name translation table after virtual port names have been exchanged between the source and destination virtual arrays.
FIG. 25 is an example of source LUN name translation table after LUN names have been exchanged between the source and destination virtual arrays.
FIG. 26 is an example of a source LUN number translation table after LUN numbers have been exchanged between the source and destination virtual arrays.
FIG. 27 is a flow diagram representing the operation of the destination array controller.
FIG. 28 is an example of a destination virtual port name translation table after virtual port names have been exchanged between the source and destination virtual arrays.
FIG. 29 is an example of destination LUN name translation table after LUN names have been exchanged between the source and destination virtual arrays.
FIG. 30 is an example of a destination LUN number translation table after LUN numbers have been exchanged between the source and destination virtual arrays.
FIG. 31 is a representation of the storage area network of FIG. 21 after the source virtual array 210f has been migrated to the destination virtual array 210f. 
FIG. 32 is a flow diagram of an alternate embodiment of the general operation of the migration process as controlled by the source and destination array controllers.
FIG. 33 is a flow diagram of an alternate embodiment of the source array controller process of FIG. 23 in a system where the destination virtual array port names and LUN names and numbers are replaced with the source virtual array port names and LUN names and numbers only.
FIG. 34 is a flow diagram of an alternate embodiment of the destination array controller process of FIG. 27 in a system where the destination virtual array port names and LUN names and numbers are replaced with the source virtual array port names and LUN names and numbers only.
FIG. 35 is a representation of the storage area network of FIG. 21 after the source virtual array 210f has been migrated to the destination virtual array 210f in accordance with the processes of FIGS. 33 and 34.
FIG. 36 is a representation of the storage area network of FIG. 21 further showing failure databases in each storage array.
FIG. 37 is a general representation of a failure database.
FIG. 38 is a representation of the failure database 402(a) of FIG. 36.
FIG. 39 is a flow diagram representing the general operation of the failover process as controlled by primary and secondary array controllers in accordance with the invention.
FIG. 40 is a flow diagram representing the failover operation of the primary array controller.
FIG. 41 is a representation of the failure database 402(a) after a failure of a primary virtual array.
FIGS. 42A and 42B are a flow diagram representing the failover operation of the secondary array controller.
FIG. 43 is a flow diagram representing an alternate embodiment of the failover operation of the primary array controller.
FIG. 44 is a flow diagram representing an alternate embodiment of the failover operation of the secondary array controller.
FIG. 45 is a representation of a hierarchical network system in which virtual array migration in accordance with the invention can be implemented.
FIG. 46 is a representation of a hierarchical network system in which virtual array failover in accordance with the invention can be implemented.



DETAILED DESCRIPTION OF EXEMPLARY EMBODIMENTS
In FIG. 1 there is shown a functional block diagram of an exemplary storage area network 10 in which the invention can be implemented. The storage area network 10 employs a Fibre Channel fabric topology. Fibre Channel is a high speed serial transport used in storage systems. It is described in a series of standards that can be found at X3T9.3 Task Group of ANSI: Fibre Channel Physical and Signaling Interface (FC-PH), Rev. 4.2 Oct. 8, 1993. Hosts 12, shown individually as 12a, 12b, 12c, 12d and 12e are coupled to a Fibre Channel “fabric” in the storage system, herein shown as a switch 14. A storage array 16 including disk drives 18 is also coupled to the switch 14. The hosts 12 communicate with the disk drives 18 via a cross-point Fibre Channel connection through the switch 14.
The switch 14 includes switch ports 20. Host facing switch ports are labeled as 20h. Array facing switch ports are labeled as 20a. Host ports 22 on the hosts are coupled via Fibre Channel links 24 to host-facing switch ports 20h on the switch 14. Physical array ports 26 on the array 16 are coupled via Fibre Channel links 24 to array-facing switch ports 20a on the switch 14. The disks 18 within the array 16 are organized into logical units (“LUNs”) 30. “LUN”, originally a SCSI (small computer system interface) term, is now commonly used to describe a logical unit of physical storage space. The LUNs are exported by the array ports 26 for access by the hosts 12 via the Fibre Channel links 24 and switch 14. As herein shown, each disk appears to be configured as a separate LUN, though it is understood that a LUN can encompass part of a disk, or parts of multiple disks, or multiple complete disks. The arrangement shown is chosen for convenience of description.
In a Fibre Channel system such as that of FIG. 1, each Fibre Channel device (including but not limited to host ports and array ports) has two identifying characteristics—a name and an address. Fibre Channel names, known as “world wide names”, are unique—every Fibre Channel device in the world has its own unique name. Each Fibre Channel device in a system also has an address, referred to in Fibre Channel parlance as an “ID”, that is dynamic and dependent upon the configuration of the system. The IDs are used for directing information between hosts and arrays in the system. Port addresses are commonly referred to as “port IDs”. LUN addresses are commonly referred to as “LUN numbers”. After initialization, the hosts 12 communicate with the array ports 26 and LUNs 30 by sending messages to the appropriate port ID and LUN number. The hosts adapt to new addresses, but devices in use must maintain the same name in order for uninterrupted communications to continue.
In a Fabric topology, the switch 14 assigns IDs to the host ports 22 and array ports 26 during initialization. IDs as described in the Fibre Channel specification are actually 24 bit quantities containing several fields. In FIG. 2 names and IDs are shown symbolically with alphanumeric symbols for simplicity of explanation. The names and IDs of each port and LUN are shown as a pair (name, ID). For instance, the host port 22 on the host 12a is shown to have a name and ID of (ha, 100). The names and IDs for the ports 22 on the hosts 12b-e are (hb, 101), (hc, 102), (hd, 103) and (he, 104). The host-facing switch ports 20h are shown to have names and IDs (hfa, 200), (hfb, 201), (hfc, 202), (hfd, 203), and (hfe, 204). Array-facing switch ports 20h are shown to have names and IDs (afa, 300) and (afb, 301). The array ports 26 are shown to have names and IDs (apa, 0), and (apb, 1). Each LUN 30 has a name and LUN number. For example, the LUN of name a0 is LUN number L00. LUN numbers L00, L01, L02, L10, L11, L12, L20, L21, L22, L30, L31, L32, L40, L41, L42, L50, L51, AND L52 are shown as accessible via array port ID 0. LUN numbers L60, L61, L62, L70, L71, L72, L80, L81, L82, L90, L91, and L92 are shown as accessible via array port ID 1.
The Fibre Channel switch 14 includes a name server database 40. The name server database 40 is used by the switch 14 to assign IDs to host ports 22 and array ports 26 during initialization. The name server database 40 includes a name server table 42 that is used by the switch to resolve IDs to names. The general process by which port IDs are assigned in accordance with the ANSI T11 Fibre Channel standards is shown in FIGS. 3A and 3B. FIG. 3A shows the process by which the switch 14 assigns Port IDs. FIG. 3B shows the process by which the Fibre Channel array controller 44 in the array 16 (FIG. 2) communicates with the switch 14. First, for each array port (i.e. ports 0 and 1), the array controller 44 sends a port login “FLOGI” command to the switch 14 containing the array port name (FIG. 3A step 50). The port logins are received by the switch 14 (FIG. 3B step 52). When the switch 14 receives a port login command, it responds by sending an acknowledgement message to the array controller 44 (FIG. 3B step 54). This acknowledgement message contains a Port ID for the array port that was logged in. The acknowledgement message is received by the array controller 44 (FIG. 3A step 56). Then, a registration process is performed by the switch 14 (FIG. 3A step 58, FIG. 3B step 60). During the registration process, the name server table 42 containing port names and their corresponding port IDs is built and distributed to nodes registered to receive it.
An example of the name server table 42 is shown in FIG. 4. The full contents of the name server table 42 are described in the Fibre Channel Name Server MIB, described in the IETF RFC 4044, “Fibre Channel Management MIB”, herein incorporated by reference. FIG. 3 shows only enough of the table 42 to contribute to understanding of the invention. The table 42 includes multiple entries 62, each including a port name field 64 and a port address ID field 66. During the registration process of FIGS. 3A and 3B, the entries 62 are populated with the switch port 26 names and Port IDs assigned by the switch 14. For the example array 16 shown in FIG. 1, an entry 44 includes the port name apa and Port ID 0, while another entry 62 includes the port name apb and Port ID 1. The switch 14 then sends this table 42 to all members of the SAN 10 registered to receive state change notifications. This includes the hosts 12. The hosts 12 now have the Port IDs of the array ports 26 so Fibre Channel communications between the hosts 12 and array 16 can ensue.
Now that the hosts have IDs to access the ports, they can learn what LUNs are available. LUN names and numbers are managed at the array level. Each host 12 sends a query to each array port 26 ID in turn, requesting a list of available LUN numbers. Once the LUN numbers for a given array port ID are known, the host 12 is able to query each LUN 30 by using a combination of the port ID and LUN number to access the LUNs 30. The host 12 then queries each LUN 30 for its corresponding LUN name. Once the host has gathered all this information, it builds a directory LUN table 70 that relates LUN names, port IDs, and LUN numbers. A representation of such a LUN table 70 is shown in FIG. 5. The table includes an entry 72 for each LUN it has discovered. Each entry includes a LUN name field 74, a port ID field 76 and a LUN number field 78, which in combination identify the LUN 30. The table 70 for a host 12 of FIG. 2 includes the LUN names, port IDs, and LUN numbers for the LUNs 30 on the array 16 for each port ID 0 and 1. For example, one entry 72 shows a LUN with name a0 and LUN number L00 associated with Port ID 0. Another entry 72 shows a LUN with name k0 and address L31 associated with Port ID 0. Yet another entry 72 shows a LUN with name e1 and LUN number L71 associated with Port ID 1.
During operation, hosts 12 refer to LUNs 30 by their LUN numbers. In order to access a LUN 30, a host 12 port 22 sends a message whose Fibre Channel address includes the array port ID and LUN number. The switch 14 parses the port ID portion of the address in order to forward the message to the identified array port 26. The array 16 then uses the LUN number portion of the address to access the proper LUN 30 within the array 16. So, for example, if host 12a needs to access LUN #L71, the host 12a port 22 sends a message to an address including the port ID 1 and the LUN number L71. The switch 14 sees the port ID 1 and sends the message to the array port 26 with ID 1. The array sees that the message is directed to LUN # L71 and thus proceeds to perform the appropriate operation on LUN #L71.
Note that, in accordance with the prior art arrangement of FIG. 2, a host has actual access to all LUNs on each array port to which it has access. For example, the host 12a has access to port ID 0, and therefore has access to LUNs L00-L52.
It is often desirable to separate a storage array into several distinctly accessible sub-arrays, or “virtual arrays”. Each host or application has access to a virtual array, but does not have access to the other virtual arrays within the storage array. For example, it may be desirable to arrange the LUN numbers L00-L12 as a first virtual array accessible only to the host 12a, and LUN numbers L20-L32 as a second virtual array accessible only to the host 12b. Such an arrangement can provide security against data corruption and can provide ease of management for host applications. But, in the prior art example of FIG. 2, all the LUNs L00-L52 are exposed via the same port ID 0, and thus cannot be hidden at the fabric level from either host 12a or host 12b. Virtual arrays have therefore previously been provided only through implementation of complex software on the storage array.
In accordance with the principles of the invention, the storage array and fabric are employed to present virtual arrays to the hosts. The LUNs in a storage array 16 are arranged into several storage groups. The term “storage group” can have different meanings in different contexts. For example, a “storage group” in prior art software based virtual arrays includes a host and a set of LUNs. For clarity, a “storage group” as used herein is simply a group of LUNs. Virtual Port IDs are established over each physical port on the array. Each storage group has assigned to it at least one virtual port ID, used by the hosts to access the storage groups. Each storage group is thus separately accessible via at least one unique virtual port ID. A host 12 can access only the LUNs 30 in a storage group with a virtual port ID to which the switch 14 allows it access. As will be seen, the provision of unique virtual IDs for each storage group allows zoning to be applied by the switch 14 such that each host 12 has access to only designated storage groups. The storage groups thus appear as individual virtual arrays to the hosts 12. Therefore, the storage groups will herein further be referred to as “presented virtual arrays”.
In FIG. 6, the storage system 10 has been modified so that presented virtual arrays can be accessed by the hosts. The modified storage array 16a is shown to include presented virtual arrays 210a, 210b, 210c, 210d, and 210e. The storage groups forming the presented virtual arrays can be arranged for example by a modified Fibre Channel controller 44a (shown) or by a separate controller, or by pre-configured software programming or dynamic user programming of the array 16, or any combination thereof. Each presented virtual array 210a-210e is associated with at least one “virtual port ID” v0-v5. Generally, each presented virtual array 210a-210e is assigned one or more virtual port IDs depending upon how many physical ports the virtual array is accessible through. As shown by example, the presented virtual array 210a is associated with the physical array Port ID 0 and is assigned one virtual port ID v0. The presented virtual array 210b is also associated with the physical array Port ID 0 and is assigned one virtual port ID v1. The presented virtual array 210c is associated with both the physical array ports Port ID 0, 1, and is thus assigned two virtual port IDs v2 and v5. The presented virtual arrays 210d and 210e are both associated with the physical array port ID 1 and are assigned virtual port IDs v3 and v4 respectively.
In accordance with one implementation of the virtual Port IDs of the invention, the virtual port IDs are assigned by the modified switch 14a. The ANSI T11 Fibre Channel standards, which currently define Fibre Channel virtual ports used by hosts, is extended to support storage arrays. The process by which virtual Port IDs are provided by the switch 14a is shown in FIGS. 7A and 7B. FIG. 7A shows the process by which the Fibre Channel array controller 44a in the array 16 communicates with the switch 14a. FIG. 7B shows the process by which the switch 14a assigns Port IDs. First, each array port (i.e. ports 0 and 1) logs in to the switch 14a by sending an FLOGI command containing its port name to the array controller 44a (FIG. 7A step 220). The port logins are received by the switch 14a (FIG. 7B step 222.) When the switch 14a receives a port login (“FLOGI”) command, it responds by sending an acknowledgement message to the array controller 44a (FIG. 7B step 224). This acknowledgement message contains a Port ID for the array port that logged in. The acknowledgement message is received by the array 16 controller 44a (FIG. 7A step 226). Then, a registration process is performed by the switch 14a (FIG. 7A step 228, FIG. 7B step 230). During the registration process, the name server table 42a is built as previously described with regard to name server table 42.
Then, if virtual port IDs are needed by the array 16a ports 26 (step 232), the array controller 44a sends an “FDISC” command containing a virtual port name to the switch 14a (step 234). The switch 14a receives the FDISC command (step 236) and responds by sending a virtual port ID to the array controller 44a (step 238). The array controller 44a receives the virtual port ID from the switch 14a (step 240). The switch 14a and array controller 44a then perform the registration process to add the virtual Port name and ID to the name server table 42a, as will be described (steps 242, 244). The FDISC command and response is repeated for each virtual ID required for each physical port (steps 232-244).
Now the switch 14a can build the name server table 42a in a manner similar to that previously described with respect to name server table 42, except the name server table 42a associates multiple virtual port IDs with the physical port names. An example of such a name server table 42a is shown in FIG. 8. The physical array port 26 with name apa and Port ID 0 is also associated with the virtual port names and IDs (vn0,v0), (vn1,v1), and (vn2,v2). Likewise, the physical array port 26 with name apb and Port ID 1 is associated with the virtual port names and IDs (vn3,v3), (vn4,v4), and (vn5,v5). At this point, the switch 14a can update the hosts 12 with the contents of the name server table 42a as previously described. The hosts 12 will thereby receive all the virtual port IDs v0-v5.
Now that the hosts 12 have the virtual port IDs v0-v5, they can build their directory LUN tables in a manner similar to that previously described with regard to FIG. 5, except that now each virtual port ID will be associated with LUN names and numbers. Accordingly, each host 12 sends a query to each virtual array port ID v0-v5 in turn, requesting a list of available LUN numbers. Once the LUN numbers for a given virtual array port ID are known, the host is able to query each LUN 30 by using a combination of the virtual port ID and LUN number to access the LUNs. The host 12 then queries each LUN 30 for its corresponding LUN name. Once the host has gathered all this information, it builds a directory LUN table 50a that relates LUN names, virtual port IDs, and LUN numbers. A representation of such a LUN table 70a is shown in FIG. 9. The table includes an entry 72a for each LUN it has discovered. Each entry includes a LUN name field 74a, a virtual port ID field 76a and a LUN number field 78a, which in combination identify the LUN. For example, the LUNs 30 associated with the presented virtual array 210a—i.e. virtual port ID v0—are (a0, L00), (b0, L01), (c0, L02), (d0, L10), (e0, L11), and (f0, L12). Note also that the presented virtual array 210c (LUN#s L40-L52) is dual-ported; that is, it is accessible via virtual port IDs v2 and v5. LUNs in dual-ported presented virtual arrays may have two separate LUN numbers as well, one for use when accessed on the first virtual port ID, and the second for use when accessed on the second virtual port ID. Dual-ported presented virtual arrays can be useful for high availability purposes.
In accordance with one advantage of the invention, storage array “zoning” can be implemented at the fabric switch in order to physically separate the presented virtual arrays for access only by certain hosts. Fibre Channel switches are able to implement zoning, whereby access between host ports and array ports is specified. But zoning can only be implemented at the port level; that is, it cannot be implemented at the LUN level. In the prior art arrangement of FIG. 2, zoning cannot be used to separate the storage groups of LUNs 210a, 210b, 210c as shown FIG. 3, because all the LUNs have the same Port ID 0.
But in accordance with this further aspect of the invention, since each presented virtual array 210a-e is associated with its own unique virtual Port ID v0-v5, the switch 14a can differentiate between each presented virtual array 210a-e based upon its virtual Port ID. The switch 14a can be programmed to allow or disallow access to each virtual port address from each host facing array port address through the use of its zoning process. Host access to the presented virtual arrays 210a-e can thus be physically separated, enhancing security, data integrity, and ease of storage management for host applications.
Referring now to FIG. 10, the switch name server database 40a is shown to include a zoning table 43a as well as a name table 42a. The full contents of a zoning table as used by a prior art Fibre Channel switch is described at FC-GS-3. The zoning table 43a is modified in accordance with the invention to include virtual array port IDs. The zoning table 43a is shown in FIG. 11. Only the portions of the zoning table 43a relevant to an understanding of the invention are shown here. Accordingly, the zoning table 43a has entries 252 including a virtual port ID field 254 and a host facing switch port ID field 256. For each virtual port ID recognized by the switch 14, the name server database 40a can associate one or more host facing switch port IDs with the virtual port ID. For example, in the table shown, virtual port ID v0 is associated with host facing switch port ID 200. Virtual port ID v1 is associated with host facing switch port ID 201. Virtual port ID v2 is associated with host facing switch port ID 202. Virtual port ID v4 is associated with host facing switch port ID 204. Virtual port ID v5 is associated with host facing switch port ID 202. (Host facing array port 202 is dual ported on virtual port IDs v2 and v5.)
Now, when the switch 14a updates the hosts 12 with the contents of the name server table 42a, it uses the zoning table 43a to filter the presentation of the name server table 42a information to the hosts 12. Referring to FIG. 12 there are shown several examples of the LUN tables 70a in the hosts 12a and 12b. When the switch 14a updates the hosts 12, the switch 14a refers to the zoning table 43a—for example the table of FIG. 11. The process by which the switch 14a uses the zoning table 43a is shown in FIG. 13. The switch 14a checks the zoning table 43a for the first host facing port ID 200 (step 260). The switch 14a sees that the host facing array port ID 200 is authorized to access only virtual array port v0. So, only the name table information associated with virtual port ID 0 is forwarded to the host 12a that is coupled to the host facing switch port ID 200 (step 262). The host 12a thus receives the address information for the virtual port v0. The LUN table 70a for the host 12a thus looks like that shown in FIG. 12A. The host 12a is limited to access to the LUNs L00-L12 on virtual Port ID v0. The switch 14a then checks the zoning table 43a for access information for the host facing switch port ID 201 (steps 266, 268, 260). The switch 14a sees that the host facing switch port ID 201 is authorized to access only virtual array port v1. So, only the name table information associated with virtual array port v1 is forwarded to the host 12b that is coupled to the host facing switch port ID 201 (step 262). The host 12b thus receives the address information for the virtual port v1. The LUN table 70a for the host 12b thus looks like that shown in FIG. 12B. The host 12b is limited to access to the LUNs L20-L32 on virtual Port ID v1. This process continues for each host facing switch port ID (steps 266-262).
Now each host has access to only the LUNs 30 on the virtual array ports allowed by the zoning table 43a in the switch 14, rather than to all LUNs 30 on a physical array port 26. The invention thus allows a very simple and efficient means of presenting virtual arrays to the hosts, without requiring complex array level software.
In accordance with a further aspect of the invention, a presented virtual array can be migrated to another virtual array. Consider for example that a host application uses one presented virtual array on a physical array for one application, such as e-mail, and another presented virtual array on the physical array for another application, such as work-related databases. A user or organization might need to update or change the work-related databases while retaining the e-mail. The user or organization, however, needs to maintain the old work-related databases on-line. The user or organization would therefore like to migrate the presented virtual array containing the work-related database to another presented virtual array, possibly residing on a different physical array comprising less expensive storage, while keeping the presented virtual array containing the e-mail intact on the original physical array.
In accordance with the principles of the invention, all the data on one presented virtual array referred to as the source virtual array, is migrated to another presented virtual array referred to as the destination virtual array, in a manner transparent to the hosts 12 and any applications hosted thereon. The commonly assigned co-pending U.S. patent application Ser. No. 11/241,165, herein incorporated by reference, describes a host transparent mechanism for complete migration of data between physical arrays. The general methods described therein are herein modified in order to enable host transparent data migration between virtual arrays.
Referring to FIG. 14, there is shown a system 10 including hosts 12, a switch 14a, and multiple physical arrays 16a and 16b. The system 10 is similar to the system 10 of FIG. 6, except that two physical arrays 16a and 16b are now shown. The switch 14a and physical arrays 16a and 16b are modified to support virtual array migration. The physical array 16a includes presented virtual arrays 210f and 210g, accessible via virtual port IDs v00 and v10 respectively over a physical array port 26a. The physical array 16b includes presented virtual arrays 210h and 210i, accessible via virtual port IDs v30 and v40 respectively over a physical array port 26b. All of the virtual arrays 210f, 210g, 210h, and 210i are established and operate as previously described with respect to FIGS. 6-13.
During system initialization, the switch 14a and each array 16a and 16b communicate as previously described with regard to FIGS. 7A and 7B in order to obtain Port IDs and virtual Port IDs. The resulting database server name table 42a is shown in FIG. 15. The database server name table 42a is uploaded to the hosts 12. Then, each host 12 builds a LUN table as previously described with regard to FIG. 9. An example of a LUN table built by the host 12a is shown in FIG. 16. This table assumes that zoning is not being implemented, and thus all LUNs and all virtual port IDs are visible to the host 12a. One skilled in the art will realize that the virtual array migration process to be described is equally applicable to systems in which zoning is enabled.
Now the process is described by which a source virtual array, for example virtual array 210f on physical array 16a, is migrated to a destination virtual array, for example virtual array 210i on physical array 16b. Migration of a virtual array can be handled in one of several ways. According to a first embodiment, the virtual port names and LUN names and numbers for the source virtual array 210f are exchanged with the virtual port names and LUN names and numbers for the destination virtual array 210i. According to a second embodiment, the virtual port names and LUN names and numbers of the destination virtual array 210i are replaced with the source virtual port names and LUN names and numbers of the source virtual array 210f. 
The general process by which a migration occurs from the source virtual array 210f to the destination virtual array 210i in a manner transparent to the hosts 12 in accordance with the first embodiment is shown in FIG. 17. First, the data is copied from the source array 210f to the destination array 210i (step 300). Then, the virtual array port names for the source virtual array 210f are exchanged with the virtual port names for the destination virtual array 210i, and, the source virtual array 210f LUN names and numbers are exchanged with the destination virtual array 210i LUN names and numbers. The exchanged virtual port names and LUN names and numbers are then enabled (step 302). Once the virtual port name and LUN name and number exchanges are complete, the switch 14a notes the configuration change and updates its name server database 40a in response (step 304). The hosts upload the updated name server database 40a (step 306). The hosts then query the presented virtual arrays 210a,b for LUN IDs and LUN names (step 308). As will be shown, from the hosts' perspective, all the LUNs associated with the virtual array 210f that it was able to address previously remain continuously addressable, and no names have changed. In this manner, all the LUNs from the source virtual array 210f have been migrated to the destination virtual array 210i, in a manner transparent to the hosts 12.
FIG. 18 shows the contents of the name server table 42a after the virtual port names have been exchanged and translation tables enabled. The virtual port names have been swapped between the presented virtual arrays 120f and 120i so that virtual port name vn40 is now associated with virtual port ID v00, and virtual port name vn00 is now associated with virtual port ID v40. The updated name server database table 42a is uploaded to the hosts 12. The hosts 12 then query the arrays 16 for their LUN information.
FIG. 19 shows the contents of a LUN table 70a in the hosts 12a after the virtual port names and LUN names and numbers have been exchanged and translation tables enabled. The LUN numbers L00, L01, L02, L10, L11, and L12 now appear on virtual port ID v40, while the LUN numbers L80, L81, L82, L90, L91, and L92 now appear on virtual port ID v00.
FIG. 20 shows the system of FIG. 14 after the migration. As can be seen, the presented virtual arrays 210f and 210i have been swapped so that LUN numbers L00, L01, L02, L10, L11, and L12 now appear on virtual port ID v40 on physical array 16b, and LUN numbers L80, L82, L82, L90, L91, and L92 now appear on virtual port ID v00 on physical array 16a. Now, from the hosts' perspective, though the virtual port IDs of the presented virtual arrays have changed, the presented virtual array port names and LUN names and numbers have not. It thus appears that the presented virtual arrays 210f and 210i have swapped places.
An embodiment of the invention is now described in further detail. In FIG. 21, the source and destination arrays 16a and 16b are shown connected by a link 310. The link 310 can be any sort of connection between the arrays 16a and 16b over which they can communicate. Any type of I/O channel link or network link would suffice. This link could also pass through the switch 14. For purposes of simplicity, the link 310 is shown as a simple point-to-point connection between the arrays 16a and 16b. The link 310 is used for transferring copy data and messages between the arrays 16a and 16b. The source array 16a includes a source array controller 44c. The destination array 16b includes a destination array controller 44d. The array controllers 44c and 44d include the functionality of the array controller 44a of FIG. 6 and further include the logic necessary to enable migration of presented virtual arrays. The source array controller 44c is coupled to translation tables 83. The destination array controller 44d is coupled to translation tables 85.
The source array controller 44c and destination array controller 44d work together to generally perform the virtual port name and LUN name and number exchange process (FIG. 17 step 302) shown in FIG. 22. Accordingly, remote replication software is invoked to copy all the source array data to the destination array (step 320) via the dedicated link 310. Data migration products called MirrorView and SRDF/S (Symmetrix Remote Data Facility), both of EMC Corp. of Hopkinton, Mass., are examples of remote replication software that can be conveniently used. The remote replication software sets up a primary mirror, and copies that mirror and all updates to a secondary mirror.
Meanwhile, virtual port names, LUN names, and LUN numbers are swapped between the source and destination physical arrays 16a and 16b, also via the link 310 (step 322). Each array controller 44c and 44d builds one or more translation tables 83 and 85 respectively to map its current virtual port names, LUN names, and LUN numbers to new virtual port names, LUN names, and LUN numbers (step 324). Once the remote replication process indicates synchronization of the arrays (step 326), the arrays perform a handshake function to see whether the source and destination array controllers 44c and 44d are ready to switch virtual port names and LUN names and numbers (step 328). When both virtual arrays 210f and 210i are ready, any in-progress I/O activity is cancelled if necessary (step 330). (It may or may not be necessary to cancel in-progress I/O activity to the source and/or destination virtual array, as this is dictated by design considerations. Cancellation of in-progress I/O is shown here for completeness.) Then, the remote replication process is terminated and connections between the primary and secondary mirrors are severed (step 331). Each array's translation tables 83 and 85 are then activated (step 332), causing the new virtual port and LUN names and numbers to be used by the arrays 16a,b and thereby completing the exchange. The switch 14 is then notified of the configuration change (step 334), causing it to rebuild its name server database table 42. On receiving a state change notification from the switch, the hosts 12 then query the new database server table 42a from the switch and proceed to query the arrays 16a and 16b for LUN names and LUN numbers to rebuild their LUN tables 70a. 
In accordance with an embodiment, the configuration change is indicated by causing the switch 14a to recognize a “link bounce”. A link bounce causes temporary inaccessibility of the physical arrays 16a,b. The link bounce is transparent to the hosts 12. In accordance with Fibre Channel protocol, the switch 14a responds to the link bounce by re-building its name server database table 42a and sending it to all registered SAN devices. A link bounce may be caused for example by quickly disabling and re-enabling a Fibre Channel transmitter. It is understood, however, that the configuration change can be implemented in other manners. For example, the array 16b could cause a logout and subsequent login; or, a temporary I/O glitch could be caused. The invention can be implemented using any means for causing the switch 14a to recognize the configuration change.
In the preferred embodiment shown in FIG. 21, the functionality of FIG. 22 is distributed between the source array controller 44c and the destination array controller 44d. In FIG. 23, the operation of the source array controller 44c is shown. First, the remote replication software is invoked to copy the source virtual array 210f data to the destination virtual array 210i (step 340). While the data is being copied, the controller 44c sends the virtual port names and LUN names and numbers for the source virtual array 210f to the destination array controller 44d via the point-to-point link 310 (step 342). The controller 44c is also receiving virtual port names and LUN names and numbers for the destination virtual array (step 344). The source array controller 44c uses the virtual port names and LUN names and numbers received from the destination array controller 44d to build translation tables 83 for the virtual port names and LUN names and numbers. The translation tables 83a include virtual port name translation table 83b, LUN name translation table 83c, and LUN number translation table 83d. 
An example of a virtual port name translation table 83a is shown in FIG. 24. The table 83a includes an entry for each virtual port for the virtual array 210f. Each entry contains the current virtual port name, and a new virtual port name received from the destination array controller 44b. One entry 83a1 exists in the virtual port name translation table 83a shown in FIG. 24, because there is a single virtual port associated with the virtual array 210f. The entry 83a1 associates the source virtual array port name vn00 with the destination virtual array port name vn40.
The LUN name translation table 83b includes an entry 83b1 for each LUN. Each entry includes the current LUN name and a new LUN name received from the destination array controller 44b. An example of a LUN name translation table 83b is shown in FIG. 25. In this example, six entries 83b1 exist in the LUN translation table. The current source virtual array LUNs names a0, b0, c0, d0, e0, f0 are associated with the current destination virtual array LUN names g1, h1, i1, j1, k1, l1. An example of a LUN number translation table 83c is shown in FIG. 26. In this example, six entries 83c1 exist in the LUN number translation table 83c. The current source virtual array LUN numbers L00, L01, L02, L10, L11, L12 are associated with the current destination virtual array LUN numbers L80, L81, L82, L90, L91, L92 respectively. (It will be clear to the skilled artisan that the information in the tables 83a, b, c can be stored as one table, or separate tables, in accordance with design requirements and convenience.)
Referring back to FIG. 23, after the translation tables 83 have been built, the source array controller 44c checks to see if the remote replication software has synchronized the two arrays yet (step 348). If no mirror synch signal has been received, the controller 44c waits until mirror synch occurs. Now, the source array controller 44c checks to make sure it is ready to switch its virtual port names and LUN names and numbers (step 350). If ready, the source array controller 44c notifies the destination array controller 44d that the source array controller 44c is ready to switch virtual port names and LUN names and numbers (step 352), and checks to see if the destination array controller 44d is also ready to switch virtual port names and LUN names and numbers (step 354). If not, the controller 44c waits. When the destination array controller 44d indicates it is ready, the source array controller 44c, if necessary, cancels any in-progress I/O operations to the source virtual array 210f (step 355). Then remote replication process is terminated and connections between the primary and secondary mirrors are severed (step 356). The array controller 44c then enables its virtual port and LUN translation tables 83 (step 358). Now the source virtual array's virtual port names, LUN names, and LUN numbers are replaced with the destination virtual array's virtual port names, LUN names and LUN numbers that were received from the destination array controller 44d. The destination array controller 44d then causes a link bounce to notify the switch of the configuration change (step 360). Now the previously described switch name server database updates and host queries occur.
In FIG. 27, the operation of the destination array controller 44d is shown. First, the remote replication software is invoked to receive the data from the source array (step 370). While the data is being copied, the destination array controller 44d sends it virtual port names, LUN names, and LUN numbers to the source virtual array 16a via the point-to-point link 310 (step 372). The controller 44d is also receiving virtual port names, LUN names, and LUN numbers from the array controller 44c via the link 310 (step 374). The destination array controller 44d uses the virtual port names, LUN names, and LUN numbers received from the source array controller 44c to build translation tables 85 for the virtual port names, LUN names, and LUN numbers.
An example of a virtual port name translation table 85a is shown in FIG. 28. The table includes an entry 85a1 for each virtual port on the virtual array 210i. Each entry 85a1 contains the current virtual port name, and one of the new virtual port names received from the source array controller 44c. In this example, one entry 85a1 exists in the port translation table 85a. The entry 85a1 associates the destination virtual port name vn40 with the source virtual port name vn00.
The LUN name translation table 85b includes an entry 85b1 for each LUN 30. Each entry 85b1 includes the current LUN name and a new LUN name received from the source array controller 44c. An example of a LUN name translation table 85b is shown in FIG. 29. In this example, six entries 85b1 exist in the LUN name translation table 85b. The current destination virtual array LUNs g1, h1, i1, j1, k1, l1 are associated with the current source virtual array LUN names a0, b0, c0, d0, e0, f0.
The LUN number translation table 85c also includes an entry for each LUN. Each entry 85c1 includes the current LUN number and a new LUN number received from the source array controller 44a. An example of a LUN number translation table 85c is shown in FIG. 30. In this example, six entries 85c1 exist in the LUN number translation table 85c. The current destination array LUN numbers L80, L81, L82, L90, L91, L92 are associated with the current source array LUN numbers L00, L01, L02, L10, L11, L12 respectively.
Referring back to FIG. 27, after the translation tables 85 have been built, the destination array controller 44d checks to see if the remote replication software has synchronized the two arrays yet (378). If no mirror synch signal has been received, the controller 84 waits until mirror synch occurs. Now the destination array controller 44d checks to see if it is ready to switch virtual port names and LUN names and numbers (step 380). If so, the destination array controller 44d notifies the source array controller 44c that the destination array controller 44d is ready to exchange virtual port names and LUN names and numbers (step 382), and checks to see if the source array controller 44c is also ready to switch port and LUN names and LUN numbers (step 384). If not, the controller 44d waits. When the source array controller 44a indicates it is ready, the destination array controller 44d, if necessary, cancels any in-progress I/O operations to the destination virtual array 210i (step 385). The remote replication process is then terminated and connections between the primary and secondary mirrors are severed (step 386). The destination controller 44d then enables its port and LUN translation tables (step 388). Now the destination virtual array port names and LUN names and numbers are replaced with the array port names and LUN names and numbers that were received from the source array controller 44c. A link bounce is then caused to notify the switch of the configuration change (step 390). Now the previously described switch name server database update and host queries occur. The hosts 12 now see the same LUNs they saw before, but at different virtual port IDs. The storage system configuration now seen by the hosts is shown in FIG. 31. The destination virtual array 210i is now seen by the host as the source virtual array 210f. 
Now that the source virtual array 210f has been migrated to the destination virtual array 210i, the virtual array 210f in the physical array 16a can continue in its current configuration as a secondary mirror, or its LUNs can be presented as a new presented virtual array.
FIGS. 23 and 27 set forth one of many possible embodiments for controlling the copy function and name and number exchange functions. The actions need not necessarily be performed in the order shown. For example, the array controllers 44c and 44d could wait until the remote replication process is synchronized before name and number exchanges occur. Furthermore, instead of using translation tables to implement the name and number switch, the names of the virtual ports and LUNs could simply be replaced. The invention encompasses all the various ways of performing the copy and name and number exchange functions. The virtual arrays 210f and 210i have been presented as identical—that is, they have the same number of virtual ports, and the same number and configuration of LUNs. A destination virtual array that is larger, or a superset, of the source virtual array could also be employed. This is one manner in which to upgrade virtual array capacity.
Furthermore, in some implementations it is not necessary to exchange the LUN numbers between the source and destination virtual arrays 210f and 210i. Some remote replication software applications (for example Mirror View) provide the required LUN number information. In this case, only the LUN names need be exchanged. The prior description describes the exchange of both LUN names and LUN numbers for completeness, with the understanding that the invention may be implemented by exchange of virtual port and LUN names only.
In accordance with the second embodiment, it may be advantageous to simply copy the source virtual array data to the destination virtual array, and then replace the destination virtual array port names and LUN names and numbers with the source virtual array LUN names and numbers. In this case, after the link bounce, the destination virtual array appears as the source virtual array, and the source virtual array either disappears or is reinitialized as a new virtual array. One example of such an implementation is shown in FIGS. 32-35. In FIG. 32, an example of the general operation of the migration process is shown. FIG. 32 differs from FIG. 17 in that step 302 has been replaced with step 339. Rather than exchanging virtual port names and LUN names and numbers, destination virtual port names and LUN names and numbers are replaced with source virtual port names and LUN names and numbers. In FIG. 33, one possible example of alternate operation of the source array controller 44c is shown. FIG. 33 differs from FIG. 22 in that steps 344 346, and 350 have been eliminated. Step 358 now disables the source virtual array 210f instead of enabling the translation table 83. In FIG. 34, the operation of the destination array controller 44d is shown. FIG. 34 differs from FIG. 27 in that steps 374 and 380 have been eliminated. In FIG. 35, the resulting system 10 is shown wherein the virtual array 210i now appears on the physical array 16b as the original virtual array 210f, and the virtual array 210f on the physical array 16a has disappeared. Again, rather than disappearing, the virtual array 210f may be re-programmed as a new array.
In accordance with a further aspect of the invention, failover between virtual arrays can be accomplished via the migration mechanism previously described. For a given virtual array, a backup virtual array can be provided, either on the same physical array or a different physical array. The protected virtual array is referred to as a “primary” virtual array. The backup virtual array is referred to as a “secondary” virtual array. If a failure occurs within a primary virtual array, such as a disk failure that affects a LUN in the primary virtual array, the primary virtual array can be migrated automatically to the secondary virtual array in a manner transparent to the hosts and applications.
In FIG. 36 there is shown the system of FIG. 21, wherein the array 16a further includes failover database 402a. Likewise, the array 16b includes failover database 402b. Each failover database 402a, 402b includes a list of all secondary virtual arrays for each primary virtual array in the storage array. A general example of a failover database is shown in FIG. 37. The failover database includes entries 404. Each entry 404 includes a primary virtual array identifier (such as PA(0)) and one or more secondary virtual array identifiers (such as SA(01)). Each primary and secondary virtual array identifier in a given entry 404 has associated with it an ownership bit 406. The ownership bit 406 indicates which virtual array currently claims ownership of the data. That is, when the primary array is fully operational, its ownership bit 406 is set. When a primary array fails and a secondary array assumes ownership of the virtual array data, the ownership bit 406 is set for the secondary array that has assumed ownership. For example, entry 404a associates primary array PA(0) with secondary arrays SA(01)-SA(0n). The ownership bit 406 for the primary array PA(0) is set, indicating that the primary array PA(0) is fully functional. The entry 404b associates primary array PA(1) with secondary arrays SA(11)-SA(1n). The ownership bit 406 for the secondary array SA(11) is set, indicating that the primary array PA(0) has failed and the secondary array SA(11) is currently the owner of the virtual array data.
In FIG. 38, the failover database 402(a) is shown as it appears for the array 16a of FIG. 36. The first entry 404a lists virtual array 210f as the primary array, and virtual array 210i as the secondary virtual array. In the entry 404b, the primary virtual array 210g is backed up by the secondary virtual array 210h. 
The general operation of the failover process is shown in FIG. 39. In this example, the virtual array 210f of FIG. 36 shall operate as the primary virtual array, and the virtual array 210i shall operate as the secondary virtual array. The array controllers 44c and 44d are used to control the failover process in addition to the migration process previously described. For this failover example, the array controller 44c shall be referred to as the “primary array controller”, and the array controller 44d shall be referred to as the “secondary array controller”. The failover database 402(a) is initially as shown in FIG. 38. The primary virtual array 210f port names are referred to as “primary virtual port names”, and the primary virtual array 210f LUN names and numbers are referred to as “primary LUN names and numbers”. Likewise, the secondary virtual array 210i port names are referred to as “secondary virtual port names”, and the secondary virtual array 210i LUN names and numbers are referred to as “secondary LUN names and numbers”.
First, the backup copy is established by continually copying all the data on the primary virtual array 210f to the secondary virtual array 210i (step 410). This is preferably done using remote replication software, as previously described. Then, the primary virtual port names and LUN names and numbers are sent to the secondary array controller 44d (step 412), and the failover databases 402(a) and 402(b) are built (step 413). When these steps are complete, the secondary virtual array 210i is enabled as a failover array for the primary virtual array 210f (step 414). If a failure affecting the primary virtual array 210f is detected by the secondary array controller 44d (step 415), then the secondary virtual array 210i assumes the identity of the primary virtual array (step 416). Then, as previously described, the switch 14a updates its name server database 40a (step 418), and the hosts are updated (step 420). The hosts 12 can now learn the LUN names and numbers for the virtual arrays (step 422). If the primary virtual array 210f comes back on-line (step 424), the primary virtual array 210f negotiates with the secondary virtual array 210i to reclaim ownership of the primary virtual array data (step 426).
The operation of the primary array controller is shown in FIG. 40. First, heartbeat communication is established with the secondary array controller 44d (step 430). The heartbeat communication is maintained by periodically sending heartbeat messages from the primary array controller 44c to the secondary array controller 44d via the link 310. Then the data is copied via remote replication software from the primary virtual array to the secondary virtual array (step 432). The primary virtual port names and LUN names and addresses are then sent to the secondary array controller 44d (step 434), and the failover database 402(a) is built (step 435). Once these initial steps are completed, and the mirrors are synchronized (step 436), failover operation is enabled (step 437). In the event of a failure affecting the primary virtual array (step 438), the primary array controller 44c waits to see if the primary virtual array comes back on-line (step 438). Meanwhile, as shown in FIG. 41, if the primary array controller 44c can access the failover database 402(a), the primary array controller 44c updates the failure database 402(a) ownership bits 406 by resetting the primary virtual array 210f ownership bit 406 and setting the secondary virtual array 210i ownership bit 406. If the primary virtual array recovers (step 439), then the primary array controller 44c requests ownership of the virtual array (step 440). If ownership is granted by the secondary virtual array (step 442), and the mirrors are synchronized (step 444), then the virtual array 210f reclaims ownership of the virtual array data and re-establishes itself as the primary virtual array. The ownership bits in the failure database 402a are re-configured to reflect the present ownership, as in FIG. 38.
The operation of the secondary array controller 44d is shown in FIGS. 42A and 42B. First, heartbeat communication is established with the primary (step 448). The primary virtual array data is received from the primary virtual array (step 450), and then the primary virtual port names and LUN names and numbers are received (step 451). The secondary array controller 44d builds translation tables 85 for the virtual port names and LUN names and numbers, as previously described (step 452). (Where “source” virtual port names and LUN names and numbers were described, for example in FIGS. 24-26, we now refer to “primary” virtual port names and LUN names and numbers. Where “destination” virtual port names and LUN names and numbers were described, for example in FIGS. 28-30, we now refer to “secondary” virtual port names and LUN names and numbers.) Then the failover database 402(b) is built (step 453). Once the mirrors are synchronized (step 454), the secondary virtual array 201i is enabled as a failover array for the primary virtual array 201f. 
The secondary array controller 44d now monitors the heartbeat communication from the primary array controller 44c to determine whether a failure affecting the primary virtual array 210f has occurred. For example, if the secondary array controller 44d fails to observe a heartbeat signal from the primary array controller 44c for a given period of time, it may conclude that a failure has occurred in the primary virtual array 210f. As long as no failure is detected (step 456), then the secondary virtual array operation continues (step 458). But if a primary failure is detected (step 456), then the secondary array controller 44d retrieves the name server database name table 43a from the switch 14a to determine whether the primary virtual array 210f is logged on. If the primary virtual array 210f appears in the name table 43a (step 464), indicating that the primary virtual array is logged on, then no failover occurs and secondary virtual array operation continues (step 466). If the primary virtual array is not logged on (step 464), then the secondary array controller enables its translation tables 85 (step 468) and assumes ownership of the virtual array data by replacing the secondary virtual port names and LUN names and numbers with the primary virtual port names and LUN names and numbers (step 470). The secondary array controller notifies the switch 14a of the configuration change (step 472), causing the updating of the name server database and subsequent host learning of LUN names and numbers as previously described. The virtual arrays now appear to the hosts as shown in FIG. 35.
If the primary virtual array recovers, the primary array controller 44c may request ownership of the virtual array. If the primary array controller requests ownership (step 474), then the secondary array controller 44d checks to ensure that the mirrors are synchronized (step 476), and then disables its translation tables (step 478). The secondary array controller 44d then grants ownership of the virtual array data to the primary virtual array 210f. 
One skilled in the art will understand that the heartbeat communication used in the previous example is only one of many ways in which a failure can be detected. For instance, failure of the virtual array 210f may be detected by the primary array controller 44c rather than the secondary array controller 44d, perhaps in response to a failure signal internal to the array 16a, or indirectly as a derivation of other received information. If the source array controller 44c detects a primary virtual array 210f failure, it operates as shown in FIG. 43. FIG. 43 differs from FIG. 40 in that step 447 is included after failure detection to send a failure indication to the secondary array controller 44d. The secondary array controller 44d operates as shown in FIG. 44. FIG. 44 differs from FIGS. 42A,B in that steps 462, 464, and 464 have been eliminated. Since the primary array controller 44c has already indicated that the primary virtual array 210f has failed, there is no need to check the name server database to see if the primary has failed.
It is further noted that the primary and secondary array controller 44c, 44d functionality could be implemented external to the arrays 16a, 16b, for example as a central control function in another device. In this case, it is conceivable that the failover databases 402a and 402b would be combined as a failover database available to the central control function.
The above examples have been presented in terms of hosts accessing presented virtual arrays via a switch. However, devices other than hosts may take advantage of the ability to migrate presented virtual arrays. For instance, in a hierarchically coupled Fibre Channel network, the presented virtual arrays may be accessed by another Fibre Channel array or controller rather than a host. Such a system is shown in FIG. 45. Here, hosts 600 are coupled to a Fibre Channel switch 602. The Fibre Channel switch 602 is coupled to Fibre Channel switches 604a and 606b. The Fibre Channel switches 604a and 604b are coupled to storage arrays 606a and 606b. The storage array 606a is configured as four presented virtual arrays 608a, 608b, 608c, and 608d. The storage array 606b is configured as four presented virtual arrays 608e, 608f, 608g, and 608h. If, for example, the presented virtual array 408a is migrated to the presented virtual array 608g according to one of the methods previously described, each switch 604a and 604b name server database will be updated, and then the switch 602 name server database will be updated. The claims are intended to cover all such system configurations.
Another such example is shown in FIG. 46 wherein the failover functionality of the invention is employed. Here, the hosts 600 and switches 604a, 604b are coupled to three storage arrays 700a, 700b, and 700c. These arrays include virtual array 708a-708h. The virtual array 708d is configured as a primary virtual array P1 backed up by the secondary virtual array S1 708a. The virtual array 708e is configured as a primary virtual array P2 backed up by the secondary virtual array S2 708g. 
The present invention is not to be limited in scope by the specific embodiments described herein. Various modifications of the present invention, in addition to those described herein, will be apparent to those of ordinary skill in the art from the foregoing description and accompanying drawings. For example, the disclosed controllers can be implemented in hardware, software, or both. All such modifications are intended to fall within the scope of the invention. Further, although aspects of the present invention have been described herein in the context of a particular implementation in a particular environment for a particular purpose, those of ordinary skill in the art will recognize that its usefulness is not limited thereto and that the present invention can be beneficially implemented in any number of environments for any number of purposes.

## Claims

1. Apparatus for use in a storage system comprising a fabric having a database that associates Fibre Channel names and Fibre Channel addresses of Fibre Channel ports coupled to it, the apparatus comprising:
a plurality of groups of logical units of storage;
at least one physical port coupled to the groups through which the groups can be coupled to a fabric;
each group assigned a unique virtual port address for each physical port to which it is coupled;
a first said group comprising a primary virtual array, the primary virtual array having at least one primary virtual port coupled to the fabric, each primary virtual port having a primary virtual port name and a primary virtual port address;
a second said group comprising a secondary virtual array, the secondary virtual array having one or more secondary virtual ports coupled to the fabric, each secondary virtual port having a secondary virtual port name and a secondary virtual port address;
logic for copying all data resident on the primary virtual array to the secondary virtual array;
logic responsive to a failure for:
replacing the secondary virtual port names with the primary virtual port names;
causing the fabric to update its name server database so that the database associates the primary virtual port names with the secondary virtual port addresses.

2. The apparatus of claim 1 wherein the primary virtual array includes primary LUNs, each primary LUN having a primary LUN name and primary LUN number, and wherein the secondary virtual array includes secondary LUNs, each secondary LUN having a secondary LUN name and a secondary LUN number, and wherein the logic for replacing further comprises logic for replacing the secondary LUN names with the primary LUN names.

3. The apparatus of claim 2 wherein the logic for replacing further comprises logic for associating the secondary LUN numbers with the primary LUN numbers.

4. The apparatus of claim 3 further comprising a secondary virtual port translation table associating the secondary virtual port names with the primary virtual port names, the secondary translation table used by the logic for replacing for replacing the secondary virtual port names with the primary virtual port names.

5. The apparatus of claim 4 further comprising a secondary LUN translation table associating the secondary LUN names and numbers with the primary LUN names and numbers, the secondary LUN translation table used by the logic for replacing the secondary LUN names and numbers with the primary LUN names and numbers respectively.

6. The apparatus of claim 5 wherein the logic for replacing includes a failover database associating the primary virtual array with the secondary virtual array, the failover database indicating which of the primary and secondary virtual arrays has ownership of the data initially resident on the primary virtual array.

7. The apparatus of claim 6 wherein the logic for replacing comprises a secondary array controller capable of enabling the secondary port and secondary LUN translation tables.

8. A program product comprising a computer readable medium having embodied therein a computer program for storing data, the computer program for operation in a system comprising:
a plurality of groups of logical units of storage;
at least one physical port coupled to the groups through which the groups can be coupled to a fabric;
each group assigned a unique virtual port address for each physical port to which it is coupled;
a first said group comprising a primary virtual array, the primary virtual array having at least one primary virtual port coupled to the fabric, each primary virtual port having a primary virtual port name and a primary virtual port address;
a second said group comprising a secondary virtual array, the secondary virtual array having one or more secondary virtual ports coupled to the fabric, each secondary virtual port having a secondary virtual port name and a secondary virtual port address; the program product comprising:
logic for copying all data resident on the primary virtual array to the secondary virtual array;
logic responsive to a failure indication for:
replacing the secondary virtual port names with the primary virtual port names;
causing the fabric to update its name server database so that the database associates the primary virtual port names with the secondary virtual port addresses.

9. The program product of claim 8 wherein the primary virtual array includes primary LUNs, each primary LUN having a primary LUN name and primary LUN number, and wherein the secondary virtual array includes secondary LUNs, each secondary LUN having a secondary LUN name and a secondary LUN number, and wherein the logic for replacing further comprises logic for replacing the secondary LUN names with the primary LUN names.

10. The program product of claim 9 wherein the logic for replacing further comprises logic for replacing the secondary LUN numbers with the primary LUN numbers.

11. The program product of claim 10 wherein the logic for replacing uses a secondary virtual port translation table associating the secondary virtual port names with the primary virtual port names for replacing the secondary virtual port names with the primary virtual port names.

12. The program product of claim 11 wherein the logic for replacing uses a secondary LUN translation table associating the secondary LUN names and numbers with the primary LUN names and numbers for replacing the secondary LUN names and numbers with the primary LUN names and numbers respectively.

13. The program product of claim 11 wherein the logic for replacing includes a failover database associating the primary virtual array with the secondary virtual array, the failover database indicating which of the primary and secondary virtual arrays has ownership of the data initially resident on the primary virtual array.

14. The program product of claim 13 wherein the logic for replacing comprises a secondary array controller capable of for enabling the secondary port and secondary LUN translation tables.

15. A method for operation in a system comprising:
a plurality of groups of logical units of storage;
at least one physical port coupled to the groups through which the groups can be coupled to a fabric;
each group assigned a unique virtual port address for each physical port to which it is coupled;
a first said group comprising a primary virtual array, the primary virtual array having at least one primary virtual port coupled to the fabric, each primary virtual port having a primary virtual port name and a primary virtual port address;
a second said group comprising a secondary virtual array, the secondary virtual array having one or more secondary virtual ports coupled to the fabric, each secondary virtual port having a secondary virtual port name and a secondary virtual port address; the method comprising the steps of:
copying all data resident on the primary virtual array to the secondary virtual array;
in response to a failure indication:
replacing the secondary virtual port names with the primary virtual port names;
causing the fabric to update its name server database for use by the host(s) so that the database associates the primary virtual port names with the secondary virtual port addresses.

16. The method of claim 15 wherein the primary virtual array includes primary LUNs, each primary LUN having a primary LUN name and primary LUN number, and wherein the secondary virtual array includes secondary LUNs, each secondary LUN having a secondary LUN name and a secondary LUN number, and wherein the step of replacing further comprises replacing the secondary LUN names with the primary LUN names.

17. The method of claim 16 wherein the step of replacing further comprises replacing the secondary LUN numbers with the primary LUN numbers.

18. The method of claim 17 wherein the step of replacing uses a secondary virtual port translation table associating the secondary virtual port names with the primary virtual port names for replacing the secondary virtual port names with the primary virtual port names.

19. The method of claim 18 wherein the step of replacing uses a secondary LUN translation table associating the secondary LUN names and numbers with the primary LUN names and numbers for replacing the secondary LUN names and numbers with the primary LUN names and numbers respectively.

20. The apparatus of claim 19 wherein the logic for replacing includes a failover database associating the primary virtual array with the secondary virtual array, the failover database indicating which of the primary and secondary virtual arrays has ownership of the data initially resident on the primary virtual array.

21. The method of claim 20 wherein the step of replacing uses a secondary array controller for enabling the secondary port and secondary LUN translation tables.