Storage system with remote copy controllers

A storage system 1 includes a first storage apparatus 100 and a second storage apparatus 100 communicatively coupled to an external apparatus 300. The first and second storage apparatuses respectively have first and second storage areas VDEVs selectively accessible from the external apparatus, first and second temporary storage areas 113, and remote copy controllers 1122 configured to control data copy process. The storage system includes a data I/O process authority information storage unit LDK storing data I/O process authority information. Either of the remote copy controllers reads the data I/O process authority information and copies according to the data I/O process authority information, to the other storage apparatus, data stored either in the first storage area and the first temporary storage area, or in the second storage area and the second temporary storage area that are included in the storage apparatus to which the remote copy controller belongs.

TECHNICAL FIELD

The present invention relates to a storage system and a method for controlling a storage system including a plurality of storage apparatuses, and more specifically relates to a storage system and a method for controlling a storage system including a plurality of storage apparatuses, which enable more efficient and effective utilization of storage areas provided by the storage apparatuses.

BACKGROUND ART

For a storage apparatus providing a data storage area to an external apparatus such as a host apparatus, a storage virtualization mechanism has been increasingly utilized. With use of the storage virtualization mechanism, the storage apparatus provides the external apparatus with not only a hard disk drive (hereinafter “HDD”) included in the apparatus itself, but also a virtual logical device (Virtual logical DEVice, hereinafter “VDEV”). The VDEV is a virtual unit storage area and is provided based on a physical storage area provided by an HDD included in another external storage apparatus externally coupled to a disk controller (hereinafter “DKC”) in the storage apparatus itself.

Such a virtualization mechanism enables dynamic allocation of storage areas according to a storage capacity required by the external apparatus, rather than previously allocating storage areas to the external apparatus in a fixed manner. Thus, hardware resources of the storage apparatus can be effectively utilized. Examples of such a storage virtualization mechanism are disclosed in Patent Citations 1 to 3, for example.

However, the virtualization mechanism has a problem that all of the VDEVs provided by the external storage apparatus cannot be utilized when failure occurs in the DKC of the storage apparatus, for example. In order to solve this problem, for example, Patent Citation 4 proposes a configuration using a dual-DKC system for an external apparatus, the system including two DKCs coupled to the external apparatus through alternate path connection.Patent Citation 1: Japanese Patent Application Laid-open Publication No. 2006-285876Patent Citation 2: Japanese Patent Application Laid-open Publication No. 2007-72538Patent Citation 3: Japanese Patent Application Laid-open Publication No. 2005-107645Patent Citation 4: Japanese Patent Application Laid-open Publication No. 2008-225753

DISCLOSURE OF INVENTION

Technical Problem

However, the configuration using the merely dual DKCs still has the following problem. Specifically, in the case where there is no consistency between data stored in respective cache memories (hereinafter “CMs”) in the DKCs, the data in the HDD may be overwritten with unauthorized old data when each of the DKCs performs destage process of writing the data in the CM into the HDD in the external storage apparatus.

The present invention was made to solve the foregoing problems, and an object of the present invention is to provide a storage system and a method for controlling a storage system, which enable more efficient and effective utilization of storage areas provided to an external apparatus by a storage apparatus.

Technical Solution

In order to solve the foregoing and other problems, one aspect of the prevent invention is a storage system including a first storage apparatus and a second storage apparatus, which are communicatively coupled to an external apparatus, the first and second storage apparatuses respectively having: first and second storage areas VDEVs selectively accessible from the external apparatus to store data of the external apparatus; first and second temporary storage areas temporarily storing input/output data of the first and second storage areas; and remote copy controllers configured to control data copy process between the first and second storage areas and between the first and second temporary storage areas, and the first and second storage areas being formed by having a logical device allocated thereto in a virtual manner, the logical device generated from at least one physical storage medium provided in a third storage apparatus communicatively coupled to the first and second storage apparatuses. The storage system comprises a data I/O process authority information storage unit storing data I/O process authority information indicating which one of the first and second storage areas has the authority to process data I/O of the external apparatus. In the storage system, the remote copy controller in any one of the first and second storage apparatuses reads the data I/O process authority information stored in the data I/O process authority information storage unit and copies, to the other storage apparatus, data stored either in the first storage area and the first temporary storage area or in the second storage area and the second temporary storage area, which are included in the one of the first and second storage apparatuses to which the remote copy controller belongs, when it is determined that the data I/O process authority information is not recorded and that the own storage apparatus is a primary logical device in remote copy control.

Advantageous Effects

The present invention can provide a storage system and a method for controlling a storage system, which enable more efficient and effective utilization of storage areas provided by a storage apparatus.

EMBODIMENTS OF INVENTION

With reference to the accompanying drawings, an embodiment of the present invention will be described below.

Configuration of Storage System According to Embodiment

First, with reference toFIG. 1, a configuration of a storage system according to this embodiment will be described.FIG. 1is a diagram showing an example of a configuration of a storage system1according to this embodiment. As shown inFIG. 1, the storage system1according to this embodiment includes two storage apparatuses100, a management apparatus200for this system1, a host apparatus300as an external apparatus and two external storage apparatuses400.

Note that, in the following description, the multiple storage apparatuses100and external storage apparatuses400will be called the storage apparatuses1and2and the external storage apparatuses1and2, respectively, when those apparatuses are distinguished from each other.

Between the host apparatus300and the storage apparatuses100and between the storage apparatuses100and the external storage apparatuses400, communication networks N1are provided, respectively, to couple the respective apparatuses so as to allow communication between the apparatuses. In this embodiment, each of the communication networks N1is a SAN (Storage Area Network) which enables communication according to a fiber channel (hereinafter “FC”) protocol, for example. Each communication network N1is generally formed to have a redundant configuration including multiple FC switches (not shown).

Between the management apparatus200and the storage apparatuses100, the external storage apparatuses400and the host apparatus300, a communication network N2is provided to couple the respective apparatuses so as to allow communication between the apparatuses. In this embodiment, the communication network N2is a LAN (Local Area Network) which enables IP (Internet Protocol) connection, for example.

As schematically shown inFIG. 1, a logical device (Logical DEVice, hereinafter the “LDEV”) that is a logical unit storage area is created from a physical storage area provided by a HDD in each of the external storage apparatuses400. Moreover, as described later, the LDEV in the external storage apparatus400is provided to the host apparatus300as a VDEV in the storage apparatus100. In the example ofFIG. 1, the LDEV in the external storage apparatus1of the two external storage apparatuses400(external storage apparatuses1and2) is mapped onto VDEVs in the two storage apparatuses100(storage apparatuses1and2), respectively. Accordingly, an application to be run in the host apparatus300recognizes as if data is written into and read from one VDEV.

A data I/O path between the host apparatus300and each of the storage apparatuses100is formed as an alternate path between the storage apparatuses1and2. The data I/O path is switched so as to allow the host apparatus300to perform data I/O process with the storage apparatus1under normal conditions and with the storage apparatus2under predetermined conditions.

Configurations of Management Apparatus200and Host Apparatus300

