Builds and/or configures a Reality database. There are four types of database you can create.
mkdbase {options} database
database The path (absolute or relative) to the database to be built or rebuilt, or the name of an entry in the realfstab file.
-A numfiles Extends a partition database on a single file system by numfiles files. The additional files will be the same size as the existing ones (see -S option).
-a Expands a partition database by linking additional partitions or files that have been added to the realfstab file.
-F size Specifies the
size in kilobytes
(1, 2, 4 or 8) of the Reality frames used within the database (default, 1Kbyte). Filestore databases can only use 1 Kilobyte frames; if you use both the
This parameter overrides the default frame size set using FrameSize setting in the Reality master configuration file.
-i Completely remove the data from the database. Use when creating or rebuilding a partition database (without this option, only the minimum necessary initialisation is performed). Cannot be used with filestore databases.
-k Kill database daemon (UNIX) or server (Windows). This forces all users to log off, so that the database can be rebuilt.
-l Unlock the database on completion. The default is to leave the database locked to all users except the owner (the user who created it) and, on UNIX, the super-user.
-M mod Create
the SYSTEM file with modulo (number of groups) mod (default is 11).
Use with the
-N name Use name as database name. If this option is not used, mkdbase prompts for a name.
Note: If you specify the database name using the -N option, you can omit the database parameter. The database will be created in the current directory, in a subdirectory with the same name as the database.
-n UNIX only. Assumes the answer to any confirmation prompt is "no". This prevents any unmounted file system on the partition being overwritten.
-P filesize{xnumfiles}
Specifies a partition database on a single file
system, where
numfiles is the number of host files (default, 1) and filesize is the
size of each of these files in
frames. The total size of
the database will be filesize ´
numfiles. If numfiles is omitted, the database will
consist of a single host file.
This option is deprecated – the -S option is preferred when specifying the size of a partition database on a single file system.
-p Do not run the start-up Proc in the new or rebuilt database. This can speed up database creation.
-r Clears and rebuilds an existing database. This option prompts to confirm that you wish to rebuild the database. It can be used in conjunction with the -u option to change the access permissions on the rebuilt database.
Caution
The -r option destroys all data in the existing database. All files except those in the configs directory and top database directory are removed and re-initialised.
The -r option can be used to resize system files on the database. Refer to the topic Resizing System Files.
You can combine the -r and -F options to change the frame size of an existing database.
-R Windows only. Allows you to do the following:
This option does not modify the data in the database.
-S size[M||G]{ numfiles}
Specifies a partition database on a single file system, where size is the
total size in Megabytes (M) or Gigabytes (G) and
numfiles is the number of host files used. If
numfiles is omitted, the database will be divided between ten
host files.
Note: If you omit the -S option and there is no entry for the database in the realfstab file, a 20Mbyte database will be created, consisting of a single host file.
-s size Stripe size, in frames, for partition database. The default, if the -s option is omitted, is 16. To turn striping off, set size to 0. Does not apply to a partition database on a single file system.
-U UNIX only. Creates a filestore database.
-u User (owner) only access.
-v Verbose mode.
-y Use with the -r option to suppress the confirmation prompt.
Unless you use the -S option to specify a partition database on a single file system, the type of database created depends on the following:
If there is an entry in the realfstab file with the same directory name or path as the database, a partition database is created, as specified in realfstab.
Note: If you specify just a directory name, the realfstab entry used depends not only on the name you specify, but also the current directory when you run mkdbase. If the combination of the current directory and the name you specify matches a realfstab entry, that entry is used.
Refer to Types of Database for information about these different database types.
A partition database can have up to 231 frames – with the default 1Kbyte frame size, this gives a maximum size of 2 Terabytes (2048Gbytes). The maximum size of a filestore database is determined by the size of the containing partition.
Unless the -l option is used, a newly created database is locked to all users except the database owner (the user who created it) and, on UNIX, the super-user. To allow general user access it is necessary to unlock it using either unlockdbase, or the ENABLE-LOGONS TCL command.
Unless the -N
option is used, mkdbase
prompts for a database name that must uniquely identify the database. This name is placed in a SYSMAN Master Dictionary item
and is used by the WHO
command and LOGON
prompt in Reality. It also identifies the database in
the ROUTE-FILE for external
connections.
For partition databases, it is recommended that the file system where the database is created should have available free space about 10% of the size of the database. This is required for temporary files used during database operation.
Note: If necessary, the directory containing these temporary files can be moved to a different location by setting the TempDir database configuration parameter.
If you are using Database Isolation, you must use realroot to select the required instance of Reality before running mkdbase.
If you try to create a multiple partition database that uses a partition that is already being
used by Reality (for either another partition database or a file-store
database), the system displays a warning message and a prompt asking if you wish
to continue. If you enter Y
, the partition is reformatted
and all data in the existing database is lost. The messages are:
Overwrite existing database partition partition_name
Overwrite file system on partition_name
A file-store database may be located at any convenient point in the UNIX file system. A partition database may be located in one or more partitions or in files on one or more file systems. Normally a large file-store database will occupy a single partition. Smaller file-store databases may be created in any user's directory.
It is recommended that a user-id is reserved for creating the database and different user-ids are used to access the database. Normally each user should have a unique UNIX user-id. If users are allowed to logon to the database under the owner's id, database security mechanisms are made ineffective. Users are given database owner privileges so that they are able to update the config file, shut down the database, etc. The lockdbase command is also made ineffective unless the -a option is used with it.
Note: If you are using Database Isolation, mkdbase associates the new database with the currently selected instance of Reality.
On Windows, Reality supports partition databases on both a single partition and multiple file systems. In both cases, the database parts are ordinary Windows files. If the database is on a single partition, the Windows filing system/storage hardware performs any striping required.
A database can be created at any point in an NTFS file system.
On Windows Vista, databases that will be available on the network must be created in a folder with unrestricted access, such as a dedicated subfolder within the root folder. A database in a user’s home folder cannot be accessed remotely.
The database is built in the following sequence.