1. Field of the Invention
The present invention relates to updating data shared among systems.
2. Description of the Related Art
In certain computing environments, multiple host systems may communicate with a control unit, such as an IBM Enterprise Storage Server (ESS)®, for data in a storage device managed by the ESS receiving the request, providing access to storage devices, such as interconnected hard disk drives through one or more logical paths. (IBM and ESS are registered trademarks of IBM). The interconnected drives may be configured as a Direct Access Storage Device (DASD), Redundant Array of Independent Disks (RAID), Just a Bunch of Disks (JBOD), etc. The control unit may include duplicate and redundant processing complexes, also known as clusters, to allow for failover to a surviving cluster in case one fails. The clusters may access critical metadata having information on status, state and configuration of the server including the clusters, which is necessary for cluster operations.
Provided are a method, system and program for updating data shared among systems. A first and second systems maintain a first and second copies, respectively, of shared data stored in a storage device. The first system obtains a first lock to the shared data, wherein the first lock applies to the first system accessing the shared data. The first system sends to the second system a first message requesting a second lock to the shared data, wherein the second lock applies to the second system accessing the shared data;. The second system obtains the second lock to the shared data for the first system in response to the first message sends to the first system a second message indicating the second lock to the shared data was granted.
The storage system 4 includes shared data 14, comprising tracks accessible to both systems 8a, 8b. In one embodiment, the shared data 14 may comprise metadata, such as global metadata on the status, state or configuration of the control unit 6. The systems 8a, 8b may each maintain their own copy of the shared data 16a, 16b in their respective caches 12a, 12b for use within the system 8a, 8b. Each system 8a, 8b further maintains lock information 18a, 18b used to separately manage each system's 8a, 8b exclusive access to the shared data 14 through the granting and denial of locks to the shared data. The processors 8a, 8b execute I/O code 20a, 20b to manage I/O requests from the hosts 2 and metadata, and to manage locks to access the shared data 14. The processors 10a, 10b may communicate over a connection 22 enabling processor inter-communication to manage locks for the shared metadata 14.
The control unit 6 may comprise any type of server, such as an enterprise storage server, storage controller, etc., or other device used to manage I/O requests to attached storage system (s) 4, where the storage systems may comprise one or more storage devices known in the art, such as interconnected hard disk drives (e.g., configured as a DASD, RAID, JBOD, etc.), magnetic tape, electronic memory, etc. The hosts 2 may communicate with the control unit 6 over a network (not shown), such as a Local Area Network (LAN), Storage Area Network (SAN), Wide Area Network (WAN), wireless network, etc. Alternatively, the hosts 2 may communicate with the control unit 6 over a bus interface, such as a Peripheral Component Interconnect (PCI) bus or serial interface.
If (at block 108) the system 8a is not the owner or master of the requested shared data 14, then the first system 8a sends (at block 122) to the second system 8b a first message requesting a second lock to the shared data. The second lock applies to the second system 8b accessing the shared data 14. The first system 8a requests that the second system 8b obtain the second lock on behalf of the first system 8a. In response to this first message, the second system 8b waits (at block 123) for the second lock to the shard data 14 to become available and then obtains (at block 124), when available, the second lock to the shared data 14, which regulates the second system's 8b access to the copy 16b of the shared data, on behalf of the first system 8a and then sends (at block 126) to the first system 8a a second message indicating the second lock to the shared data was granted. In response to this second message indicating that the second system 8b granted the second lock, the first system 8a performs (at block 128) the operations at 110 and 112 to obtain the first lock to the shared data 14 and then proceeds to block 120 to write the update to the shared data 14.
With respect to
If (at block 130) the writing of the updated first copy 16a succeeded, then the first system 8a releases (at block 139) the first lock to enable further access to the updated shared data and sends (at block 140) a third message to the second system 8b indicating that the shared data 14 was updated. In response to this message, the second system 8b discards (at block 142) the second copy of the shared data 16b to avoid accessing the stale copy of the shared data 16b in the local cache 12b. If the second system 8b did not include a copy of the shared data 18b, then there would be no discard operation. As a result of discarding the copy 16b, the second system 8b must stage the updated shared data 14 into the cache 12b for subsequent accesses by the second system 8b to the shared data 14. The second system 8b further releases (at block 143) the second lock to enable further access to the updated shared data to the second system 8b. The second system 8b sends (at block 144) a fourth message to the first system 8a indicating that the second copy of the shared data 16b was discarded and that the second operation is complete.
The described embodiments may be implemented as a method, apparatus or article of manufacture using standard programming and/or engineering techniques to produce software, firmware, hardware, or any combination thereof. The term “article of manufacture” as used herein refers to code or logic implemented in hardware logic (e.g., an integrated circuit chip, Programmable Gate Array (PGA), Application Specific Integrated Circuit (ASIC), etc.) or a computer readable medium, such as magnetic storage medium (e.g., hard disk drives, floppy disks, tape, etc.), optical storage (CD-ROMs, optical disks, etc.), volatile and non-volatile memory devices (e.g., EEPROMs, ROMs, PROMs, RAMs, DRAMs, SRAMs, firmware, programmable logic, etc.). Code in the computer readable medium is accessed and executed by a processor. The code in which preferred embodiments are implemented may further be accessible through a transmission media or from a file server over a network. In such cases, the article of manufacture in which the code is implemented may comprise a transmission media, such as a network transmission line, wireless transmission media, signals propagating through space, radio waves, infrared signals, etc. Thus, the “article of manufacture” may comprise the medium in which the code is embodied. Additionally, the “article of manufacture” may comprise a combination of hardware and software components in which the code is embodied, processed, and executed. Of course, those skilled in the art will recognize that many modifications may be made to this configuration without departing from the scope of the present invention, and that the article of manufacture may comprise any information bearing medium known in the art.
Certain embodiments may be directed to a method for deploying computing instruction by a person or automated processing integrating computer-readable code into a computing system, wherein the code in combination with the computing system is enabled to perform the operations of the described embodiments.
In the described embodiments, two systems 8a, 8b are capable of accessing the shared data. In additional embodiments, there may be more than two systems accessing the shared data. In such embodiments, one system would be designated as the master (owner) and the others slaves with respect to the shared data, such that a slave system with respect to shared data must first obtain a lock from the master system before obtaining the lock the slave system holds to the shared data. In this way, each of the three or more systems maintain there own copy of the shared data and lock information, and must coordinate their access with other systems to avoid conflicts. For instance, a system updating the shared data would have to obtain the lock for the shared data from every other system and then notify every other system upon updating the data to cause the other systems to discard any local copy they may have of the stale shared data.
The illustrated operations of
The foregoing description of various embodiments of the invention has been presented for the purposes of illustration and description. It is not intended to be exhaustive or to limit the invention to the precise form disclosed. Many modifications and variations are possible in light of the above teaching. It is intended that the scope of the invention be limited not by this detailed description, but rather by the claims appended hereto. The above specification, examples and data provide a complete description of the manufacture and use of the composition of the invention. Since many embodiments of the invention can be made without departing from the spirit and scope of the invention, the invention resides in the claims hereinafter appended.