Next, configurations of the management apparatus200and the host apparatus300will be described.FIG. 2shows an example of a hardware configuration of a computer10that can be used as the management apparatus200or the host apparatus300. The computer10includes a central processing unit11(for example, a CPU (Central Processing Unit) or a MPU (Micro Processing Unit), hereinafter simply referred to as “CPU”), a main storage unit12(for example, a RAM (Random Access Memory) or a ROM (Read Only Memory)), an auxiliary storage unit13(for example, a hard disk), an input unit14(for example, a keyboard and a mouse) for receiving an operation input by a user, an output unit15(for example, a liquid crystal monitor) and a communication interface16(for example, an NIC (Network Interface Card) and a HBA (Host Bus Adapter)) for achieving communication with other apparatuses.

Next, the management apparatus200will be described. As shown inFIG. 2, the management apparatus200includes the CPU11, the main storage unit12and the communication interface16. The CPU11, the main storage unit12and the communication interface16are coupled to each other through a bus. The CPU11is an arithmetic processing unit for executing various programs stored in the main storage unit12. The main storage unit12is a so-called internal storage unit and includes a nonvolatile memory for storing various programs and the like and a volatile memory for temporarily storing an arithmetic processing result. The communication interface16is coupled to the storage apparatuses100, the external storage apparatuses400and the host apparatus300via the communication network N2that is the LAN in this embodiment.

FIG. 3shows an example of a software configuration of the management apparatus200. The management apparatus200has a function of managing the configuration of each storage apparatus100and giving an instruction to the host apparatus300via the communication network N2. The management apparatus200includes a lock disk setting part211and a remote copy setting part212in addition to basic functions required to manage the storage system1. The main storage unit12in the management apparatus200stores programs for implementing functions of the lock disk setting part211and the remote copy setting part212. A data I/O part213controls data input and output to and from the storage apparatuses100, the external storage apparatuses400and the host apparatus300.

The lock disk setting part211has a function of setting a lock disk (Lock DisK, hereinafter “LDK”) that is a HDD for storing “ownership” (data I/O process authority information) used to manage which one of the storage apparatuses1and2in the storage system1of this embodiment has the authority to receive data I/O of the host apparatus300. Note that the ownership and the LDK will be described in detail later.

Assuming that one of the VDEVs in the storage apparatuses1and2is a primary logical device (hereinafter referred to as a “P-VOL” (Primary Volume) as a general term) to be a copy source and the other is a secondary logical device (similarly, hereinafter referred to as a “S-VOL” (Secondary Volume)) to be a copy destination, the remote copy setting part212has a function of setting the P-VOL and the S-VOL as a copy pair and a function of associating the copy pair with the LDK.

Next, the host apparatus300will be described. A hardware configuration of the host apparatus300is the same as that described with reference toFIG. 2, and thus description thereof will be omitted.FIG. 4shows an example of a software configuration of the host apparatus300. The host apparatus300includes an OS (Operation System) for providing basic functions of the host apparatus300, an application program311run on the OS, a path management controller312and a data I/O part313.

The application program311includes various business programs and one or more application programs can be implemented. The path management controller312manages setting of data I/O paths between the host apparatus300and the storage apparatuses1and2. Specifically, for example, the path management controller312normally sets a data I/O path between the host apparatus300and the storage apparatus1, monitors a state of the data I/O path and switches the data I/O path to the storage apparatus2when an error is returned from the storage apparatus1in response to a write request or when it is determined that no response is returned even after a write request is retried.

The data I/O part313controls data input and output to and from the storage apparatuses100, the external storage apparatuses400and the management apparatus200. Note that, as the OS of the host apparatus300, virtualization software, for example, Xen (registered trademark) or VMWare (registered trademark) for providing a virtual server function may be implemented and the host apparatus300may be operated as a virtual server.

Configurations of Storage Apparatus100and External Storage Apparatus400

Next, the storage apparatus100and the external storage apparatus400will be described.FIG. 5shows an example of configurations of the storage apparatus100and the external storage apparatus400. The storage apparatus100includes a disk controller (DKC)110and a disk unit120including multiple hard disk drives (HDDs)121. The storage apparatus100in this embodiment is a disk array apparatus including the multiple HDDs121arranged in an appropriate RAID configuration, and provides one or more RAID groups122having the RAID configuration. The RAID group122provides one or more logical devices (LDEVs). Note that another storage medium such as a semiconductor storage device (Solid State Drive, “SSD”) can be adopted instead of the HDD500.

The storage apparatus100in this embodiment can provide, as data storage areas in the host apparatus300, a LDEV created from the HDDs121provided in the apparatus itself, and a virtual logical device (VDEV) obtained by virtualizing a LDEV created from HDDs421in the external storage apparatus400to be described later. Note that the storage apparatus100can be configured to provide the host apparatus300with only a VDEV created from the LDEV of the external storage apparatus400without providing the LDEV of its own. In this embodiment, each of the storage apparatuses100includes one VDEV created from the LDEV of the external storage apparatus400.

As shown inFIG. 5, the disk controller110in the storage apparatus100includes a CPU111, a shared memory (hereinafter “SM”)112, a cache memory (CM)113, a channel adapter (CHannel Adapter, hereinafter “CHA”)114, a disk adapter (DisK Adapter, hereinafter “DKA”)115, a service processor (SerVice Processor, hereinafter “SVP”)116and an internal network117coupling those described above.

The CPU111is an arithmetic processing unit for executing various programs stored in the shared memory112to be described later.

The shared memory112is a so-called internal storage unit and includes a nonvolatile memory for storing various programs, tables to be used by the programs and the like and a volatile memory for temporarily storing an arithmetic processing result. The cache memory (temporary storage area)113is a data buffer memory for shortening a data read time by temporarily storing data read from the DKA115and the CHA114to be described later. The DKA115is coupled to the HDDs121and controls data input and output between the disk controller110and the HDDs121. Note that, when no HDDs121are provided in the storage apparatus100, there is a case where the DKA115is not provided.

The CHA114is a communication interface for controlling data input and output to and from the communication network N1that is the SAN using the FC protocol in this embodiment. Moreover, the CHA114includes multiple communication ports and is coupled to the host apparatus300and the external storage apparatus400via the communication network N1. Through the CHA114, data is written into and read from the HDDs421in the external storage apparatus400.

The SVP116is a computer including: a memory storing a program having a function for collecting configuration information, operation state information and the like on the storage apparatus100or for giving an instruction to the disk controller110; and a processor for executing the program. The SVP116also has a function of a communication interface for controlling data input and output to and from the communication network N2that is the IP-coupled LAN in this embodiment. The SVP116is coupled to the management apparatus200via the communication network N2. Note that a network interface card merely as a communication interface having no function of the SVP116may be provided.

Next, the shared memory112will be described.FIG. 6shows an example of a configuration of the shared memory112. In the shared memory112, stored are: a virtualization management part1121, a remote copy controller1122, a data I/O part1123, an external storage apparatus management table1124, a lock disk management table1125and a copy pair management table1126.

