Nonstop Database, HiRDB Version 9 System Operation Guide

[Contents][Index][Back][Next]

15.8.6 Example (method that expands HiRDB files in the HiRDB file system area)

This step adds a user RDAREA (RDAREA2) to which the automatic extension facility is applied.

Procedure
  1. Modify the HiRDB system definition.
  2. Use the pdfmkfs command to create a HiRDB file system area for RDAREAs.
  3. Create a control statements file for the pdmod command.
  4. Use the pdmod command to add the RDAREA.
  5. Use the pdlogswap -d sys -w command to swap the system log files.
  6. Use the pdcopy command to back up data.
  7. Use the pdbufmod command to allocate a global buffer.
  8. Update the pdbuffer operand.
The procedure step numbers correspond to the paragraph numbers in the explanation that follows. For example, step 3 above is explained in paragraph (3) below.
Organization of this subsection
(1) Modifying the HiRDB system definition
(2) Use the pdfmkfs command to create a HiRDB file system area for the RDAREA
(3) Create a control statements file for the pdmod command
(4) Use the pdmod command to add the RDAREA
(5) Use the pdlogswap -d sys -w command to swap the system log files
(6) Use the pdcopy command to back up data
(7) Allocate a global buffer for the added RDAREA
(8) Update the pdbuffer operand

(1) Modifying the HiRDB system definition

Modify the value specified for the pd_rdarea_extension_timing operand. In this example, nouse is specified as the automatic extension trigger.

                         :
set pd_rdarea_extension_timing=nouse
                         :

For details about how to modify the HiRDB system definition, see 9.1 Modifying HiRDB system definitions or 9.2 Modifying HiRDB system definitions while HiRDB is running (system reconfiguration command).

(2) Use the pdfmkfs command to create a HiRDB file system area for the RDAREA

 
pdfmkfs -n 100 -l 10 -e 230 -k DB -i /rdarea/area02
 

Explanation
Specifies the -e option to create a 100 MB HiRDB file system area (/rdarea/area02) for RDAREAs. Specifies the -i option to initialize the HiRDB file system area.

(3) Create a control statements file for the pdmod command

A control statements file (/pdmod/create02) is created for the create rdarea statement of the pdmod command. The following are the contents of the control statements file:

 
create rdarea RDAREA2
   for user used by PUBLIC
   server name bes1
   page 4096 characters
   storage control segment 10 pages
   extension use 300 segments
   file name "/rdarea/area02/file01"
      initial 500 segments
   file name "/rdarea/area02/file02"
      initial 500 segments;
 

Explanation
Specifies an extended segment count in the extension operand in order to apply RDAREA automatic extension.
In this example, the last HiRDB file (/rdarea/area02/file02) to be allocated to the RDAREA (RDAREA2) is automatically expanded by 300 segments each time the automatic extension trigger occurs.

(4) Use the pdmod command to add the RDAREA

 
pdmod -a /pdmod/create02
 

Explanation
Specifies the name of the control statements file for the pdmod command created in step (2).

(5) Use the pdlogswap -d sys -w command to swap the system log files

 
pdlogswap -d sys -w
 

(6) Use the pdcopy command to back up data

 
pdcopy -m /rdarea/mast/mast01 -M r -a -b /pdcopy/backup01 -p /pdcopy/list01
 

Explanation
Because the pdmod command invalidates logs, you must acquire a backup after execution. If a backup is not acquired here, the RDAREA can be restored only to the state it was in before execution of the pdmod command. For details about how to back up data, see 6. Backup Procedures.

(7) Allocate a global buffer for the added RDAREA

 
pdbufmod -k add -a gbuf02 -r RDAREA2 -n 1000
 

Explanation
This step adds a new global buffer (gbuf02) and allocates it for RDAREA2. In this example, the pdbufmod command is used to add a global buffer and allocate it.

Note, however, that both of the following conditions must be satisfied as prerequisites for using the pdbufmod command:

(8) Update the pdbuffer operand

The global buffer allocated in this procedure becomes invalid if HiRDB is terminated normally or through a planned termination. Therefore, change the pdbuffer operand specification while HiRDB is stopped. An example of the pdbuffer operand specification follows:

                         :
pdbuffer -a gbuf02 -r RDAREA1,RDAREA2,RDAREA3 -n 1000
                         :

Explanation
The added RDAREA (RDAREA2) is assigned to a global buffer (gbuf02).

You can use the system reconfiguration command (pdchgconf command) to change the pdbuffer operand specification while HiRDB is running. Note that HiRDB Advanced High Availability must be installed as a prerequisite for using the system reconfiguration command. For details about changing HiRDB system definitions using the system reconfiguration command, see 9.2 Modifying HiRDB system definitions while HiRDB is running (system reconfiguration command).

We recommend that after the command has executed you check whether the execution results are correct. For details about how to check command execution results, see the manual HiRDB Version 9 Command Reference.