Nonstop Database, HiRDB Version 9 System Operation Guide

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

20.16 Handling of disk errors

Executor: HiRDB administrator and superuser

This sections explains the actions to take when a disk error occurs.

Procedure
  1. Initialize the hard disk.
  2. Set partitions.
  3. Initialize the UNIX file system (if regular files are being used).
  4. Change the owner and access privileges of the HiRDB file system area (if character special files are being used).
  5. Create a symbolic link to the file name.
  6. Initialize the HiRDB file system area.
  7. Create system files.
  8. Restore the RDAREAs.
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 section
(1) Initialize the hard disk
(2) Set partitions
(3) Initialize the UNIX file system (applicable to regular files)
(4) Change each character special file's owner and access privileges (applicable to character special files)
(5) Link the file names symbolically
(6) Initialize the HiRDB file system area
(7) Create system files
(8) Restore RDAREAs

(1) Initialize the hard disk

Executor: Superuser

Replace the hard disk, and initialize it.

Initialize the hard disk; for the procedure, see the OS documentation.

(2) Set partitions

Executor: Superuser

Set partitions on the initialized hard disk; for the procedure, see the OS documentation.

(3) Initialize the UNIX file system (applicable to regular files)

Executor: Superuser

If regular files had been used in the HiRDB file system area, initialize the partitions as a UNIX file system; for the procedure, see the OS documentation.

If the partitions are already initialized, skip this step.

(4) Change each character special file's owner and access privileges (applicable to character special files)

Executor: Superuser

Set the owner and access privileges for each HiRDB file system area to the previous information. The following table shows the owner and access privileges to be set for a HiRDB file system area.

Table 20-19 Owner and access privileges to be set for a HiRDB file system area

Owner, access privileges Information to be set Command to be executed#
Owner User ID HiRDB administrator chown command
Group ID HiRDB group chgrp command
Access privilege Owner rw- (read and write operations permitted) chmod command
Group rw- (read and write operations permitted)
Other --- (access denied)

#: These are OS commands; for details, see the OS documentation.

(5) Link the file names symbolically

Executor: Superuser

If a HiRDB file system area had been linked symbolically to a name, link the same name to the HiRDB file system area; the OS's ln command is used for this purpose (For details on the ln command, see the OS documentation).

(6) Initialize the HiRDB file system area

Executor: HiRDB administrator

Initialize each HiRDB file system area on the erroneous disk with the pdfmkfs command.

(a) System files created on the erroneous disk

Use the pdfmkfs command to initialize a HiRDB file system area for system files:

 
pdfmkfs -n 40 -l 5 -k SYS -i /sysfile_a
 

Explanation
-n: Specifies the size of the HiRDB file system area. Set the size of the HiRDB file system area to be initialized so that it does not exceed the partition size. If it exceeds the partition size, the partitions physically following the HiRDB file system area might be damaged.
-l: Specifies the maximum number of files that can be created in the HiRDB file system area.
-k SYS: Specifies that this is a HiRDB file system area for system files.
-i: Specifies that the entire HiRDB file system area is to be initialized.
/sysfile_a: Specifies a name for the HiRDB file system area.
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.
(b) RDAREAs created on the erroneous disk

Use the pdfmkfs command to initialize the HiRDB file system area for RDAREAs:

 
pdfmkfs -n 40 -l 5 -k DB -i /dbarea1
 

Explanation
-n: Specifies the size of the HiRDB file system area. Set the size of the HiRDB file system area to be initialized so that it does not exceed the partition size. If it exceeds the partition size, the partitions physically following the HiRDB file system area might be damaged.
-l: Specifies the maximum number of files that can be created in the HiRDB file system area.
-k DB: Specifies that this is a HiRDB file system area for RDAREAs.
-i: Specifies that the entire HiRDB file system area is to be initialized.
/dbarea1: Specifies a name for the HiRDB file system area.
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.

(7) Create system files

Create system files in the HiRDB file system area that was initialized in subsection (6)(a) above.

 
pdloginit -d sys -f /sysfile_a/log1a -n 2000          1
pdloginit -d sys -f /sysfile_a/log2a -n 2000
pdloginit -d sys -f /sysfile_a/log3a -n 2000
pdloginit -d sys -f /sysfile_a/log4a -n 2000
pdloginit -d spd -f /sysfile_a/sync1 -n 1000          2
pdloginit -d spd -f /sysfile_a/sync3 -n 1000
pdstsinit -u UNT1 -f /sysfile_a/usts1a -c 500         3
pdstsinit -u UNT1 -f /sysfile_a/usts2a -c 500
pdstsinit -s bes1 -f /sysfile_a/b1sts1a -c 500        4
pdstsinit -s bes1 -f /sysfile_a/b1sts2a -c 500
 

Explanation
  1. Creates system log files.
  2. Creates synchronization point dump files.
  3. Creates unit status files.
  4. Creates server status files.

(8) Restore RDAREAs

Restore the RDAREAs on the erroneous disk with the pdrstr command. For an example of restoring RDAREAs, see 21. Database Recovery Procedures.

Note
If the erroneous disk contains the master directory RDAREAs, start HiRDB with the pdstart -r command and use the pdrstr command to restore the master directory RDAREA. For details on how to handle an error in the master directory RDAREA, see 20.4.3 Actions to be taken in the event of an error in the master directory RDAREA.