Nonstop Database, HiRDB Version 9 System Operation Guide

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

15.9.2 Example 1 (Moving RDAREAs to the back-end server on a new server machine)

In this example, RDAREAs are 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) Use the pdhold command to place the RDAREAs being moved in shutdown and closed status
(4) Create a control statements file for the pdmod command
(5) Use the pdmod command to move the RDAREAs
(6) Use the pdstop command to terminate HiRDB normally
(7) Transfer the HiRDB files comprising the RDAREAs being moved
(8) Use the pdstart command to start HiRDB normally
(9) 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) Use the pdhold command to place the RDAREAs being moved in shutdown and closed status

 
pdhold -r RDAREA1,RDAREA2,RDAREA3 -c
 

(4) 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,RDAREA3                1
   to bes2;                                        2
 

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

(5) 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.

(6) Use the pdstop command to terminate HiRDB normally

 
pdstop
 

(7) 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 the following to 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
 

Explanation
Transfers the HiRDB file system areas for RDAREA1 through RDAREA3.
(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/rdarea3 /tmp/bk_rdarea3          1
rcp /tmp/"bk_*" host2:/tmp/                     2
pdfrm /area1/rdarea1                            3
pdfrm /area2/rdarea2                            3
pdfrm /area3/rdarea3                            3
 

Explanation
  1. Backs up the HiRDB files of RDAREA1 through RDAREA3.
  2. Moves the backups of the HiRDB files.
  3. Deletes the HiRDB files of RDAREA1 through RDAREA3.

[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
pdfrstr /tmp/bk_rdarea1 /area1                 2
pdfrstr /tmp/bk_rdarea2 /area2                 2
pdfrstr /tmp/bk_rdarea3 /area3                 2
 

Explanation
  1. Creates the HiRDB files system areas for RDAREA1 to RDAREA3. 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 RDAREA3.

(8) Use the pdstart command to start HiRDB normally

 
pdstart
 

(9) 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.