2.115 pdstsinit (Initialize status file)

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

(1) Function

The pdstsinit command creates a physical file that is to comprise a status file (logical file) in the HiRDB file system and initializes it so that it can be used during HiRDB operation. This command cannot initialize the current or a spare status file being used in the active HiRDB.

(2) Executor

HiRDB administrator

(3) Format

(a) HiRDB single server configuration
Unit status file

pdstsinit [{-x host-name|-u unit-identifier}]
          -f physical-file-name [-l record-length][-c records-count]

Server status file

pdstsinit -s server-name
          -f physical-file-name [-l record-length][-c records-count]

(b) HiRDB parallel server configuration
Unit status file

pdstsinit {-x host-name|-u unit-identifier}
          -f physical-file-name [-l record-length][-c records-count]
          [-D]

Server status file

pdstsinit -s server-name [{-x host-name|-u unit-identifier}]
          -f physical-file-name [-l record-length] [-c records-count]
          [-D]

(4) Options

(a) {-x host-name|-u unit-identifier}

When a unit status file is to be initialized, specifies the identifier of the unit or the name of the host corresponding to the unit status file. For a HiRDB single server configuration, this option can be omitted because the host and unit are fixed.

-x host-name ~<identifier> ((1-32))
  • For a unit status file
    Specifies the name of the host corresponding to the unit status file.
  • For a server status file
    When the standby-less system switchover (effects distributed) facility is used, specifies the name of the host that contains the disk where the file is to be created. This host must contain a unit that belongs to the HA group to which the server specified in the -s option is to be moved.
    When the server specified in the -s option and the system manager are running, this option is ignored, if specified.
    When the standby-less system switchover (effects distributed) facility is not used and this option is specified together with the -s option, the command checks the host specified in this option and the primary system's host at the server specified in the -s option to determine if they match. If the host names do not match, an error results.
-u unit-identifier ~<identifier> ((4 characters))
  • For a unit status file
    Specifies the identifier of the unit corresponding to the unit status file.
  • For a server status file
    When the standby-less system switchover (effects distributed) facility is used, specifies the unit identifier of the host that contains the disk where the file is to be created. This unit must belong to the HA group to which the server specified in the -s option is to be moved.
    When the server specified in the -s option and the system manager are running, this option is ignored, if specified.
    When the standby-less system switchover (effects distributed) facility is not used and this option is specified together with the -s option, the command checks the primary system's host on the unit specified in this option and the primary system's host at the server specified in the -s option to determine if they match. If the host names do not match, an error results.
(b) -s server-name ~<identifier> ((1-8))

When a server status file is to be initialized, specifies the name of the server corresponding to the server status file.

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

Specifies the absolute path name of the physical file to be initialized. A physical file name must be specified in the format HiRDB-file-system-area-name/HiRDB-file-name. A name beginning with pl cannot be specified as a HiRDB file name. If the specified physical file has already been initialized, it will be reinitialized.

(d) -l record-length ~<unsigned integer> ((1024-32768)) <<4096>>

Specifies in bytes the record length for the status file. If the records are short, the number of I/O operations on the status file increases, but the utilization efficiency becomes high. On the other hand, if the records are long, the number of I/O operations decreases, but the utilization efficiency becomes low. This must be taken into account when the record length is specified.

(e) -c records-count ~<unsigned integer> ((32-2096107)) <<256>>

Specifies the number of records in the status file.

For details about how to estimate the number of records, see the HiRDB Version 9 Installation and Design Guide. The standard value is the estimated number of records [Figure] 1.2.

(f) -D

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

The command initializes the status files that are required to add a unit or server. When this option is specified, the command does not check the unit identifier or server name.

When you specify this option, make sure that the pdchgconf command is executed on the unit that contains the status file that is to be created.

(5) Rules

  1. The pdstsinit command can be executed at any time, whether or not HiRDB is active (except during HiRDB startup or termination processing).
  2. The pdstsinit command must be executed at the server machine containing the single server or the server machine where the system manager is located.
  3. The physical files A and B comprising one logical file must be initialized so that they have the same number of records and the same record length. When a logical file is to be initialized, the numbers of records need not be the same, but the record length must be the same.
  4. The number of records in a status file depends on the HiRDB system configuration; the value can be checked with the pdls command (with -d sts specified). When the pdls command executes, the record utilization factor is displayed, enabling the number of records to be changed on the basis of the displayed record utilization factor. For example, if the record utilization factor is high, a status file should be initialized to contain more records than the current file.