The virtualization management part1121has a function of mapping a correspondence relationship between the LDEV provided by the external storage apparatus400and the VDEV that is the virtual logical device provided to the host apparatus300, thereby allowing the host apparatus300to transparently recognize the storage area in the external storage apparatus400as the storage area in the storage apparatus100and to execute data input and output.

The remote copy controller1122has a function of achieving main process in the storage system1according to this embodiment, and performs process such as control of ownership regarding data input and output to and from the host apparatus300, control of data copy of the CM113between the storage apparatuses100and control of destage process of writing data stored in the CM113in the storage apparatus100into the HDDs421in the external storage apparatus400. The above process will be described later with reference to flowcharts and the like. The data I/O part1123performs data I/O control for the DKC110. Configurations and roles of the external storage apparatus management table1124, the lock disk management table1125and the copy pair management table1126will be described later.

Next, with reference toFIG. 5, the external storage apparatus400will be described. As shown inFIG. 5, the configuration of the external storage apparatus400is basically the same as that of the storage apparatus100. However, in the configuration of the shared memory112, for example, the virtualization management part1121, the remote copy controller1122and the tables used thereby are omitted.

FIG. 7shows an external perspective view (an example) of the storage apparatus100. The storage apparatus100includes a base housing101in which the DKC110is mounted and an extension housing102in which an extension hard disk drive171is mounted.

Configuration Example having Multiple VDEVs and LDEVs

FIG. 8shows a general configuration example of the storage system1according to this embodiment. In the example ofFIG. 8, LDEV1to LDEV4are provided in the four external storage apparatuses400, respectively. For these LDEVs, VDEV1to VDEV4are created in each of the storage apparatuses100. The host apparatus300can use storage areas provided by the LDEVs in the external storage apparatuses400through the VDEVs in the storage apparatus1or the storage apparatus2. Note that the VDEVs in the storage apparatus100may also be provided to the host apparatus300as multiple logical units (“LUs”).

Functions of Storage System1According to This Embodiment

Next, description will be given of an outline of main functions to be achieved by the storage system1according to this embodiment.FIG. 9schematically shows communication paths provided between the host apparatus300, the storage apparatuses1and2(100), the external storage apparatus400and the lock disk (LDK) in the storage system1. The host apparatus300has the configuration described with reference toFIGS. 2 and 3and is coupled to a CHA1(114) in each storage apparatus100by a host bus adapter (HBA)320. Thus, a data write/read request is transmitted to the storage apparatus100from the host apparatus300, and the host apparatus300receives data read from the storage apparatus100.

The DKCs110in the storage apparatuses100are coupled so as to be able to communicate with each other through CHA2(114) and, as described later, data stored in the CMs113are copied or various control signals are transmitted and received between the storage apparatuses100.

Between a CHA3(114) in each storage apparatus100and the external storage apparatus400, data I/O of the host apparatus300to the VDEVs in the storage apparatus100is executed as transmission and reception to and from a predetermined LDEV in the external storage apparatus400by the function of the virtualization management part1121in the DKC110of the storage apparatus100.

A CHA4(114) in each storage apparatus100is coupled to the HDD421in the external storage apparatus400so as to be able to communicate therewith. Thus, the lock disk (LDK) is registered in the external storage apparatus management table1124to be described later by the lock disk setting part211in the management apparatus200.

FIG. 10schematically shows an outline of the functions of the storage system1. Through the communication path shown inFIG. 9, the VDEV in the storage apparatus1and the VDEV in the storage apparatus2are set as a remote copy pair of a primary logical volume (P-VOL) and a secondary logical volume (S-VOL). In a normal state, data I/O is performed between the host apparatus300and the VDEV in the storage apparatus1as the P-VOL. When data is written into the VDEV in the storage apparatus1as the P-VOL, the written data is reflected in a difference copy or the like in the VDEV in the storage apparatus2as the S-VOL on a timely basis. Therefore, even when failures occur in the storage apparatus1having the P-VOL, the host apparatus300can be operated by use of the storage apparatus2having the S-VOL.

Moreover, stored data is copied between the CM113in the storage apparatus1and the CM113in the storage apparatus2. Even when a data I/O target of the host apparatus300is changed, efficient data I/O can be immediately executed by utilizing the data stored in one of the CMs113.

Relationship between Remote Copy Pair Status and Ownership

Here, description will be given of a relationship between an ownership for determining a data I/O target from the host apparatus300and states of the P-VOL (the VDEV in the storage apparatus1) and the S-VOL (the VDEV in the storage apparatus2) that form a remote copy pair.FIG. 11shows a relationship between a remote copy pair status and the ownership in the form of a table.

In a “PAIR” state where the pair of the P-VOL and the S-VOL normally functions, the P-VOL has the ownership which is the authority to receive data I/O of the host apparatus300. Thus, the P-VOL can perform data I/O to and from the host apparatus300. In this event, no data I/O is performed between the S-VOL and the host apparatus300. The data I/O between the S-VOL and the host apparatus300is permitted when the pair status becomes a SSWS (S-VOL SWap Suspend) state to be described later.

When a data copy from the P-VOL to the S-VOL can no longer be executed for any reason such as failures in the storage apparatus2on the S-VOL side or in the data communication path between the DKCs110, the pair status is shifted to a “FAILURE SUSPEND” state. In this state, the storage apparatus1on the P-VOL side still has the ownership, and thus no data I/O is performed between the S-VOL and the host apparatus300.

In the “PAIR” state that is the normal state, when the path management controller312in the host apparatus300determines that there is some trouble or the like in the storage apparatus1or in the communication path between the host apparatus300and the storage apparatus1, such as when there is no response from the storage apparatus1with respect to the data I/O of the host apparatus300to the P-VOL even after a predetermined number of retries are made, the path management controller312in the host apparatus300changes the data I/O path to the storage apparatus2on the S-VOL side. In this event, the ownership is changed to the S-VOL and then the host apparatus300performs data I/O to and from the S-VOL.

Destage Mode for Cache Memory Data According to This Embodiment

Next, with reference toFIGS. 12 and 13, destage of the data stored in the cache memory (CM) to the HDD421in the external storage apparatus400will be described according to this embodiment.FIG. 12is a schematic diagram showing destage procedures from the CM113in the storage apparatus1on the P-VOL side to the HDDs421that form the LDEV in the external storage apparatus400.FIG. 13is a schematic diagram showing the same destage procedures from the storage apparatus2on the S-VOL side.

With reference toFIG. 12, the host apparatus300performs data I/O to and from the P-VOL, and a data write request from the host apparatus300is stored in the CM113on the P-VOL side ((a) Write DATA). Next, the remote copy controller1122in the storage apparatus1copies the Write DATA stored in the CM113of the storage apparatus1to the CM113of the storage apparatus2through a path (inter-DKC path) between the CHA2(114) in the storage apparatus1and the CHA2(114) in the storage apparatus2((b) CACHE DATA COPY).

