In the drawings, each identical or nearly identical component that is illustrated in various figures is represented by a like numeral. For purposes of clarity, not every component may be labeled in every drawing. In the drawings:
When mounting a replica, the mount environment is usually configured to duplicate the production environment. For example, an instance of a database application program in the mount environment is usually configured the same as a production application instance of the database program. This configuration increases the likelihood that the replica will operate in the mount environment the same way that the production database operates in the production environment.
The inventors have appreciated that conventional techniques for mounting a replica of a database in a mount environment that is identical to the production environment have some limitations. For example, it may be desirable to mount the replica in a mount environment configured differently than the production environment. In some embodiments, the replica will be mounted in an environment with less resources (e.g. memory, CPU cycles) allocated to it than are allocated to the production environment in which the replica was created. Because there is a cost associated with having resources available on a mount server, if a replica can be mounted with fewer resources, the cost the of computer system used to implement a mount environment can be decreased. Alternatively, reducing the resources allocated to mount a replica without reducing the total amount of resources available on the mount server allows the mount server to be used for more functions. For example, when fewer resources are allocated to each replica, a mount server may host multiple replicas simultaneously.
One embodiment of the invention relates to a method of creating a replica of a first instance of a database that is operating in a computing environment. A second instance of the database is then established from the replica in a second environment, but with the second instance having allocated to it resources that are not identical to those allocated to the first instance from which the replica was created.
Another embodiment relates to automating the mounting of a replica with a different configuration than the database in the production environment. The mount environment may be created in part from information in the replica, so some characteristics of the mount environment will be the same as in the production environment. However, other characteristics may be set based on information from other sources so that other characteristics of the mount environment differ from the characteristics of the production environment.
The computer system of
Storage system 110, for example, may be from the line of SYMMETRIX® or CLARIION® storage systems sold by EMC Corporation of Hopkinton, Mass. However, any other suitable storage system may be used because the aspects of the invention described herein are not limited to use with any particular type of storage system.
Storage system 110 includes physical storage media, such as multiple physical disk drives (not expressly shown). Each disk drive may be capable of storing a large amount of data (e.g. Gigabytes of data). The type of storage media, the number of physical disk drives and the amount of data stored in each physical disk drives is not a limitation on the invention because any suitable storage system may be used, including storage systems that employ a simple disk drive or other type of storage medium.
Storage system 110 may make storage resources available to a host computer for assignment to entities therein, such as a file system, database manager or logical volume manager. If the storage system is a so-called “dumb” storage device, the storage resources made available to the computer will correspond in a one-to-one relationship to physical storage devices within the storage system. However, when the storage system is an intelligent storage system, it will present logical volumes of storage to the host computer that need not necessarily correspond in a one-to-one relationship to any physical devices with the storage system, because the intelligent storage system may map each logical volume of storage presented to the host across one or more physical storage devices.
In the example of
One or more levels of mapping may be used to associate components of a database to information stored within a specific logical volume within storage system 110. For example, database components, such as data tables, may be associated with files and files may in turn be associated with specific logical volumes.
The foregoing is only one example of possible mappings between components used by an application and logical volumes as maintained in a storage system. Computer systems exist that have more or fewer levels of mapping. The aspects of the present invention can be used on systems having any number and configuration of mapping layers because the invention is not limited in this respect.
Production host 120 runs an application that accesses the data in storage system 110. For example, production host 120 may run a database application (e.g. those available from ORACLE® or SAP®) that maintains data on transactions undertaken within an enterprise. However, the invention is not limited to use in conjunction with programs conventionally known as “database” applications and may be used in conjunction with databases stored or maintained by any program, regardless of how it is classified. The invention is not limited by the specific application that manipulates data within storage system 110 and may be employed with any suitable application.
Production host 120 may be a conventional server, whether now known or hereafter developed. For example, a server, such as a SOLARIS®, HP®, Linux or AIX® server may be used. However, any suitable hardware may be used to implement production host 120. In many embodiments, production host 120 will interface with many users throughout an enterprise and process numerous transactions. Accordingly, production host 130 may be a server having a large amount of resources (e.g. memory and processing capability). However, the specific hardware used to implement production host 120 is not a limitation on the invention because the aspects of the invention described herein can be used with any type of hardware.
An instance of one or more applications performing various functions executes on production host 120 and is referred to herein as a “production instance.” The production instance may be a database application or other application that stores and retrieves production data within storage system 110.
Storage system 110 may use a portion of its logical volumes 114A, 114B, 114C and 114D to hold a primary version of the production data. Storage system 110 may use another portion of its logical volumes 114A, 114B, 114C and 114D to store a copy of the production data. Many storage systems, such as servers in the SYMMETRIX and CLARIION lines of storage systems made by EMC Corporation of Hopkinton, Mass., allow a user to configure the logical volumes in the storage system to designate some logical volumes for storing production data and some for storing a copy of that production data. The volumes storing the production data are sometimes called the “STD volumes,” and those storing the copy are sometimes called “Business Continuity Volumes” or “BCV.”
The storage system may be controlled to make a copy of the production data onto the BCV. Such a copy is sometimes called an “image” of the production data. The image may be made in response to a specific command or may be made in whole or in part dynamically as the production data is changed.
Creating a replica may involve a user, such as a system administrator, issuing commands to storage system 110 and the application instance of the application (e.g. a database application) to cause them to store information that describes the state of the computer system. The computer system of
The replication software may present an interface to a system administrator or other user. The interface may be presented on a client computer, such as client 140 or any other computer in the system. Through that interface, the user may specify parameters of the replica to be created, including the data for which a replica is to be created. The replication software can then interact with the application to identify information include in the replica.
When portions of the replication software are located on a separate computer, the replication software may include an agent that is installed on production host 120 and interacts with the application instance. The replication software may issue appropriate commands to the application instance and to the storage system to create the replica in a manner described below.
To create a replica, the storage system ensures that the image represents a copy of the production data at a specific instance in time and does not change it after that. As the image is being created, the application instance may continue to interact with users changing the production data. As discussed below, these changes may be captured in a log file, which may constitute a portion of the replica because this information can be used to recreate the state of the application instance as it existed at the end of the process of creating a replica.
Information about the replica may be stored in a solid database 132 associated with replication server 130 or in any other suitable location. While the copy of the production data may be maintained on the volumes within storage system 110 designated as BCV, information, such as the identity of the BCV, may be stored within solid database 132. In addition, information that can be used to duplicate the application instance also can be stored as part of the replica.
To illustrate the types of information that may be included in a replica in some embodiments,
In the illustrated embodiment, instance 212 may be an instance of a database program executing on a suitable platform, such as production host 120 (
Any suitable method may be used to specify the amount of resources allocated to an instance. In the embodiment pictured in
The amount of resources that are allocated to an instance may be specified in any suitable way. For example, an application may have a set of parameters associated with it. Values for these parameters may specify the amount of resources allocated to an instance. In the embodiment pictured in
In operation, multiple users may interact with production application instance 212. To depict the multiple users in a production environment,
Regardless of the method by which each client 230A, 230B, 230C, 230D, 230E or 230F communicates with instance 212, exchanges between the clients 230A, 230B, 230C, 230D, 230E or 230F may cause instance 212 to access data. As pictured, the data is stored in logical objects 216A and 216B. Logical objects 216A and 216B may be mapped to physical storage locations in a storage system, such as storage system 110 (
In production environment 210, an image of the data in each of the logical objects 216A and 216B may be created. The image may be created in response to commands from a network administrator or other user and may be maintained by the storage system as production data is written to the storage system. As one example, the image objects may be stored on one or more BCVs, as discussed above. Regardless of how the image is created, image object 218A contains a copy of the data in logical object 216A and image object 218B contains a copy of the data in logical object 216B.
In operation of a computer system containing production environment 212, it may be desirable to create a replica of the application. Such a replica may be created by storing information that enables recreation of the environment in which the application instance operates.
The invention may be used in conjunction with a replica in a format as is known in the art. However, the specific format in which the replica is stored is not a limitation n the invention, as the invention may be used with a replica in any suitable form. As one example,
In the embodiment illustrated, replica 310 includes a catalog 330. Catalog 330 is a data structure that has entries identifying the components of the replica. Such a data structure may be implemented in a file or in any other suitable way and in any suitable format.
Entries 336A and 336B identify logical objects containing data included in the image of the production data. In the embodiment illustrated, catalog 330 includes two objects, shown as image components 218A and 218B. Two logical objects are shown for simplicity, but any number of logical objects may be included in catalog 330.
Entry 334 identifies parameters of the production instance of the application that manipulated the production data. In the embodiment of
The replica may include other files containing parameters or other information required to establish an environment in which the data in the image may be accessed. Accordingly,
Additionally, catalog 330 may contain entry 332 identifying a log. During the process of creating an image of a database separate from the production data, the production application instance may execute transactions affecting the production data that are not reflected in the image. The application may keep a log of these transactions. In the embodiment illustrated, the log is implemented as log file 332 (which may be stored in solid database 132 or in any other suitable location), although it can be implemented in other ways.
Regardless of the specific construction of the replica, the replica may be used to establish a mount environment 420 as illustrated in
Once created, mount environment 420 may allow operations on image objects 418A and 418B for any desired purpose. As shown in
Mount environment 420 may be created on any suitable computer or computers. In the computer system of
Once mount environment 420 is created, a user may interact with mount application instance 412 in much the same way that a user would interact with production application instance 212 to perform operations on a database. However, because the operations are performed on a copy of the production data, the interactions typically involve primarily operations that read data from the database.
Any desired operations may be performed in mount environment 420. For example, mount application instance 412 may access image objects 418A and 418B to generate reports on an output device, such as a printer 450, and/or to make a backup copy of the database on a storage device with removable media, such as tape drive 460. These are examples of operations that may be desirable to perform in a computer system operating a database and can be performed on a copy of a database. By performing these operations in mount environment 420, they do not interfere with or slow operation of production application instance 212 (
As part of the initialization of mount application instance 412, resources may be allocated to that instance. As shown in the example of
The values in initialization file 220′ may be obtained in any suitable way. In this example, initialization file 220′ is a copy of initialization file 220 (
Conventionally, a copy of the initialization file used to create a production instance is used to configure the instance of the application when mounting the replica. Using a copy of the initialization file from the production instance allows creation of a duplicate environment in an automated way. Duplicating the production environment reduces the chances that operations performed in the mount environment will produce different results than if performed in the production environment.
Applicants have appreciated that it is not always desirable for mount environment 420 to be a duplicate of production environment 210 (
To ensure that an application performs quickly and accurately in a production environment, the production environment is often configured with a large amount of resources allocated to the production instance. These resources, for example, may include computer memory, number of processes that may be generated by the application, or number of CPU cycles that are available for the application instance, etc. Accordingly, production host 120 (
Applicants have appreciated that it may not be desirable to require the mount host 150 (
Accordingly, one embodiment of the invention provides a mechanism to control the amount of resources allocated for a mount application instance. Such a mechanism can be used to configure the mount application instance to consume less of one or more resources than the production application instance on which it is based. In some embodiments, control over these parameters is integrated into the computer system in a way that allows automated mounting of a replica, although all embodiments are not limited in this respect.
In the embodiment of
Override file 470 may contain values for only a subset of the parameters controlling initialization of mount application instance 412, or for all of the parameters. As the initialization parameters are used in the initialization process, if a value of a parameter is specified in override file 470, that value is used. If no value for a parameter is specified in override file 470, the value for the parameter in the copy 220′ of the initialization file used in the production environment is used. Accordingly, initialization file 220′ and override file 470 combine to specify values of parameters that control characteristics of mount application instance 412. Regardless of the source of the value for a parameter, mount application instance 412 thereafter may be created using that value of a parameter.
Override file 470 may be created in any suitable way. For example, a system administrator or other user may specify values of certain parameters and store them in override file 470.
Different or additional ways may be used to specify values of parameters that control characteristics of mount application instance 412 or otherwise specify characteristics of mount environment 420. For example, the override values need not be stored in a file. A user may enter override values through a user interface on client 430, and such values could be stored in RAM or other suitable computer-readable medium in any suitable form until used for initialization of mount application instance 412.
Further, the override parameters need not be stored separately from initialization file 220′. Override values could be stored by directly changing the values for one or more parameters in the initialization file 220′. Such a change could be made manually, such as by a user opening an editing program on client 430 and altering the values stored in initialization file 220′. Alternatively, the process could be performed under control of a computer-executable program that receives override values specified by a user and automatically alters the values stored in initialization file 220′. It should be appreciated that changes to the initialization parameters stored in initialization file 220′ need not be made within the same file structure, as a new file can be created by copying values of some parameters from initialization file 220′ and incorporating some override values.
As should be appreciated from the foregoing, the override values can be consolidated with values from the production environment in any suitable way, as the invention is not limited to any particular technique. Regardless of how the override values of the parameters are specified, once initialized with these values, mount application instance 412 may be used in any desired manner.
As discussed above, in one embodiment, the resources are controlled to enable mounting multiple replicas on the same mount host.
As mentioned above, memory is not the only type of resource whose allocation may be modified for the mount environment to differ from the production environment, as aspects of the invention can be used for any resource allocated to an instance of a mount application. Further, allocation of resources is not the only characteristic of a mount environment that can be controlled to differ from the production environment when creating a mount environment.
In the example of
The syntax of
The parameters indicated in
In this example, some of the parameters control resource usage. For example, line 624 sets the value of a parameter used to set the size of a database cache. Setting a database cache size is one way that memory within the mount host is allocated to the mount application instance. Other types of resources may also be allocated based on values in override file 620. For example, line 622 sets a value of a parameter “aq_tm_processes” and line 626 sets a value of a parameter “job_queue_processes.” Each of these lines sets a limit on the number of processes that may exist simultaneously. Limiting processes is one way that processor resources may be allocated. Similarly, line 628 sets a value for a parameter “open_cursors.” Limiting the number of open cursors is yet another way that resources may be allocated to an instance of an application program.
Not all of the characteristics set in override value file 620 allocate resources. Any operating characteristic that can be controlled may be set with an override value specified in override file 620. For example, line 630 sets an operating switch associated with the application program. More specifically, line 630 sets a parameter “query_rewrite_enabled” to false. The instance of the application program created with such a parameter setting is configured to prevent queries from being rewritten. As another example, line 640 sets a value of a parameter indicating the location at which certain output is to be stored.
Thus, the use of an override file such as override file 620 allows multiple parameters of different types to be selectively set upon the creation of an application instance. In one embodiment, if no value for a parameter is included in override file 620, a mount environment is established with that parameter having the same value that it had in the production environment. In other embodiments, parameters whose values are not overridden may be set to a default value or set in any other suitable way.
The parameters depicted in
In this embodiment, override file 720 follows the syntax of the override file 620, though such syntax is not required. Each line includes an identification of a parameter and a value assigned to that parameter.
Because, in most instances, the undocumented parameters identified in override file 720 will not be expressly set when initializing a production instance, the values set in override file 720 will override whatever default values exist for these parameters if no value is set in the production environment. Nonetheless, the override mechanism used when mounting a replica may be used to appropriately configure the mount application instance.
The number and types of parameters that may be set as part of the parameter override process depends on the specific application program in use. Table I lists a set of undocumented parameters for an ORACLE® database, but different or additional parameters may be set for other application programs.
The process of
The process then proceeds to block 812, wherein a mapping for accessing image objects is recreated. As described above, a computer system including an application interfacing with a storage system may include one or more mapping layers that maps logical identifiers used in an application to logical volumes in the storage system. To access a replica of a database, a comparable mapping is mounted so that, as a mount application instance executes on the mount server, it can use the same mapping as used in the production instance to access data in the image. If there are multiple mapping layers, the processing at block 812 may be performed in steps, with each step recreating a successively higher layer of the mapping. Processing at block 812 performs the processing to recreate the mapping in any suitable way.
At block 814, a mount application instance is initialized. As described above, override file 470 may be provided and contain values for one or more parameters. In the illustrated embodiment, the mount application instance uses parameter values that are the same as the values used for the production instance, unless overridden. Any suitable approach may be used for overriding parameter values. In one embodiment, a replication management agent may invoke an application program, which creates an instance of that application program as the mount application instance. That instance may be initialized based on one or more parameter files identified when the application is invoked. In some embodiments, the replication management agent may construct a parameter file representing a combination of the parameters in an initialization file 220′ (
The process proceeds to block 816. At block 816, the application is recovered. In embodiments in which the replica includes a log of changes to the production data that should be part of the image but are not reflected in image objects in storage system 110, recovering the application may include adjusting the data in the image objects to reflect changes captured in the log. In the pictured embodiment, processing at block 816 may be performed in the same manner used when mounting a replica with values that have not been overridden, but any suitable processing techniques may be used.
Once a mount instance is created and is associated with the image objects of the replica, processing proceeds to block 818. At block 818, the database may be opened, meaning that clients connected to the mount host may access the data in the database. Opening the mount database may be performed as in any suitable way.
It should be appreciated that some or all of the steps depicted in
The above-described embodiments of the present invention can be implemented in any of numerous ways. For example, the embodiments may be implemented using hardware, software or a combination thereof. When implemented in software, the software code can be executed on any suitable processor or collection of processors, whether provided in a single computer or distributed among multiple computers. It should be appreciated that any component or collection of components that perform the functions described above can be generically considered as one or more controllers that control the above-discussed functions. The one or more controllers can be implemented in numerous ways, such as with dedicated hardware, or with general purpose hardware (e.g., one or more processors) that is programmed using microcode or software to perform the functions recited above.
In this respect, it should be appreciated that one implementation of the embodiments of the present invention comprises at least one computer-readable medium (e.g., a computer memory, a floppy disk, a compact disk, a tape, etc.) encoded with a computer program (i.e., a plurality of instructions), which, when executed on a processor, performs the above-discussed functions of the embodiments of the present invention.
The computer-readable medium can be transportable such that the program stored thereon can be loaded onto any computer environment resource to implement the aspects of the present invention discussed herein. In addition, it should be appreciated that the reference to a computer program which, when executed, performs the above-discussed functions, is not limited to an application program running on a host computer. Rather, the term computer program is used herein in a generic sense to reference any type of computer code (e.g., software or microcode) that can be employed to program a processor to implement the above-discussed aspects of the present invention.
It should be appreciated that in accordance with several embodiments of the present invention wherein processes are implemented in a computer readable medium, the computer implemented processes may, during the course of their execution, receive input manually (e.g., from a user).
The phraseology and terminology used herein is for the purpose of description and should not be regarded as limiting. The use of “including,” “comprising,” “having,” “containing”, “involving”, and variations thereof, is meant to encompass the items listed thereafter and additional items.
Having described several embodiments of the invention in detail, various modifications and improvements will readily occur to those skilled in the art. Such modifications and improvements are intended to be within the spirit and scope of the invention. Accordingly, the foregoing description is by way of example only, and is not intended as limiting. The invention is limited only as defined by the following claims and the equivalents thereto.