pdloginit (Initialize log file)

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.

Executor

HiRDB administrator

Format

HiRDB/Single Server

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}

HiRDB/Parallel Server

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]}

Options

Specifies the type of log file to be initialized:

sys
System log file
spd
Synchronization point dump file

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

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-filename. 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.

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:

Guidelines for the specification value

For details about how to estimate the number of HiRDB records, see the HiRDB Version 8 Installation and Design Guide.

Specify the record length for the HiRDB file to be initialized as a system log file. This option should be specified when it is necessary to create a system log file before modifying the system definition, or when it is desirable to explicitly specify a record length.

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 1024 is assigned.
    • If the specified value is 1025-2048, a record length of 2048 is assigned.
    • If the specified value is 2049-4096, a record length of 4096 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. When specifying a record length, the following factors should be taken into consideration:
    • The shorter a record length, the greater the number of I/O operations required on the data file for handling large-size data. However, this will decrease the amount of free space due to the rounding up of space requiring to the HiRDB record size unit, thus improving the file utilization efficiency.
    • The longer a record length, the smaller the number of I/O operations required on the data file for handling large-size data. However, this will increase the amount of free space due to the rounding up of space requiring to the HiRDB record size unit, thus reducing the file utilization efficiency.
  4. As a guide for the record length to be specified, use the average block length that is output to the system log file according to statistical information. It is recommended that the following values be specified in this option:
    • If the average block length is less than or equal to 1024 bytes, specify 1024.
    • If the average block length is 1025-2048 bytes, specify 2048.
    • If the average block length is greater than or equal to 2049 bytes, either specify 4096 bytes or use the default.
  5. 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.

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

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.

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 4096.
  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.

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 4096 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.

Examples

Example 1
Create system log files.
HiRDB/Single Server

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

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

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

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