In this event, since the data stored in the CM113of the storage apparatus1and the data stored in the CM113of the storage apparatus2match, the remote copy controller1122in the storage apparatus1destages the data stored in the CM113of its own to the external storage apparatus400((c) DESTAGE). When it is determined that the destage has been successful, the remote copy controller1122in the storage apparatus1transmits a request to delete the data stored in the CM113of the storage apparatus2to the remote copy controller1122in the storage apparatus2through the inter-DKC path ((d) CACHE DATA DELETE REQUEST). The remote copy controller1122in the storage apparatus2receives the delete request and then deletes the data in the CM113of its own to release the storage area of the CM113.

Furthermore, the remote copy controller1122in the storage apparatus1copies all the data stored in the CM113of its own to the CM113in the storage apparatus2in order to allow the data in the CM113of its own to match the data in the CM113of the storage apparatus2again. The above destage process from the P-VOL will be described in detail later with reference to a flowchart.

With reference toFIG. 13, as in the case ofFIG. 12, the host apparatus300performs data I/O to and from the P-VOL, and a data write request from the host apparatus300is stored in the CM113on the P-VOL side ((a) Write DATA). Next, the remote copy controller1122in the storage apparatus1copies the Write DATA stored in the CM113of the storage apparatus1to the CM113of the storage apparatus2through the path (inter-DKC path) between the CHA2(114) in the storage apparatus1and the CHA2(114) in the storage apparatus2((b) CACHE DATA COPY).

In this event, as in the case ofFIG. 12, the data stored in the CM113of the storage apparatus1and the data stored in the CM113of the storage apparatus2match. Here, the remote copy controller1122in the storage apparatus1requests the remote copy controller1122in the storage apparatus2to destage the data stored in the CM113of the storage apparatus2to the external storage apparatus400((c) DESTAGE REQUEST). Upon receipt of the request, the remote copy controller1122in the storage apparatus2destages the data stored in the CM113of its own to the external storage apparatus400((d) DESTAGE).

When it is determined that the destage has been successful, the remote copy controller1122in the storage apparatus2transmits a notification indicating that the destage is completed to the remote copy controller1222in the storage apparatus1through the inter-DKC path ((e) DESTAGE COMPLETION NOTIFICATION). The above destage process from the S-VOL will be described in detail later with reference to a flowchart.

Explanation of Tables Used in This Embodiment

Next, with reference toFIGS. 14 to 18, description will be given of tables to be used in the process executed in the storage system1according to this embodiment.

External Storage Apparatus Management Table1124

FIGS. 14 and 15show examples of the external storage apparatus management table1124. These external storage apparatus management tables1124are stored in the SMs112in the storage apparatuses1and2, respectively, and set by a manager operating the management apparatus200before operation of the storage system1is started. The examples ofFIGS. 14 and 15show that four LDEVs are formed in one external storage apparatus400and another external storage apparatus400is registered as a lock disk (LDK) for managing the ownership. Note that information stored in the external storage apparatus management tables1124shown inFIGS. 14 and 15are examples for explanation and do not show actual stored contents. Similarly, as for explanation of other tables below, information shown in the drawings are merely examples.

In the external storage apparatus management table1124, the following items are stored: a serial number11241, a vendor name11242, an apparatus name11243, LDEV identification information11244, a LDEV capacity11245, a VDEV number11246, management information11247and path information11248. Each stored in the external storage apparatus management table1124specifies a correspondence relationship between the LDEV formed in the external storage apparatus400and the VDEV in the storage apparatus1or2.

In the column of the serial number11241, a serial number of the external storage apparatus400which provides the LDEV or which is registered as the lock disk is stored. In the examples ofFIGS. 14 and 15, the serial number of the external storage apparatus400providing the LDEV is “11234” and the serial number of the external storage apparatus400used as the LDK is “AB555”.

In the column of the vendor name11242, a name of a vendor who has supplied the external storage apparatuses400is stored. In the examples shown inFIGS. 14 and 15, a vendor name “HITACHI” is stored.

In the column of the apparatus name11243, names of the external storage apparatuses400are stored. In the examples shown inFIGS. 14 and 15, “RAID” is stored for the external storage apparatus400providing the LDEV by using a RAID group formed of the HDDs421, and “DF” is stored for the external storage apparatus400that is the LDK.

In the column of the LDEV identification information11244, codes for distinguishing the LDEVs provided by the external storage apparatuses400from each other are stored. The codes can be stored as “0000” and “0010” as shown inFIG. 14and may be appropriately set.

In the column of the LDEV capacity11245, a capacity that can be provided by each LDEV is stored, for example, by the MByte.

In the column of the VDEV number11246, codes for distinguishing the VDEVs in the storage apparatus100from each other are stored, each VDEV being associated with the LDEV provided by the external storage apparatuses400. Although 4-digit numbers are used in the examples shown inFIGS. 14 and 15, arbitrarily set codes may be used.

In the column of the management information11247, information indicating that the external storage apparatus400is registered as the LDK is stored. In the examples shown inFIGS. 14 and 15, “lock disk 0x00” is stored.

In the column of the path information11248, identification information on a data I/O path set between each LDEV provided by the external storage apparatus400and each of the storage apparatuses1and2is stored.

Lock Disk Management Table1125

FIGS. 16 and 17show examples of the lock disk management table1125. These lock disk management tables1125are stored in the SMs112in the storage apparatuses1and2, respectively, and set by the manager operating the management apparatus200before operation of the storage system1is started. The lock disk management table1125is used by the remote copy controller1122in each of the storage apparatuses1and2to determine whether or not the apparatus has the ownership which is the authority to receive data I/O of the host apparatus300.

In the lock disk management table1125, the following items are stored: a lock disk ID11251, table valid/invalid11252, an own DKC serial number11253, a paired DKC serial number11254and own DKC lock information11255.

In the column of the lock disk ID11251, lock disk IDs which are codes for distinguishing the LDKs from each other are stored. The lock disk ID11251corresponds to the information on the LDK stored in the column of the management information11247in the external storage apparatus management table1124.

In the column of the table valid/invalid11252, information indicating whether the lock disk management table1125is valid or invalid is stored. This information is used when only the setting is temporarily made invalid while leaving the registration as the LDK, for example.

In the column of the own DKC serial number11253, a serial number of the DKC110having the SM112storing the lock disk management table1125is stored. Although a 5-digit number “64036” is stored in the example ofFIG. 16, an appropriately set code may be used. In the column of the paired DKC serial number11254, a serial number of the paired DKC110coupled, through the inter-DKC path, to the DKC110having the SM112storing the lock disk management table1125is stored. A pair of the own DKC serial number11253and the paired DKC serial number11254means a pair of the DKCs110in the storage apparatuses1and2having the VDEVs therein forming the remote copy pair.

In the column of the own DKC lock information11255, information for determining whether or not the DKC110has the ownership of its own is stored. In the cases ofFIGS. 16 and 17in this embodiment, whether or not the DKC110has the ownership of its own is stored as bit map information. For example, in the case of “no ownership”, 0 is stored in every bit. On the other hand, when any one of the DKCs110has the ownership, bit map information having a predetermined bit turned ON is stored. Information may be stored in any other format as the own DKC lock information11255.

Copy Pair Management Table1126

