Recovering through a Db2 pureScale server upgrade (Linux and UNIX)

Use this procedure to recover one or more databases through a Db2 pureScale Linux® or UNIX server upgrade.

Before you begin

  • Ensure that you are familiar with the details and restrictions that are discussed in Recovering through a Db2 server upgrade.
  • Ensure that the backup image that is used for the recovery operation is accessible and validated.
  • IBM® Spectrum Scale levels stay at the levels that are used by Db2 11.5.
  • IBM Tivoli® System Automation for Multiplatforms (Tivoli SA MP) levels stay at the levels that are used by Db2 11.5.
Important: As the instance owner, it is your responsibility to save your log files before you start the recovery process. Saving your log files is necessary as some or all of the log files in the active or mirror log paths might not be archived. The recovery procedure requires you to drop the database, which deletes all of those log files.
Locate your primary and mirror log files and save them to a folder. You will need them when you run the ROLLFORWARD command (see step 12), and until a new online full database backup is completed and verified.
Note: For multi-database environments, the log files should be saved for all databases that require recovery.

Procedure

  1. As a user with SYSADM authority, log on to the Db2 server. Run list database directory to view the restore path of the database.
    Note: For multi-database environments, complete these actions for all databases that require recovery.
  2. As a user with SYSADM authority, log on to the Db2 server. Ensure that you have saved your log files and then run DROP DATABASE to drop all databases that need recovery in Db2 11.5.
  3. As the instance owner, run db2stop to stop the instance.
  4. As the root user, log on to the Db2 server and run the following command to determine your IBM Spectrum Scale file system name:
    <db2dir>/bin/db2cluster -cfs -list -filesystem
    where DB2DIR represents the installation location of your Db2 copy.
    The following example shows sample output from running this command:
    FILE SYSTEM NAME         MOUNT_POINT
    ----------------         -----------
    db2fs1                  /db2sd_20091027220651
  5. Run db2idrop to drop your Db2 11.5 instance.
    <db2dir>/instance/db2idrop -g <instance_name>
    Note: This command does not remove the database files nor IBM Spectrum Scale
  6. Run db2icrt to recreate your pre-Db2 11.5 instance. Use the same set of options for db2icrt that you used to create your Db2 11.5 instance. Use the MOUNT_POINT output that is identified in step 4 as a parameter to -instance_shared_dir.
    <db2dir>/instance/db2icrt -d -m <member hostname> -mnet <member netname> -cf <CF hostname> -cfnet <cfnet cfnetname> -instance_shared_dir <MOUNT_POINT output> -tbdev <tiebreaker device name> -u <fenced user id> -tbdev <instance owner id>
    
  7. Run db2iupdt to add members:
    <db2dir>/instance/db2iupdt -add -m <member hostname> -mnet <member netname> <instancename>
  8. Run db2iupdt again to add a cluster caching facility (CF):
    <db2dir>/instance/db2iupdt -add -cf <secondary CF hostname> -mnet <cf hostname> <instancename>
  9. Run UPDATE DATABASE MANAGER CONFIGURATION to restore the database manager configuration parameter values for each instance.
  10. As instance owner, run db2start to start the Db2 instance.
  11. For each database that needs recovery, run RESTORE DATABASE. Running the command restores your databases from a pre-Db2 11.5 backup to the database paths listed in step 1.
  12. Run ROLLFORWARD DATABASE to roll forward all databases that were restored in step 11 to a point in time before the failure. Make the log files (that you saved previously) available to the ROLLFORWARD command by copying them back into the active log paths, or by including the OVERFLOW LOG PATH parameter in the command. If log archiving is being used, ensure that the archive location is available. When the rollforward operation hits SQL2463N or SQL2464N, the end of the release is reached.
  13. As the instance owner, run db2stop to stop the instance.
  14. Run UNCATALOG DATABASE to uncatalog all databases.
  15. As the root user, log on to the Db2 server and move the prior release's sqllib and sqllib_shared directory.
  16. As the root user, run db2iupgrade to upgrade the instance to Db2 11.5:
    <db2dir>/instance/db2iupgrade -g -u <fenced id> <instance owner name>
    Rebuild the contents of the network resiliency condition and response resources:
    <db2dir>/bin/db2cluster -cfs -repair -network_resiliency -all
  17. As the instance owner, run db2start to start the instance.
  18. Run CATALOG DATABASE to catalog all databases.
  19. For all databases that need recovery, continue the rollforward operation from step 12 until complete.

What to do next

See Recovering through a Db2 server upgrade.