Tuesday, 16 June 2015

Informix Virtual Cloning - Staging Architecture with Delphix

Informix Virtual Cloning - Staging Architecture with Delphix

Delphix can clone Informix instances. It works. However there are disadvantages of cloning the whole instance (binaries + storage). It works only with non root installations. Fortunately there is another way of virtual cloning of Informix. Cloning with staging instance. This time only the storage is cloned. This method has no "no root installation" limitation!

Staging Architecture

Informix Virtual Cloning - Staging Architecture.

The general idea is that this time we are not cloning everything but only storage.
The picture above shows the architecture. We have:
  • Host Informix 1 - Source Informix installation ("root" or "non root") using physical storage
  • Host Informix 2 - Staging Informix non root installation. Storage is provided by Delphix Engine.
  • Host Informix 3 - Virtual Clone non root installation. Storage is provided by Delphix Engine.

 Staging Advantages

  • We are using staging instance with storage provided by Delphix to maintain a "master" copy of data files for our virtual clones.
  • There are several ways of feeding staging instance with data. We can feed it with full system archives every snapshot. We can use backups of logical logs or even HDR configuration.
  • Maintaining the stream of data from source instance does not affect operation of our virtual clone.
  • Source instance can be root or non root installation. To instantiate the staging instance we are using full system archive applied to not root installed staging instance.
  • Snapshots of staging are very lightweight when using logical logs or HDR as feed.
  • Independent life-cycle of staging and virtually cloned end instances.

Moving Parts - Mechanics

  • informix2-source_mock - Empty folder used to create dSource "informix2-source_mock".
  • informix2-storage - Staging instance storage. We are using vFiles as storage. At first the storage folder is empty.
Staging Informix Storage

  • At the beginning we have to restore source's system backup in storage instance. First we create empty files representing chunks from source instance. Then we are using "ontape -p" to reinstate Informix instance. Our new instance has different name than source and is installed in test VM. Staging instance is left running in "Fast Recovery" mode.
  • At this point we have to create first useful snapshot of our stage. We have to stop the instance using "onmode -ky" and then just create a snapshot of "informix2-storage" vFiles. Now we are ready to provision usable virtual clone of Informix.
  • informix3-storage - We need a third VM where Informix binaries are installed. We have to configure the instance in proper way and provide a storage for the instance. The storage is delivered by creating another vFiles folder "informix3-storage" out of "informix2-storage". This is done in third VM. After provisioning the storage we are ready to startup the virtual clone of Informix.
Informix Virtual Clone Storage

Informix Virtual Clone Storage Parameters
  • In order to startup virtual clone in Informix3 host we have to issue "oninit -PHY" and "onmode -m". From that point we can make snapshots of virtually cloned Informix, rewind to previous snapshots, refresh virtual clone from parent "informix2-storage" representing storage of staging instance. 
  • It is necessary to use pre-refresh and post-refresh hook scripts to stop and start Informix instance when refreshing. The same applies to rewind operation.
  • Every time we want to snapshot staging instance's storage we have to stop the instance and ingest new data from source. The procedure of ingesting data from system backups and logical logs is different. Logical logs can be ingested on the fly by invoking "ontape -l -C". We can use HDR if configuration allows.


  • Using staging architecture by cloning Informix is much more flexible than cloning full stack.
  • Serious limitation related to not root installations is removed.
  • Time flow of data coming from source instance is independent from virtual clone storage and has its own life-cycle.
  • Virtually cloned instances are not bound directly to source instance.
  • We can create multiple clones based on the same "virtual dSource". This can be done because of Delphix vFiles inheritance feature.
  • Such architecture is suitable for cloning big Informix databases. 


Git: https://github.com/goliasz/delphix-informix