(6) Notes

  1. The result of the pdstsinit command can be determined from the command's return code or the existence of an error message. Return code 0 for this command indicates normal termination, 8 indicates abnormal termination (such as invalid option or rsh error), and 12 indicates abnormal termination (when retry was executed from a standby system in a configuration in which IP addresses are not inherited).
  2. The following table describes how to specify the -u and -s options when the standby-less system switchover (effects distributed) facility is used:
    Initialization targetUnit or server statusHost containing the disk where the file was createdSpecification of -u and -s options
    Unit status fileActiveHost where the unit is locatedSpecify one of them
    Inactive
    Server status fileActiveHost containing the running back-end serverOptional
    InactiveHost containing the primary back-end server
    Other hostSpecify one of them
  3. If you are using Real Time SAN Replication based on the log-only synchronous method, you can specify either of the status files (the status file for transaction processing or the status file for log application processing). The volume on which the status file is to be created must be write-enabled.
    In the case of the initial configuration of HiRDB for the log application site, there is no need to use the pdstsinit command to create a status file for log application processing, because initialization is performed by the preparations for log application.

(7) Examples

Create a unit status file and a server status file.

HiRDB single server configuration:

pdstsinit -f /svr01/systs01a                    .....1
         -c 512                                .....2
pdstsinit -f /svr01/systs01b                    .....1
         -c 512                                .....2
pdstsinit -s sds1                               .....3
         -f /svr02/stsf01a                     .....4
         -c 512                                .....5
pdstsinit -s sds1                               .....3
         -f /svr02/stsf01b                     .....4
         -c 512                                .....5

Explanation
  1. Names of the physical files that constitute the unit status file:
    /svr01/systs01a,/svr01/systs01b
  2. Number of records per physical file:
    512
  3. Name of the server corresponding to these server status files:
    sds1
  4. Names of the physical files that constitute the server status file:
    /svr02/stsf01a,/svr02/stsf01b
  5. Number of records per physical file:
    512
HiRDB parallel server configuration:

pdstsinit -x host1                               .....1
          -f /svr01/systs11a                     .....2
          -c 512                                 .....3
pdstsinit -x host1                               .....1
          -f /svr01/systs11b                     .....2
          -c 512                                 .....3
pdstsinit -x host2                               .....1
          -f /svr02/systs21a                     .....2
          -c 512                                 .....3
pdstsinit -x host2                               .....1
          -f /svr02/systs21b                     .....2
          -c 512                                 .....3
pdstsinit -x host3                               .....1
          -f /svr03/systs31a                     .....2
          -c 512                                 .....3
pdstsinit -x host3                               .....1
          -f /svr03/systs31b                     .....2
          -c 512                                 .....3
pdstsinit -s fes1                                .....4
          -f /svr01/stsf11a                      .....5
          -c 512                                 .....6
pdstsinit -s fes1                                .....4
          -f /svr01/stsf11b                      .....5
          -c 512                                 .....6
pdstsinit -s ds1                                 .....4
          -f /svr02/stsd21a                      .....5
          -c 512                                 .....6
pdstsinit -s ds1                                 .....4
          -f /svr02/stsd21b                      .....5
          -c 512                                 .....6
pdstsinit -s bes1                                .....4
          -f /svr03/stsb31a                      .....5
          -c 512                                 .....6
pdstsinit -x bes1                                .....4
          -f /svr03/stsb31b                      .....5
          -c 512                                 .....6

Explanation
  1. Names of the hosts corresponding to the unit status file:
    host1, host2, and host3
  2. Names of the physical files that constitute the unit status file:
    /svr01/systs11a,/svr01/systs11b
    /svr02/systs21a,/svr02/systs21b
    /svr03/systs31a,/svr03/systs31b
  3. Number of records per physical file:
    512
  4. Names of the servers corresponding to the server status file:
    fes1, ds1, and bes1
  5. Names of the physical files that constitute the server status file:
    /svr01/stsf11a,/svr01/stsf11b
    /svr02/stsd21a,/svr02/stsd21b
    /svr03/stsb31a,/svr03/stsb31b
  6. Number of records per physical file:
    512