2.51 pdloginit (Initialize log file)

Organization of this section
(1) Function
(2) Executor
(3) Format
(4) Options
(5) Rules
(6) Notes
(7) Examples

(1) Function

The pdloginit command creates a log physical file in the HiRDB file system area and initializes it so that it can be used by the active HiRDB.

(2) Executor

HiRDB administrator

(3) Format

(a) HiRDB single server configuration

pdloginit {-d sys [-s server-name]
          -f physical-filename -n HiRDB-records-count [-l record-length]
        | -d spd [-s server-name]
          -f physical-filename -n HiRDB-records-count}

(b) HiRDB parallel server configuration

pdloginit {-d sys -s server-name[-u unit-identifier]
          -f physical-filename -n HiRDB-records-count
         [-l record-length] [-D]
        | -d spd -s server-name[-u unit-identifier]
          -f physical-filename -n HiRDB-records-count [-D]}

(4) Options

(a) -d sys|spd

Specifies the type of log file to be initialized:

sys
System log file
spd
Synchronization point dump file
(b) -s server-name ~<identifier> ((1-8))

Specifies the name of the server corresponding to the file group.

(c) -f physical-filename ~<pathname> ((up to 167 characters))

Specifies the absolute pathname of the physical file to be initialized. The physical file name must be specified in the format HiRDB-file-system-area-name/HiRDB-file-name. A HiRDB file name cannot be duplicated in the HiRDB file system area. If the specified HiRDB file has already been initialized, the command results in an error. A name beginning with pl cannot be specified as a HiRDB file name.

(d) -n HiRDB-records-count ~<unsigned integer> ((12-104857600))

Specifies the number of records in the HiRDB file to be initialized.

For the purposes of this section, a record is an area with the following size in the HiRDB file system:

Specification range
For the number of HiRDB records, specify a value in the following range:
For -d sys
  • Maximum value
    107,374,182,400 [Figure] -l option-value
  • Minimum value
    [Figure](32,000 + 368 + 3 [Figure] 4,096) [Figure] -l option value[Figure] + 1
For -d spd
12 to 262144
Guidelines for the specification value
For details about how to estimate the number of HiRDB records, see the HiRDB Version 9 Installation and Design Guide.
  • For -d sys
    The estimated number of records should be the total number. The standard value for this option is the total number/number of system log files to be created [Figure] 1.2.
  • For -d spd
    The standard value for this option is the estimated number of records [Figure] 1.2.
(e) -l record-length ~<unsigned integer> ((1024-4096))

Specify the record length for the HiRDB file to be initialized as a system log file. Normally, you do not need to specify this option.

Specify this option only when you want to create a system log file before you modify the system definition.

Notes
  1. Any record length specified here should be the same as one that was specified in the pd_log_rec_leng operand in the system definition. The following values can be assigned:
    • If the specified value is 1024, a record length of 1,024 is assigned.
    • If the specified value is 1025 to 2048, a record length of 2,048 is assigned.
    • If the specified value is 2049 to 4096, a record length of 4,096 is assigned.
  2. Any other values cause an error. The default is initialization using the value specified in the pd_log_rec_leng operand in the system definition. Files that are initialized using a record length different from that specified in the pd_log_rec_leng operand cannot be opened as system log files.
  3. Note that specifying this option in initializing a file as a synchronization point dump file will cause an error. Similarly, specifying a record length less than the sector length for the HiRDB file system causes an error.
(f) -u unit-identifier ~<identifier> ((4 characters))

When the standby-less system switchover (effects distributed) facility is used, specifies the unit identifier of the host that contains the disk on which the file is to be created.

When the applicable server is running, the -u option is ignored, if specified.

Specifying the -u option results in an error if any of the following is true:

The following table describes whether or not the -u option is required:

Server statusHost containing the disk where file is createdSpecification of -u option
ActiveHost containing the running back-end serverOptional
InactiveHost containing the primary back-end server
Other hostMandatory
(g) -D

Specifies that a unit or server is to be added by the pdchgconf command.

This option initializes the system log file or synchronization point dump file that is needed in order to add a unit or server. When this option is specified, the command will not check the server name.

