Before replacing the disk with a larger capacity disk, migrate resources at the transaction log storage destination using the backup and recovery features.
There are two methods of performing backup and recovery:
The following sections describe procedures that use each of these methods to replace the disk and migrate resources at the transaction log storage destination.
Point
It is recommended that you back up the database cluster following recovery. Backup deletes obsolete archive logs (transaction logs copied to the backup data storage destination), freeing up disk space and reducing the recovery time.
Follow the procedure below to replace the disk and migrate resources at the transaction log storage destination by using WebAdmin.
Back up files
If the disk at the transaction log storage destination contains any required files, back up the files. It is not necessary to back up the transaction log storage destination.
Back up the database cluster
Back up the latest data storage destination resources and transaction log storage destination resources (refer to "3.2.1 Using WebAdmin" for details).
Stop applications
Stop applications that are using the database.
Stop the instance
Stop the instance. Refer to "2.1.1 Using WebAdmin" for information on how to stop an instance. WebAdmin automatically stops instances if recovery of the database cluster is performed without stopping the instance.
Replace with a larger capacity disk
Replace the disk. Then, recover the volume configuration information.
Create a tablespace directory
If a tablespace was defined after backing up, create a directory for it.
Recover the keystore, and enable automatic opening of the keystore
Do the following if the data in the database has been encrypted:
Restore the keystore to its state at the time of the database backup.
Enable automatic opening of the keystore.
Recover the database cluster
Log in to WebAdmin, and perform recovery operations. Refer to steps 4 ("Create a tablespace directory ") to 7 ("Run Recovery") under " If failure occurred in the data storage disk or the transaction log storage disk " in "17.1.1 Using WebAdmin" for information on the procedure. An instance is automatically started when recovery is successful.
Resume applications
Resume applications that are using the database.
Restore files
Restore the files backed up in step 1.
Follow the procedure below to replace the disk and migrate resources at the transaction log storage destination by using server commands.
Back up files
If the disk at the transaction log storage destination contains any required files, back up the files. It is not necessary to back up the transaction log storage destination.
Back up the database cluster
Use server commands to back up the latest data storage destination resources and transaction log storage destination resources. Refer to "3.2.2 Using Server Commands" for information on how to perform backup.
Stop applications
Stop applications that are using the database.
Stop the instance
After backup is complete, stop the instance. Refer to "2.1.2 Using Server Commands" for information on how to stop an instance.
If the instance fails to stop, refer to "17.11 Actions in Response to Failure to Stop an Instance".
Replace with a larger capacity disk
Replace the disk. Then, recover the volume configuration information.
Create a transaction log storage destination
Create a transaction log storage destination. If a tablespace was defined, also create a directory for it.
# mkdir /tranlog/inst1 # chown fsepuser:fsepuser /tranlog/inst1 # chmod 700 /tranlog/inst1
Recover the keystore, and enable automatic opening of the keystore
When the data in the database has been encrypted, restore the keystore to its state at the time of the database backup. Configure automatic opening of the keystore as necessary.
Recover the database cluster
Use the pgx_rcvall command to recover the database cluster.
Specify the data storage destination in the -D option. If the -D option is omitted, the value of the PGDATA environment variable is used by default.
Specify the backup storage directory in the -B option.
> pgx_rcvall -D /database/inst1 -B /backup/inst1
Note
If recovery fails, remove the cause of the error in accordance with the displayed error message and then re-execute the pgx_rcvall command.
If the message "pgx_rcvall: an error occurred during recovery" is displayed, then the log recorded when recovery was executed is output after this message. The cause of the error is output in around the last fifteen lines of the log, so remove the cause of the error in accordance with the message and then re-execute the pgx_rcvall command.
The following message displayed during recovery is output as part of normal operation of pgx_rcvall command (therefore the user does not need not be concerned).
FATAL: the database system is starting up
See
Refer to "pgx_rcvall" in the Reference for information on the pgx_rcvall command.
Start the instance
Start the instance.
Refer to "2.1.2 Using Server Commands" for information on how to start an instance.
Resume applications
Resume applications that are using the database.
Restore files
Restore the files backed up in step 1.