FIG. 18shows an example of the copy pair management table1126. The copy pair management table1126is stored in each of the SMs112in the storage apparatuses1and2, and set by the manager operating the management apparatus200before operation of the storage system1is started. When the VDEV in the storage apparatus1and the VDEV in the storage apparatus2form a remote copy pair, the copy pair management table1126is used to manage a state of the copy pair.

In the copy pair management table1126, items including a serial number11261and a lock disk ID11265are stored. Moreover, for each serial number11261in the copy pair management table1126, items including a P/S type11262, VDEV identification information11263and a pair status11264are also stored.

In the column of the serial number11261, a serial number of the DKC110in the storage apparatus100having the VDEVs forming a copy pair is stored. The serial number11261corresponds to the own DKC serial number11253or the paired DKC serial number11254in the lock disk management table1125. In the column of the lock disk ID11265of LDKs managing P/S, lock disk IDs which are codes for distinguishing the LDKs from each other are stored. The lock disk ID11265corresponds to the information on the LDK stored in the column of the management information11247in the external storage apparatus management table1124.

In the column of the P/S type11262, a P/S type is stored for each serial number11261. The P/S type11262indicates whether the VDEV managed by the DKC110having the corresponding serial number11261is a P-VOL or a S-VOL. In the example ofFIG. 18, “P” is stored when the VDEV managed by the DKC110having the corresponding serial number11261is the P-VOL, and “S” is stored when the VDEV is the S-VOL. In the column of the P/S type11262, switching between “P” and “S” indicates that data I/O paths from the host apparatus300to the storage apparatuses1and2are changed.

In the column of the VDEV identification information11263, codes for distinguishing the VDEVs managed by the DKC110having the corresponding serial number11261from each other are stored. A combination of the VDEV identification information11263specifies the P-VOL and the S-VOL which form the copy pair.

In the column of the pair status11264, a state of each copy pair is stored according to the relationship between the pair status and the ownership described with reference toFIG. 11. In the example ofFIG. 18, in the normal pair state, that is, the state where data I/O from the host apparatus300to the P-VOL and remote copy from the P-VOL to the S-VOL are normally executed, a “PAIR state” is stored. When the data I/O from the host apparatus300to the P-VOL is normal but there is trouble with the remote copy from the P-VOL to the S-VOL, a “SUSPEND state” which stops the remote copy process is stored.

When trouble occurs in the data I/O from the host apparatus300to the P-VOL, and the data I/O path is switched to the S-VOL side by the host apparatus300, the remote copy controller1122on the S-VOL side which has received the data I/O sets the pair status on the S-VOL side to be a “SSWS state”, thereby setting the own S-VOL to be able to receive data I/O of the host apparatus300.

Furthermore, when the P-VOL and the S-VOL are switched by swap resync process to be described later, “P” and “S” in the column of the P/S type11262are switched and the “PAIR state” is stored in the column of the pair status11264as shown in the lowest row inFIG. 18.

In the column of the lock disk ID11265, a lock disk ID that is an identification code of the LDK used to manage each copy pair is stored. This lock disk ID11265corresponds to the lock disk ID11251stored in the lock disk management table1125.

Explanation of Process Flow in This Embodiment

Next, with reference to flowcharts, description will be given of process executed by the configuration of the storage system1according to this embodiment described above.

Lock Disk Registration Process

FIG. 19shows an example of a lock disk registration process flow. The lock disk registration process is set by the manager operating the lock disk setting part211in the management apparatus200before operation of the storage system1is started.

First, the remote copy controller1122in the storage apparatus1receives a lock disk ID, a storage apparatus1serial number and a storage apparatus2serial number from the lock disk setting part211in the management apparatus200(S1801). Next, a vendor name, an apparatus name, a LDEV ID and a LDEV capacity are acquired as information on a LDEV from the external storage apparatus management table1124in the SM112(S1802).

The remote copy controller1122determines whether or not the LDEV to be registered is normal based on the LDEV information (S1803) and reads the LDEV information (S1805) when it is determined that the LDEV is normal (S1803, Yes). On the other hand, when the LDEV is determined as not normal (S1803, No), the remote copy controller1122terminates the process after notifying to display error (S1804).

Next, the remote copy controller1122determines whether or not the LDEV specified by the read LDEV information is used as a LDK (S1806). When it is determined that the LDEV is already used as the LDK, in other words, the LDEV is already registered as the LDK by the remote copy controller1122in the storage apparatus2(S1806, Yes), a lock disk ID, a storage apparatus1serial number and a storage apparatus2serial number, which are LDEV information on the LDEV, are compared with those described above (S1808). When it is determined that the information match (S1808, Yes), bit map information indicating that “the storage apparatus1is in use” is stored in LDK ID information in the external storage apparatus management table1124(S1810).

When it is determined that the information do not match (S1808, No), this means that the storage apparatus1having the LDEV to be used as the LDK does not match the information. Thus, the process is terminated after notifying an error (S1809).

On the other hand, when it is determined that the LDEV is not used as the LDK (S1806, No), an LDK ID, the storage apparatus1serial number, the storage apparatus2serial number, an LDK information initial value (for example, bit map information having all bits set to 0) and the bit map information indicating that “the storage apparatus1is in use” are stored in the external storage apparatus management table1124(S1807). Next, it is determined whether or not the write into the external storage apparatus management table1124has been properly executed in S1807(S1811). When it is determined that the write has been properly executed (S1811, Yes), the remote copy controller1122writes a LDK ID11251, an own DKC (the DKC110in the storage apparatus1) serial number11253and a paired DKC (the DKC110in the storage apparatus2) serial number11254into the lock disk management table1125in the SM112.

When it is determined that the write has not been properly executed in S1811(S1811, No), the process is terminated after notifying an error (S1804).

Note that the LDK registration process flow described above with reference toFIG. 19shows the case where the registration process is performed on the storage apparatus1. By replacing the storage apparatus1with the storage apparatus2inFIG. 19, the process flow shown inFIG. 19is switched to a LDK registration process flow on the storage apparatus2.

The above configuration allows the storage apparatuses1and2to determine whether or not each of the apparatuses has the authority to receive data I/O of the host apparatus300, and prevents unauthorized process when the apparatus does not have the ownership which is the authority to receive the data I/O based on the determination result.

Remote Copy Pair Creation Process

FIG. 20shows a pair creation process flow for creating a remote copy pair by combining VDEVs included in the storage apparatuses1and2.

First, the remote copy setting part212in the management apparatus200inputs, to the storage apparatus1, a pair creation instruction including a VDEV ID on the P-VOL side (the storage apparatus1side), a VDEV ID on the S-VOL side (the storage apparatus2side), a serial number of the storage apparatus2that is the S-VOL side and a LDK ID (S1901).

The storage apparatus1stores the information inputted from the management apparatus200in S1901in the copy pair management table1126set in the SM112(S1902), and transmits the same information to the storage apparatus2(S1903). The storage apparatus2stores the information received from the storage apparatus1in the copy pair management table1126set in its own SM112(S1904), and determines whether or not the VDEV matches its own VDEV based on the received information on the VDEV (S1905). This VDEV match determination process will be described later in connection withFIG. 21.

