Before replacing the disk with a larger capacity disk, migrate resources at the data 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 data 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 data storage destination by using WebAdmin.
Back up files
If the disk at the data storage destination contains any required files, back up the files. It is not necessary to back up the data storage destination.
Stop applications
Stop applications that are using the database.
Back up the database cluster
Back up the latest resources at the data storage destination. Refer to "3.2.1 Using WebAdmin" for details.
Stop the instance
Stop the instance. Refer to "2.1.1 Using WebAdmin" for information on how to stop an instance.
Replace with a larger capacity disk
Replace the disk. Then, recover the volume configuration information.
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 the files
Restore the files backed up in step 1.
Follow the procedure below to replace the disk and migrate resources at the data storage destination by using server commands.
Back up files
If the disk at the data storage destination contains any required files, back up the files. It is not necessary to back up the data storage destination.
Stop applications
Stop applications that are using the database.
Back up the database cluster
Back up the latest resources at the data storage destination. Refer to "3.2.2 Using Server Commands" for details.
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 data storage destination
Create a data storage destination. If a tablespace was defined, also create a directory for it.
$ mkdir /database/inst1 $ chown fsepuser:fsepuser /database/inst1 $ chmod 700 /database/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 (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.