Back
Home
Up
Next

Shadow files.

    You can think about shadowing as mirroring performed by the IB engine itself. A shadow is a way to keep one or more copies of the same database files, that are written at the same time by the engine.

    Shadowing can help in cases where a machine has several physical disks and one of them fails. As long as the shadow is on another drive, Interbase can be redirected to use the shadow as it was the primary set of files.

Please, notice that a shadow must have the same space availability than the primary database. It's an exact copy of the data. While it can help in cases of HW failure, it can't help you against data corruption due to faulty RAM memory or a bug in the IB engine itself. In these cases, probably all the copies of the data will be corrupted in the same way. Like all the SW-based solutions, shadowing is cheap but if you want to get maximum performance and reliability, even a RAID support like the one provided in the operating system won't be enough; you will need a HW solution like Mylex's Extreme RAID or a clustered solution (where you can have several machines in sync in case one of them fails).

Some advantages are:

  • Recovery is quick. Activating a shadow makes it available immediately.
  • Creating a shadow does not require exclusive access to the database.
  • Shadow files use the same amount of disk space as the database. Log files, on the other hand, can grow well beyond the size of the database.
  • You can control the allocation of disk space. A shadow can span multiple files on multiple disks.
  • Shadowing does not use a separate process. The database process handles writing to the shadow.
  • Shadowing can run behind the scenes and needs little or no maintenance.

Some limitations are:

  • Shadowing is useful only for recovery from hardware failures or accidental deletion of the database. User errors or software failures that corrupt the database are duplicated in the shadow.
  • Recovery to a specific point in time is not possible. When a shadow is activated, it takes over as a duplicate of the database. Shadowing is an "all or nothing" recovery method.
  • Shadowing can occur only to disk. Shadowing to tape or other media is unsupported.

Although shadowing was the inspiration for the multi versioning engine, they are different implementations: shadowing is an option to keep two or more exact copies of the same data on real time, whereas the multi versioning architecture operates inside each database file, keeps different version of each record if necessary and cannot be disabled.

Currently, shadowing cannot occur in remote machines or mapped drives from another machines (as it's the case of NFS) due to performance considerations, but this requirement can be relaxed in the future.

 

This page was last updated on 2000-05-26 04:28:46