When it is determined in S1905that the VDEV is identical to its own VDEV, the storage apparatus2transmits information on the determination result to the storage apparatus1. Upon receipt of the information, the storage apparatus1uses the bit map information having all bits set to 0 to store information “NO OWNERSHIP” in the own DKC lock information in the LDK management table1125set in its own SM112(S1906). Accordingly, the VDEVs in the storage apparatuses1and2form the remote copy pair. Thereafter, the storage apparatus1terminates the process after copying all the data stored in its own CM113to the CM113in the storage apparatus2through the inter-DKC path (S1907).

The above configuration enables setting for executing remote copy process for a pair of the VDEVs associated with the same external storage apparatus400.

VDEV Match Determination Process

FIG. 21shows an example of a VDEV match determination process flow. The storage apparatus2refers to the external storage apparatus management table1124stored in its own SM112to determine whether or not vendor names11242and apparatus names11243related to VDEVs forming a remote copy pair match that of its own based on information on the VDEVs received from the storage apparatus1(S2001). When it is determined that the names match each other (S2001, Yes), the storage apparatus2further determines whether or not VDEV IDs11244and VDEV capacities11245match each other (S2003).

When it is determined that the IDs and the capacities match each other, the storage apparatus2determines that an LDEV specified by the storage apparatus1matches an LDEV associated with its own VDEV, and then terminates the process (S2004). When the it is determined that there is no match in S2001or S2003(S2001or S2003, No), the storage apparatus2determines that the LDEV specified by the storage apparatus1is different from the LDEV associated with its own VDEV, and then terminates the process (S2002). In this case, the process may be immediately terminated after notifying an error, for example, without returning to the pair creation process shown inFIG. 20.

The above configuration enables setting for executing remote copy process for a pair of the VDEVs associated with the same external storage apparatus400.

Process of Writing Data into Storage Apparatus1

FIG. 22shows an example of a flow of process of writing data into the storage apparatus1from the host apparatus300. This process flow is the case in which data is written from the host apparatus300into the storage apparatus1on the P-VOL side. This process flow is executed by the remote copy controller1122in the DKC110of the storage apparatus1.

First, it is determined whether or not data write destinations of data from the host apparatus300are VDEVs forming a copy pair (S2101). When it is determined that the data write destinations are VDEVs forming no copy pair (S2101, No), the remote copy controller1122writes data on received data I/O into its own CM113, transmits information to that effect to the host apparatus300and then terminates the process (S2102and S2103).

When it is determined in S2101that the write destination VDEVs form the copy pair (S2101, Yes), it is determined whether or not the write destination VDEVs are P-VOLs (S2104). When it is determined that the write destination VDEVs are not the P-VOLs (S2104, No), the process moves to data write process for S-VOL to be described later.

When it is determined that the write destination VDEVs are the P-VOLs (S2104, Yes), the remote copy controller1122refers to the pair status11264in the own copy pair management table1126to determine whether or not a “PAIR state” indicating a normal pair status is stored (S2105). When it is determined that the pair status is not normal (S2105, No), the remote copy controller1122moves to S2102to write data into the CM113.

When it is determined that the pair status is normal (S2105, Yes), the remote copy controller1122writes the data received from the host apparatus300into the own CM113, and transfers the data to the storage apparatus2through the inter-DKC path (S2106and S2107). In the storage apparatus2, the received data is written into its own CM113, and information about a result thereof is transmitted to the storage apparatus1(S2108).

In the storage apparatus1, it is determined whether or not the data is properly transferred based on the result information received from the storage apparatus2(S2109). When it is determined that the data is properly transferred (S2109, Yes), information to that effect is transmitted to the host apparatus300, and then the process is terminated (S2103). When it is determined that the data is not properly transferred (S2109, No), the remote copy controller1122in the storage apparatus1writes, into the LDK, information indicating that the apparatus has the ownership (S2110), and also stores bit map information indicating the ownership in the own DKC lock information11255in the lock disk management table1125stored in the own SM112(S2111). Next, the remote copy controller1122performs suspend process of stopping the remote copy process with the S-VOL side, and stores information to that effect in the pair status11264in the own copy pair management table1126(S2112). Thereafter, the remote copy controller1122transmits information indicating that the data write is finished to the host apparatus300, and then terminates the process (S2103).

The above configuration enables the storage apparatus1on the P-VOL side to solely process the data I/O of the host apparatus300by stopping the remote copy process when there is trouble with the remote copy process with the storage apparatus2on the S-VOL side.

Process of Reading Data from Storage Apparatus1

FIG. 23shows an example of a process flow of reading data from the storage apparatus1by the host apparatus300.

First, the remote copy controller1122in the storage apparatus1determines whether or not data associated with a data read request from the host apparatus300is stored in its own CM113(S2201). When it is determined that the data is stored (S2201, Yes), the data is read from the CM113and transmitted to the host apparatus300(S2203). When it is determined that the data is not stored in the CM113(S2201, No), the data is read into the CM113from a corresponding LDEV (HDD412) in the external storage apparatus400(S2202). Thereafter, the data is transmitted from the CM113to the host apparatus300, and then the process is terminated.

The above configuration enables the host apparatus300to read the data from the P-VOL.

Process of Writing Data into Storage Apparatus2

FIG. 24shows an example of a process flow of writing data from the host apparatus300into the storage apparatus2. This process flow is the case in which data is written from the host apparatus300into the storage apparatus2on the S-VOL side. Execution of this process flow means that the data write request to the storage apparatus1on the P-VOL side has not been properly processed. This process flow is executed by the remote copy controller1122in the DKC110of the storage apparatus2.

First, it is determined whether or not data write destinations from the host apparatus300are VDEVs forming a copy pair (S2301). When it is determined that the data write destinations are VDEVs forming no copy pair (S2301, No), the remote copy controller1122writes data on received data I/O into its own CM113, and transmits information to that effect to the host apparatus300(S2310and S2311). Next, the remote copy controller1122executes swap resync process of replacing the P-VOL and the S-VOL with each other by switching the P/S type11262in the copy pair management table1126, and then terminates the process. A detailed flow of the swap resync process will be described later with reference to related drawings.

In S2301, when it is determined that the write destination VDEV forms the copy pair (S2301, Yes), it is determined whether or not the write destination VDEV is S-VOL (S2302). When it is determined that the write destination VDEV is not the S-VOL (S2302, No), the process moves to data write process for the P-VOL described above by the storage apparatus1.

When it is determined that the write destination VDEV is the S-VOL (S2302, Yes), the remote copy controller1122refers to the own DKC lock information11255in the own LDK management table1125to determine which one of the P-VOL and the S-VOL has the ownership (S2303). When it is determined that the S-VOL has the ownership (S2303, S-VOL), the remote copy controller1122writes data associated with the data write request into the CM113(S2310), and transmits information indicating completion of the write to the host apparatus300(S2311). Next, the process moves to the swap resync process described above.

When it is determined that the P-VOL has the ownership (S2303, P-VOL), the remote copy controller1122transmits information indicating that the data write request cannot be accepted to the host apparatus300(S2307), and then moves to the swap resync process.

