Documentation

Knowledgebase

Previous Topic

Next Topic

File Mirroring

FairCom DB’s mirroring facility makes it possible to create and maintain copies of important files on different drive volumes, partitions or physical drives. If the primary storage location is lost due to some form of catastrophe (i.e., head crash) the mirroring logic can automatically detect the lost connection and switch to the secondary or “mirrored” storage area.

By default, read and write operations on mirrored files will continue without returning an error if one of the files fails, but the other succeeds. When this happens, the failed file is shut down, all subsequent I/O operations continue only with the remaining file and the file name for the shut down file is logged in the server status log, CTSTATUS.FCS.

Both non-transaction controlled and transaction-controlled files can be mirrored. For a transaction controlled file, if a primary and mirror file get out-of-sync beyond the ability of automatic recovery to make them both good, the most up-to-date file is recovered.

In This Section

When to Use Mirrored Files

Creating Mirrored Files

Previous Topic

Next Topic

When to Use Mirrored Files

Use mirrored files in a system where disk I/O errors might be expected to occur. Placing a mirrored copy of a file on a different drive than the primary copy of the file can protect against failure of either of the drives. Following a failure of the primary or mirror, the server automatically switches to using only the remaining copy of the file and clients can continue to access the file. Restoring primary and mirror copies involves taking the remaining copy off-line and using a system file copy utility to restore the second copy of the file from the remaining good copy.

Update speed for mirrored files is no different than for non-mirrored files when the updates are written to the server’s cache. When updates are written to disk, however, both the primary and the mirror files are updated, which may cause updates to be slower for a mirrored file compared to a non-mirrored file.

Another option is to use a mirroring approach that operates at the disk level, such as RAID, rather than using the server’s mirroring support. Such an approach may provide the following abilities not supported by FairCom DB’s mirroring facility:

  • Easily mirroring the entire contents of a disk.
  • Maintaining more than two copies of disk contents.
  • Better performance due to parallel disk transfer operations.

Previous Topic

Next Topic

Creating Mirrored Files

To create a mirrored file, call a FairCom DB file creation function specifying a name of the form “<primary>|<mirror>”, where <primary> is the name of the primary file and <mirror> is the name of the mirror file. The server automatically applies updates made to the primary file to the mirror file.

FairCom DB also supports mirroring the user/group definition file, FAIRCOM.FCS, and the transaction logs and transaction start files. For details on enabling mirroring for these files, see the Mirroring Control options in the “Advanced Configuration Options” section of FairCom DB Administrator’s Guide.

TOCIndex