Nonstop Database, HiRDB Version 9 System Operation Guide

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

15.8.5 Example (method that automatically expands the HiRDB file system area)

This example adds a user RDAREA (RDAREA1) 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 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. 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) Modify the HiRDB system definition
(2) Use the pdfmkfs command to create a HiRDB file system area for the RDAREA
(3) Create the 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 make a backup
(7) Allocate a global buffer for the added RDAREA
(8) Update the pdbuffer operand

(1) Modify the HiRDB system definition

Modify the value specified for the pd_rdarea_extension_timing operand. In this example, use is specified as the automatic extension trigger. Furthermore, to initialize the area to be expanded during automatic extension, the pd_rdarea_expand_format operand is specified.

                         :
set pd_rdarea_extension_timing=use
set pd_rdarea_expand_format=Y
                         :

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 -k DB -a -i /rdarea/area01
 

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

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

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

 
create rdarea RDAREA1
   for user used by PUBLIC
   server name bes1
   page 4096 characters
   storage control segment 10 pages
   extension use 500 segments
   file name "/rdarea/area01/file01"
      initial 1000 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/area01/file01) to be allocated to the RDAREA (RDAREA1) is automatically expanded by 500 segments each time the automatic extension trigger occurs.

(4) Use the pdmod command to add the RDAREA

 
pdmod -a /pdmod/create01
 

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

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

 
pdlogswap -d sys -w
 

(6) Use the pdcopy command to make a backup

 
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 gbuf01 -r RDAREA1 -n 1000
 

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

Note, however, that both the following conditions must be satisfied in order to use 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 gbuf01 -r RDAREA1,RDAREA2,RDAREA3 -n 1000
                         :

Explanation
The added RDAREA (RDAREA1) is assigned to a global buffer (gbuf01).

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 in order to use 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 on how to check command execution results, see the manual HiRDB Version 9 Command Reference.