When it is determined in S2303that the ownership is not stored, the remote copy controller1122reads data in the LDK (S2304) and determines whether or not the P-VOL has the ownership (S2305). When it is determined that the P-VOL has the ownership (S2305, Yes), the remote copy controller1122transmits information indicating that the data write request cannot be accepted to the host apparatus300(S2307) and then moves to the swap resync process.

When it is determined that the P-VOL does not have the ownership (S2305, No), the remote copy controller1122writes ownership information into the LDK in order to acquire the ownership (S2306). Next, the remote copy controller1122stores bit map information indicating that the apparatus has the ownership information in the own DKC lock information11255in the LDK management table1125stored in the own SM112(S2308). Thereafter, the remote copy controller1122further records information indicating that the pair status is the “SSWS state” in the pair state11264in the copy pair management table1126(S2309), writes the data related to the data write request into the own CM113(S2310) and transmits information indicating completion of the write to the host apparatus300(S2311). Next, the process moves to the swap resync process described above.

The above configuration enables the storage apparatus2on the S-VOL side to process the data I/O of the host apparatus300only when it is determined that the apparatus has the ownership. Thus, data inconsistency with the CM113on the P-VOL side is prevented.

(Process of Reading Data from Storage Apparatus2)

FIG. 25shows an example of a process flow of reading data from the storage apparatus2by the host apparatus300.

First, it is determined whether or not data read destinations of the host apparatus300are VDEVs forming a copy pair (S2401). When it is determined that the data read destinations are VDEVs forming no copy pair (S2401, No), the remote copy controller1122in the storage apparatus2determines whether or not data associated with a data read request from the host apparatus300is stored in its own CM113(S2407). When it is determined that the data is stored (S2407, Yes), the data is read from the CM113, and transmitted to the host apparatus300(S2409). When it is determined that the data is not stored in the CM113(S2407, No), the data is read into the CM113from a corresponding LDEV (HDD412) in the external storage apparatus400(S2408). Thereafter, the data is transmitted to the host apparatus300from the CM113, and then the process is terminated (S2409).

When it is determined in S2401that the read destination VDEVs form the copy pair (S2401, Yes), it is determined whether or not the read destination VDEV is S-VOL (S2402). When it is determined that the read destination VDEV is not the S-VOL (S2402, No), the process moves to data read process from the P-VOL performed by the storage apparatus1, as described above.

When it is determined that the read destination VDEV is the S-VOL (S2402, Yes), the remote copy controller1122refers to the pair status11264in the own copy pair management table1126to determine whether or not the pair status is normal (S2403). When it is determined that the pair status is not normal (S2403, No), the remote copy controller1122transmits information indicating that the data read request cannot be accepted to the host apparatus300since there is a possibility that the data stored in the own CM113is not properly updated (S2406).

When it is determined in S2403that the pair state is normal (S2403, Yes), the remote copy controller1122reads data in the LDK (S2404), and determines whether or not the P-VOL has the ownership (S2405). When it is determined that the P-VOL has the ownership (S2405, Yes), the remote copy controller1122transmits information indicating that the data read request cannot be accepted to the host apparatus300, and then terminates the process (S2406).

When it is determined that the P-VOL does not have the ownership (S2405, No), the remote copy controller1122executes the process starting from S2407, and then terminates the process.

The above configuration enables the storage apparatus2on the S-VOL side to process the data I/O of the host apparatus300only when the apparatus has the ownership. Thus, the host apparatus300is prevented from accidentally reading incorrect data.

A host apparatus with a certain kind of an OS installed transmits a data read request to a storage apparatus when rebooting the host apparatus. According to the above-described configuration, even if the host apparatus300transmits a data read request to the storage apparatus2on the S-VOL side when rebooting, the storage apparatus2on the S-VOL side does not write ownership information into the LDK, but only determines that the storage apparatus1on the P-VOL side does not have ownership (S2405). Therefore, the storage apparatus2on the S-VOL side does not acquire the ownership improperly when the storage apparatus2on the S-VOL side receives the data read request when rebooting the host apparatus300.

Suspend Process By Storage Apparatus1

FIG. 26shows an example of a remote copy pair suspend process flow by the storage apparatus1. This suspend process is executed in S2112in the data write request process flow (FIG. 21) for the storage apparatus1.

First, the remote copy controller1122in the storage apparatus1transmits a S-VOL suspend request to the remote copy controller1122in the storage apparatus2through the inter-DKC path (S2501). Upon receipt of the request, the remote copy controller1122in the storage apparatus2stores “SUSPEND” in the pair status11264in the copy pair management table1126stored in the own SM112, and transmits information to that effect to the storage apparatus1. Upon receipt of the information, the remote copy controller1122in the storage apparatus1stores “SUSPEND” in the pair status11264in the copy pair management table1126stored in the own SM112(S2503), and transmits information for setting ownership information in the LDK to the external storage apparatus400registered as the LDK (S2504).

Upon receipt of the ownership information setting request, the external storage apparatus400writes the ownership information on the storage apparatus1on the P-VOL side into the LDK (S2505), and transmits, to the storage apparatus1, information indicating that the ownership information setting is completed. Upon receipt of the information, the remote copy controller1122in the storage apparatus1stores bit map information in the own DKC lock information11255in the lock disk management table1125stored in the own SM112, the information indicating that the ownership is acquired (S2506).

The above configuration enables the storage apparatus1on the P-VOL side to process the data I/O of the host apparatus300while stopping the remote copy process between the storage apparatus1on the P-VOL side and the storage apparatus2on the S-VOL side when data cannot be transferred from the storage apparatus1to the storage apparatus2.

Destage Process by Storage Apparatus1on P-VOL Side

FIG. 27shows an example of a destage process flow from the storage apparatus1on the P-VOL side.

First, in order to destage data stored in its own CM113, the remote copy controller1122in the storage apparatus1makes a write request by reading and transferring the data to the external storage apparatus400providing a LDEV associated with the own VDEV (S2601). Upon receipt of the write request, the external storage apparatus400writes the data into the HDD421and transmits the result to the storage apparatus1(S2602).

The storage apparatus1determines whether or not the write in the external storage apparatus400has been successful (S2603). When it is determined that the write has been successful (S2603, Yes), the storage apparatus1deletes the data stored in its own CM113, and transmits, to the storage apparatus2, a request to delete the data in the CM113of storage the apparatus2(S2605). Upon receipt of the request to delete the data in the CM113, the storage apparatus2deletes the data stored in its own CM113and then terminates the process (S2606).

When it is determined in S2603that the data write into the external storage apparatus400has not been successful (S2603, No), the storage apparatus1retries a predetermined number of write requests to the external storage apparatus400, and then terminates the process after closing the own VDEV to which the data in the CM113cannot be destaged (S2607).

The above configuration enables the storage apparatus1on the P-VOL side to release the storage area of the CM113in the storage apparatus2on the S-VOL side by deleting the data therein in synchronization with the destage process for the data stored in the own CM113.

Destage Process by Storage Apparatus2on S-VOL Side

