Db2 Requirements

Ensure that all prerequisites that are required for your IBM Spectrum Protect Plus Db2 application agent are in place before you start protecting Db2 data with IBM Spectrum Protect Plus.

Space prerequisites

Ensure that you have adequate space available to store backups as defined in your SLA. For more information about space requirements, see Space requirements for Db2 backups. When you are restoring data to an alternate location, you must ensure that you have allocated extra dedicated volumes for the copying and restoring procedures. The data paths for table spaces and logs on the target host are the same as those of the original host but are on separate volumes. This setup is required for mounting the data from the vSnap volume.

Configuration prerequisites

Ensure that your Db2 environment is configured to meet the following criteria:

  • Db2 is configured for single partitioned databases only. Backups of multi-partition Db2 databases are not supported.
  • Db2 archive logging is activated.
  • Db2 tables spaces are separated from log files with each on dedicated logical volumes that are managed by Linux Logical Volume Manager (LVM2) or by AIX Journaling File System (JFS2).
  • If you are running IBM Spectrum Protect Plus in an AIX environment, ensure that you have the recommended version of sudo installed as detailed in the Prerequisites document for your version.
  • Ensure that the SSH service is running on port 22 on the server and that firewalls are configured to allow IBM Spectrum Protect Plus to connect to the server with SSH. The SFTP subsystem for SSH must be enabled.
  • Db2 pureScale is not supported.
  • Ensure that you do not have nested mount points.

Space requirements for Db2 protection

Before you start backing up DB2® databases and log files, ensure that you have enough free space. Extra space is required to store temporarily LVM backups of logical volumes that the Db2 database and logs files are running on. To create LVM snapshots of a protected Db2 database, sufficient free space is required on all volume groups that contain Db2 data and log files.

LVM snapshots

LVM snapshots are point-in-time copies of LVM logical volumes. They are space efficient snapshots that reflect changed data on the source logical volume that is then written to the LVM snapshot volume. LVM snapshots are created in the same volume group as the source logical volume. The IBM Spectrum Protect™ Plus Db2 application server, uses LVM snapshots to temporarily create a consistent point-in-time copy of the Db2 database.

Once IBM Spectrum Protect Plus Db2 application server creates the LVM snapshot, it is mounted and a file copy operation to the vSnap repository is started. The duration of the file copy operation depends on the size of the Db2 database. During this file copy operation, the Db2 application remains fully online. After the file copy operation finishes, the LVM snapshots are removed by the IBM Spectrum Protect Plus Db2 application server in a cleanup operation.

Note:

  • On Linux, LVM snapshots are created with Linux lvm2 LVM commands.
  • On AIX, LVM snapshots are created with the AIX snapshot command as external JFS2 snapshots.

For AIX, no more than 15 snapshots can exist on each filesystem or JFS2 file system. Internal and external JFS2 snapshots cannot exist at the same time for the same file system.

For each LVM or JFS2 snapshot logical volume, you must allow at least 10% free space in the volume group. If there is sufficient free space in the volume group, the IBM Spectrum Protect Plus Db2 application server reserves up to 25% of the source logical volume size for the snapshot logical volume. After the snapshot reaches 50% of the source logical volume size, the snapshot is automatically switched offline by the LVM, and the file copying stops. A failure notification is sent to the logs and the backup operation terminates.

LVM2 and JFS2

When you run a DB2® backup operation, Db2 requests a snapshot. This snapshot is created on an or for each logical volume with data or logs for the selected database. In Linux systems, the logical volumes need to be managed by LVM2. On AIX®, file systems must be of type JFS2.

A software-based LVM2 or JFS2 snapshot is taken on a storage array. The snapshot volumes are mounted on the same machine that runs the Db2 instance so that they can be transferred to the vSnap repository.

On Linux, the LVM2 volume manager stores the snapshot of a logical volume within the same volume group. There must be enough space to store this logical volume on that machine. The logical volume grows in size when the parent logical volume grows in size.

Setting sudo privileges for IBM Spectrum Protect Plus

Set up a dedicated IBM Spectrum Protect Plus agent user with the required super user privileges with sudo. This configuration enables sudoers to run commands without a password. DB2® instance owners need sudo privileges to be set up before they can use IBM Spectrum Protect Plus to detect Db2 instances.

  1. Create an application server user.
  2. For example, useradd -m <sppagent>
  3. Set a password for the new user.
  4. For example, passwd <sppagentpw>
  5. Set the !requiretty setting for your system.
  6. At the end of the sudoers configuration file /etc/sudoers, add these lines.
  7. Defaults:sppagent !requiretty
  8. sppagent ALL=(root) NOPASSWD:ALL
  9. If your sudoers file is configured to import configurations from another directory /etc/sudoers.d, you can add the lines in a new file in that directory.

 


IBM Spectrum Protect Plus 10.1.2

Licensed Material - Property of IBM Corp. © IBM Corporation and other(s) 2018. IBM is a registered trademark of the IBM Corporation in the United States, other countries, or both. | 8/23/2018