If you execute the pdloginit command with this option specified, make sure that the command is executed at the unit where the system log file or synchronization point dump file is to be created.

(5) Rules

  1. The pdloginit command can be executed at any time, whether or not HiRDB is active (except during HiRDB startup or termination processing).
  2. The pdloginit command must be executed at the server machine containing the single server or the server machine where the system manager is located.
  3. If the same environment variable as in the HiRDB directory is not set in the PDDIR environment variable during execution of the pdloginit command and a command error occurs, no message will be output.
  4. When creating a HiRDB file system in a character special file, partition the hard disk on which the file is created as follows:
    • If the file to be initialized is a system log file (if -d sys), an integral multiple of the sector length of the hard disk partition should be equal to the record length specified in the -l option.
    • If the file to be initialized is a synchronization point dump file (if d spd), an integral multiple of the sector length of the hard disk partition should be equal to 4,096.
  5. In all files in each server, the record length for the system log file should be equal to the value specified in the pd_log_rec_leng operand of the HiRDB system definition.

(6) Notes

  1. When creating duplicate system log files for redundancy, the physical files for systems A and B comprising a log file group should be initialized so that they are equal in record length and the number of records.
  2. If the system log file is to be dualized, physical files A and B should be created on separate hard disks, if possible, for purposes of error handling.
  3. The result of the pdloginit command can be determined from the command's return code or error message, if any. The return codes are as follows:
    0: Normal termination
    4: Abnormal termination
    8: Abnormal termination (such as invalid option or rsh error)
    12: Abnormal termination (when retry was executed from a standby system in a configuration in which IP addresses are not inherited)
  4. Files cannot be initialized in a HiRDB file system that has a sector length greater than 4,096 bytes.
  5. If you use Real Time SAN Replication based on the log-only synchronous method, the files that can be initialized depend on the site where the command is executed.
    • At the transaction execution site
      The system log file, synchronization point dump file for transaction processing, and synchronization point dump file for log application processing are initialized.
    • At the log application site
      The synchronization point dump file for log application processing is initialized. Neither the system log file nor the synchronization point dump file for transaction processing can be initialized.

(7) Examples

Example 1
Create system log files.
HiRDB single server configuration

pdloginit -d sys                                     1
          -f /svr01/logf11                           2
          -n 64                                      3
pdloginit -d sys                                     1
          -f /svr01/logf12                           2
          -n 64                                      3

Explanation
  1. Type of log file to be initialized: sys (system log files)
  2. Names of physical files: /svr01/logf11, /svr01/logf12
  3. Number of records in each physical file: 64
HiRDB parallel server configuration

pdloginit -d sys                                     1
          -s bes1                                    2
          -f /svr01/logf11                           3
          -n 64                                      4
pdloginit -d sys                                     1
          -s bes1                                    2
          -f /svr01/logf12                           3
          -n 64                                      4

Explanation
  1. Type of log file to be initialized: sys (system log files)
  2. Name of server corresponding to the file group: bes1
  3. Names of physical files: /svr01/logf11, /svr01/logf12
  4. Number of records in each physical file: 64
Example 2
Create synchronization point dump files.
HiRDB single server configuration

pdloginit -d spd                                     1
          -f /svr01/spdf11                           2
          -n 64                                      3
pdloginit -d spd                                     1
          -f /svr01/spdf12                           2
          -n 64                                      3

Explanation
  1. Type of log file to be initialized: spd (synchronization point dump file)
  2. Names of physical files: /svr01/spdf11, /svr01/spdf12
  3. Number of records in each physical file: 64
HiRDB parallel server configuration

pdloginit -d spd                                     1
          -s bes1                                    2
          -f /svr01/spdf11                           3
          -n 64                                      4
pdloginit -d spd                                     1
          -s bes1                                    2
          -f /svr01/spdf12                           3
          -n 64                                      4

Explanation
  1. Type of log file to be initialized: spd (synchronization point dump files)
  2. Name of server corresponding to the file group: bes1
  3. Names of physical files: /svr01/spdf11, /svr01/spdf12
  4. Number of records in each physical file: 64