FIG. 28shows an example of a destage process flow from the storage apparatus2on the S-VOL side.

First, in order to destage the data stored in the CM113in the storage apparatus2, the remote copy controller1122in the storage apparatus1transmits, to the remote copy controller1122in the storage apparatus2, a destage request to transfer the data stored in the CM113in the storage apparatus2to the external storage apparatus400providing a LDEV associated with a VDEV in the storage apparatus2through the inter-DKC path (S2701).

Upon receipt of the destage request, the remote copy controller1122in the storage apparatus2makes a write request by reading the data in the own CM113and transferring the data to the external storage apparatus400(S2702). Upon receipt of the write request, the external storage apparatus400writes the data into the HDD421, and transmits the result to the storage apparatus2(S2703).

The storage apparatus2determines whether or not the write in the external storage apparatus400has been successful (S2704). When it is determined that the write has been successful (S2704, Yes), the storage apparatus2deletes the data stored in its own CM113, and transmits, to the storage apparatus1, information indicating that the destage is properly finished (S2705). Upon receipt of the information indicating that the destage is properly finished in the storage apparatus2, the storage apparatus1deletes the data stored in the own CM113and then terminates the process (S2706).

When it is determined in S2704that the data write into the external storage apparatus400has not been successful (S2704, No), the storage apparatus2retries a predetermined number of write requests to the external storage apparatus400, and then transmits information indicating that the data in the CM113cannot be destaged to the storage apparatus1. Upon receipt of the information, the storage apparatus1terminates the process after closing its own VDEV to which the data in the CM113cannot be destaged (S2707).

The above configuration enables the storage apparatus1on the P-VOL side to release the storage area of its own CM113by deleting the data therein in synchronization with the destage process for the data stored in the CM113in the storage apparatus2on the S-VOL side.

Swap Resync Process

FIG. 29shows an example of a swap resync process flow according to this embodiment. This swap resync process is for shifting from a SSWS state where the S-VOL has the ownership and processes the data I/O of the host apparatus300to a pair state where a copy pair is created between the own VDEV and the VDEV in the storage apparatus1on the P-VOL side again and the apparatus currently set as the S-VOL is set to be the P-VOL to process the data I/O of the host apparatus300.

First, the remote copy controller1122in the storage apparatus2currently on the S-VOL side makes an inquiry about whether or not a data I/O path between the host apparatus300and the storage apparatus1on the P-VOL side is normal to the path management controller312in the host apparatus300through the communication network N2(S2801). When it is determined that the data I/O path is not normal (S2801, No), the process is immediately terminated. In this event, information indicating that “swap resync process” cannot be executed may be outputted through the output unit15in the host apparatus300.

When it is determined that the data I/O path between the host apparatus300and the storage apparatus1on the P-VOL side is normal (S2801, Yes), the remote copy controller1122in the storage apparatus2switches the P/S type11262stored in the copy pair management table1126stored in the own SM112with that in the storage apparatus1(S2802). Thereafter, the remote copy controller1122requests the remote copy controller1122in the storage apparatus1to perform the same process of switching the P/S type11262through the inter-DKC path.

Upon receipt of the request from the storage apparatus2, the remote copy controller1122in the storage apparatus1switches the P/S type11262stored in the copy pair management table1126stored in the own SM112with that in the storage apparatus2(S2804) and deletes the data stored in the own CM113(S2805). Next, the remote copy controller1122transmits, to the remote copy controller1122in the storage apparatus2, information on the result of the process of switching the P/S type11262.

Upon receipt of the switching result information from the storage apparatus1, the remote copy controller1122in the storage apparatus2determines whether or not the switching has been properly executed and whether or not the own VDEV is normal. When it is determined that the switching has been properly executed and the VDEV is normal (S2806, Yes), the remote copy controller1122stores information “no ownership” in the LDK (S2807). When it is determined that the switching has not been properly executed or the VDEV is not normal (S2806, No), the remote copy controller1122performs remote copy process by executing the pair suspend process shown inFIG. 25, and solely performs its operations as the S-VOL.

The remote copy controller1122in the storage apparatus2copies all the data stored in its own CM113to the CM113in the storage apparatus1through the inter-DKC path (S2808).

At this point, a copy pair is newly formed with the VDEV in the storage apparatus2as the P-VOL and the VDEV in the storage apparatus1as the S-VOL. Thus, the remote copy controller1122in the storage apparatus2stores the “PAIR state” indicating that there is a normal copy pair in the pair status11264in the own copy pair management table1126, and then terminates the process (S2809).

According to the above configuration, in the case where the data I/O process in the storage apparatus1on the P-VOL side is stopped once and then data I/O is transmitted from the host apparatus300to the storage apparatus2on the S-VOL side, the remote copy process can be restarted by switching the P-VOL and the S-VOL if the problem in the storage apparatus1on the P-VOL side has been solved.

Cache Data Asynchronous Full Copy Process

FIG. 30shows an example of a cache data asynchronous full copy process flow. This cache data asynchronous full copy process is one of initialization process in the case of creating a copy pair between VDEVs in two storage apparatuses, respectively, and is executed in S1907in the copy pair creation process shown inFIG. 19, for example.

First, in order to copy the data stored in the CM113in the storage apparatus100on the P-VOL side to the CM113in the storage apparatus100on the S-VOL side, the remote copy controller1122in the storage apparatus100on the P-VOL side transmits the stored data to the storage apparatus100on the S-VOL side through the inter-DKC path (S2901). Upon receipt of the data from the storage apparatus100on the P-VOL side, the remote copy controller1122in the storage apparatus100on the S-VOL side writes the received data into the own CM113(S2902) and transmits the write result to the storage apparatus100on the P-VOL side.

Upon receipt of the write result in the storage apparatus100on the S-VOL side, the remote copy controller1122in the storage apparatus100on the P-VOL side determines whether or not the data in the own CM113has been properly copied to the storage apparatus100on the S-VOL side. When it is determined that the data has been properly copied (S2903, Yes), the data remaining in the CM113is continuously transferred to the storage apparatus100on the S-VOL side (S2904, No). When it is determined that all the data stored in the own CM113has been copied (S2904, Yes), the remote copy controller1122stores the “PAIR state” indicating that there is a normal copy pair in the pair status11264in the own copy pair management table1126and then terminates the process (S2905).

When it is determined in S2903that the data copy has not been properly executed (S2903, No), the remote copy controller1122on the P-VOL side stops remote copy process by executing the pair suspend process shown inFIG. 26and solely performs its operations as the P-VOL (S2906).

According to the above configuration, since the data stored in the CMs113in the storage apparatus1on the P-VOL side and the data stored in the storage apparatus2on the S-VOL side coincide with each other before start of the remote copy process, the host apparatus300can effectively utilize the data in the CM113even after the data I/O process request destination in the host apparatus300is changed from the storage apparatus1on the P-VOL side to the storage apparatus2on the S-VOL side.

As described in detail above, the storage system1according to this embodiment provides a storage system and a method for controlling a storage system, which enable more efficient and effective utilization of storage areas provided by a storage apparatus.