Persistent Database Storage
A persistent RDM database is composed of computer files. These files are stored in an operating system's file system, which can be using hard drives, SD RAM, or SSD as the underlying media. RDM uses standard file I/O functions to access the file system. Data stored in the files are portable, or "platform agnostic" so that they may be directly copied between any two computers.
The RDM database employs a copy-on-write mechanism with its persistent storage. This methodology is used as the underlying mechanism for snapshots and high performance reliable transactions. The copy-on-write technique used by RDM is typically referred to as redirect-on-write which means that the original data is unchanged and the new version is written to the new location at the end of the file. This is an efficient technique since a reliable transaction can be completed with one write operation.
Vacuuming becomes important with the copy-on-write implementation to control the total database size on the disk. See the Database Vacuuming section for more details.
The persistent database image will be stored in a sub-directory within the Database Storage Location (docroot) directory. For example, the
HELLO_WORLD database image will be stored in a sub-directory of the docroot named:
The database directory will store the pack files (
*.pack). The pack files serve the purpose of a database transaction log for recovery purposes but are also the object store for the database. The pack files are completely self-contained and portable. This means, for example, that the pack files created on a PowerPC or ARM architecture can be copied and used by a computer with an X86 architecture.
The pack files are sequentially named and the database image, when large enough, will require multiple pack files to store the complete database image. The default and maximum size for a pack file is a little smaller than 2 GiB.
A valid database CANNOT have any breaks in the naming sequence. In other words, if the first pack file is
p00000010.pack and the last pack file is
p00000013.pack, the intermediate pack files
p00000012.pack MUST exist in the directory.