18.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 manual.

(2) Set partitions

Executor: Superuser

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

(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 manual.

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. Table 18-19 shows the owner and access privileges to be set for a HiRDB file system area.

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

Owner, access privilegesInformation to be setCommand to be executed*
OwnerUser IDHiRDB administratorchown command
Group IDHiRDB groupchgrp command
Access privilegeOwnerrw- (read and write operations permitted)chmod command
Grouprw- (read and write operations permitted)
Other--- (access denied)

* These are OS commands; for details, see the OS manual.

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

(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 may 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.
It is recommended that after the command has executed you check whether or not the execution results are correct. For details on how to check command execution results, see the manual HiRDB Version 8 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 may 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 an 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.
It is recommended that after the command has executed you check whether or not the execution results are correct. For details on how to check command execution results, see the manual HiRDB Version 8 Command Reference.

(7) Create system files

Create system files in the HiRDB file system area that was initialized in (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 19. 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 18.4.3 Actions to be taken in the event of an error in the master directory RDAREA.