Nonstop Database, HiRDB Version 9 System Operation Guide

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

15.9.6 Example 5 (Moving inner replica RDAREAs)

In this example, an inner replica group RDAREA is moved to a back-end server created on a new server machine.

Organization of this subsection
(1) Add unit 2
(2) Use the pdcopy command to back up the RDAREAs
(3) Create a control statements file for the pdmod command
(4) Use the pdmod command to register the generation number of the replica HiRDB file system areas
(5) Use the pdhold command to place the RDAREAs being moved in shutdown and closed status
(6) Create a control statements file for the pdmod command
(7) Use the pdmod command to move the RDAREAs
(8) Use the pdstop command to terminate HiRDB normally
(9) Transfer the HiRDB files comprising the RDAREAs being moved
(10) Use the pdstart command to start HiRDB normally
(11) Use the pdcopy command to back up the RDAREAs

(1) Add unit 2

For details about adding a unit, see 11.1 Adding a unit.

(2) Use the pdcopy command to back up the RDAREAs

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

Explanation
-m: Specifies the name of the first HiRDB file in the master directory RDAREA.
-M: Specifies the backup acquisition mode.
-a: Specifies that all RDAREAs are to be backed up. Because the master directory RDAREA and the data dictionary RDAREAs are updated when an RDAREA is moved, we recommend that you back up all RDAREAs at this time.
-b: Specifies the name of the backup file.
-p: Specifies the output destination of the pdcopy command's processing results listing.
For details about making backups, see 6. Backup Procedures.

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

This file is used to register the generation number of the replica HiRDB file system areas on the new back-end server. Create a control statements file (/pdmod/gen01) containing a create generation statement for the pdmod command. The following shows the contents of this control statements file:

 
create generation for HiRDB file system area
       "/area3"                                       1
       server name bes2                               2
       generation number 1                            3
       reproduce "/area1";                            4
create generation for HiRDB file system area
       "/area4"                                       1
       server name bes2                               2
       generation number 1                            3
       reproduce "/area2";                            4
 

Explanation
  1. Specifies the names of the replica HiRDB file system areas.
    When the pdmod command is executed, the KFPX24251-W message is issued. However, this does not pose a problem because you will create the HiRDB file system areas on the target server machine later in step (11).
  2. Specifies the name of the server to which the replica HiRDB files system areas are being moved.
  3. Specifies the generation number of the replica HiRDB file system areas.
  4. Specifies the original HiRDB file system areas.

(4) Use the pdmod command to register the generation number of the replica HiRDB file system areas

 
pdmod -a /pdmod/gen01
 

Explanation
-a: Specifies the name of the control statements file for the pdmod command.

(5) Use the pdhold command to place the RDAREAs being moved in shutdown and closed status

 
pdhold -r RDAREA1,RDAREA2,RDAREA1_R1,RDAREA2_R1 -c
 

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

Create a control statements file (/pdmod/move01) containing a move rdarea statement for the pdmod command. The following shows the contents of this control statements file:

 
move rdarea RDAREA1,RDAREA2,RDAREA1_R1,RDAREA2_R1            1
   to bes2;                                                  2
 

Explanation
  1. Specifies the names of the RDAREAs being moved.
  2. Specifies the name of the target server.

(7) Use the pdmod command to move the RDAREAs

 
pdmod -a /pdmod/move01
 

Explanation
-a: Specifies the name of the control statements file for the pdmod command.

(8) Use the pdstop command to terminate HiRDB normally

 
pdstop
 

(9) Transfer the HiRDB files comprising the RDAREAs being moved

Use one of the following methods to transfer the HiRDB files of the RDAREAs being moved to the new server machine.

(a) Transfer by HiRDB file system area

This method requires that the following be satisfied:

Use the operating system's rcp or ftp command to transfer the HiRDB file system areas.

 
rcp /area1 host2:/area1
rcp /area2 host2:/area2
rcp /area3 host2:/area3
rcp /area4 host2:/area4
 

Explanation
Transfers the HiRDB file system areas for RDAREA1 through RDAREA2, and for RDAREA1_R1 through RDAREA2_R1.
(b) Transfer by HiRDB file

If you cannot use the method described in (a), use the procedure described below to move the HiRDB files.

[Figure] Operations on the source machine
  1. Use the pdfbkup command to back up the HiRDB files to be moved.
  2. Use the rcp or ftp command to move the backups you made of the HiRDB files.
  3. Use the pdfrm command to delete the originals of the HiRDB files that you moved.

Example
 
pdfbkup /area1/rdarea1 /tmp/bk_rdarea1             1
pdfbkup /area2/rdarea2 /tmp/bk_rdarea2             1
pdfbkup /area3/rdarea1 /tmp/bk_rdarea1_r1          1
pdfbkup /area4/rdarea2 /tmp/bk_rdarea2_r1          1
rcp /tmp/"bk_*" host2:/tmp/                        2
pdfrm /area1/rdarea1                               3
pdfrm /area2/rdarea2                               3
pdfrm /area3/rdarea1                               3
pdfrm /area4/rdarea2                               3
 

Explanation
  1. Backs up the HiRDB files of RDAREA1 through RDAREA2, and of RDAREA1_R1 through RDAREA2_R1.
  2. Moves the backups of the HiRDB files.
  3. Deletes the HiRDB files of RDAREA1 to RDAREA2, and of RDAREA1_R1 to RDAREA2_R1

[Figure] Operations on the target machine
  1. Use the pdfmkfs command to create HiRDB file system areas.
  2. Use the pdfrstr command to restore the HiRDB files that you moved.

Example
 
pdfmkfs -n 30 -l 10 -k DB /area1               1
pdfmkfs -n 30 -l 10 -k DB /area2               1
pdfmkfs -n 30 -l 10 -k DB /area3               1
pdfmkfs -n 30 -l 10 -k DB /area4               1
pdfrstr /tmp/bk_rdarea1 /area1                 2
pdfrstr /tmp/bk_rdarea2 /area2                 2
pdfrstr /tmp/bk_rdarea1_r1 /area3              2
pdfrstr /tmp/bk_rdarea2_r1 /area4              2
 

Explanation
  1. Creates the HiRDB files system areas for RDAREA1 to RDAREA2, and for RDAREA1_R1 to RDAREA2_R1. Use the same path name as was used on the source machine. If you cannot use the same path name, create a symbolic link aliasing the original path to the directory on the target machine that contains the files.
  2. Lists the HiRDB files of RDAREA1 to RDAREA2, and of RDAREA1_R1 to RDAREA2_R1

(10) Use the pdstart command to start HiRDB normally

 
pdstart
 

(11) Use the pdcopy command to back up the RDAREAs

 
pdcopy -m /rdarea/mast/mast01 -M r -a -b /pdcopy/backup02 -p /pdcopy/list02
 

Explanation
-m: Specifies the name of the first HiRDB file in the master directory RDAREA.
-M: Specifies the backup acquisition mode.
-a: Specifies that all RDAREAs are to be backed up. Because the master directory RDAREA and the data dictionary RDAREAs are updated when an RDAREA is moved, we recommend that you back up all RDAREAs at this time.
-b: Specifies the name of the backup file.
-p: Specifies the output destination of the pdcopy command's processing results listing.
For details about making backups, see 6. Backup Procedures.