Administration Guide

DB2 SP HACMP ES Installation

To help you plan for the installation of HACMP ES with DB2 Universal Database, following is a step-by-step overview of the installation and migration processes.

DB2 SP HACMP ES New Installation

To install HACMP ES:

  1. Install the AIX operating system on each SP node, (refer to the SP Installation and Administration Guides). Ensure that proper paging space is available on both the control workstation, and each of the SP nodes. Ensure that switch configuration has been considered and implemented, along with any other modifiable configuration parameters. Put in place the SP monitoring (Perspectives) that you want to use. Ensure that the SP dsh, pcp, and pexec commands work.
  2. Design your database layout. This should, at a minimum, include the number of nodes to be used, the mapping of DB2 database partitions to physical nodes, the disk requirements per node or partition, and table space considerations. You should also consider who the main DB2 instance owner will be, and what access authorization this and other users will require.
  3. Plan your external SSA disk configuration, including redundant adapters, mirrored disks, and the twin-tailing of disks.
  4. Using your database layout and SSA configuration, complete the HACMP worksheets located in the HACMP Planning, Installation, and Administration Guides.
  5. Implement your external SSA disk configuration. Ensure that microcode levels are consistent across all drives, and use the Maymap utility to validate and fill in any gaps in your worksheets.
  6. Install DB2 UDB EEE on each SP node.
  7. Install HACMP ES on each SP node.
  8. Install the DB2 UDB EEE HACMP ES on SP Package, using the db2_inst_ha command.
  9. Create the main DB2 instance user, and ensure that it can access all nodes. This is not a highly available user at this point. This can be temporarily an SP user on the SP control workstation.
  10. Create your DB2 instance and database. Ensure that it is operational by invoking db2start, and then db2stop, before proceeding to the next step.
  11. If you want to load the database before adding HACMP, do this now.
  12. Configure HACMP ES on the SP nodes topology and resource groups according to the HACMP worksheets and the information in this document.
  13. Beginning with your NFS server node for the main DB2 instance user, change this user (by modifying /etc/security/user and /etc/passwd on all nodes, in accordance with what is specified in this document. This user will become a highly available NFS user; and this node and its backup will update /etc/exports. All nodes will be able to mount this directory using NFS (with an entry in /etc/filesystems on each node) through the switch alias IP addresses.
  14. "Tar" the home directory of the main instance user and "un-tar" the home directory in the new location.
  15. Create an NFS file system on each of the SP nodes to mount a new main instance home directory.
  16. Start HACMP on the NFS server node. Verify that it comes up successfully by investigating /tmp/hacmp.out. The ha_mon command can be used to monitor this file as it is written.
  17. Bring up the other nodes one at a time, verifying each successful completion by investigating /tmp/hacmp.out. The ha_mon command can be used to monitor this file as it is written.
  18. Set up the optional monitoring through Perspectives and Problem Management.
  19. Validate failover functionality on each node by simulating a concurrent maintenance action on each node. The ha_cmd command (specifying the TAKE option) can be used to stop HACMP gracefully with takeover. Verify that the takeovers and the reintegrations are successful by interrogating /tmp/hacmp.out and using your monitoring tools.

DB2 SP HACMP ES Migration

If you are migrating from a non-HACMP installation to one with HACMP, consider the following overview:

  1. Convert your existing external disks to a highly available, twin-tailed, mirrored configuration. Add any extra hardware and disks to achieve this configuration, remembering that names of different logical volumes on different nodes must be unique when they are twin-tailed. This applies to volume groups, logical volumes, and file systems.
  2. Complete the HACMP planning and the related worksheets, including the worksheets in this document.
  3. Implement your external SSA disk configuration changes. Ensure that microcode levels are consistent across all drives, and use the Maymap utility to validate and eliminate any gaps in the worksheets.
    Note:SSA disks in a RAID5 configuration is supported. Two SSA adapters in the same RAID loop is the only configuration permitted. For an HACMP configuration with the RAID disks twin-tailed, only one adapter per node is supported. In this configuration, the adapter is a single point of failure for access to the disks, and extra configuration is recommended to detect the adapter outage and promote this to an HACMP failover event. AIX error notification is the simplest way to configure a node for failover, should the SSA adapter fail. Refer to HACMP for AIX, V4.2.2, Enhanced Scalability Installation and Administration Guide for more information about AIX error notification.
  4. Install HACMP ES on each SP node.
  5. Install the DB2 UDB EEE HACMP ES on SP Package, using the db2_inst_ha command.
  6. Configure HACMP ES on the SP nodes topology and resource groups according to the HACMP worksheets and the information in this document.
  7. Beginning with your NFS server node for the main DB2 instance user, change this user (by modifying /etc/security/user and /etc/passwd on all nodes, in accordance with what is specified in this document. This user will become a highly available NFS user; and this node and its backup will update /etc/exports. All nodes will be able to mount this directory using NFS (with an entry in /etc/filesystems on each node) through the switch alias IP addresses.
  8. "Tar" the home directory of the main instance user and "un-tar" the home directory in the new location.
  9. Create an NFS file system on each of the SP nodes to mount a new main instance home directory.
  10. Start HACMP on the NFS server node. Verify that it comes up successfully by investigating /tmp/hacmp.out. The ha_mon command can be used to monitor this file as it is written.
  11. Bring up the other nodes one at a time, verifying each successful completion by investigating /tmp/hacmp.out. The ha_mon command can be used to monitor this file as it is written.
  12. Set up the optional monitoring through Perspectives and Problem Management.
  13. Validate failover functionality on each node by simulating a concurrent maintenance action on each node. The ha_cmd command (specifying the TAKE option) can be used to stop HACMP gracefully with takeover. Verify that the takeovers and the reintegrations are successful by interrogating /tmp/hacmp.out and using your monitoring tools.

DB2 SP HACMP ES Worksheets

The following worksheets are designed to be used with HACMP worksheets that should be completed in preparation for your external SSA disk configuration (and that are located in the HACMP Planning, Installation, and Administration Guides). In each case, both a completed example, and a blank worksheet, are provided.

The database configuration on external disks documented in the first sample worksheet is shown in the following figure. The statement used to create the database is:

   db2 create database pwq on /newdata

Both SSA external adapters and external SSA disks are mirrored and twin-tailed for logical volumes with no single point of failure. The diagram depicts a configuration that is similar to output from the maymap command. Maymap is a utility (available through AIXTOOLS) that shows the external SSA disk configuration, and should be used when planning your setup.

Figure 113. Sample DB2 4-node Database External Disks Setup

Sample DB2 4-node Database External Disks Setup

Before you review the following table, you should read the HACMP documentation regarding the quorum settings on volume groups, and mirrored write consistency settings on logical volumes. The settings used for both will directly affect your availability and performance. Ensure that you review these settings and understand their implications. The typical setting for both "quorum" and "mirrored write consistency" is "off".

Table 57. HACMP Volume Groups, Logical Volumes, and File Systems
SP Node Volume Group Name PP Size (MB) Logical Volume Name # of PPs Copies hdisk List File System Mount Point (MB) File System Log Logical Volume Node Description and Backup User Owner of /dev Logical Device
3 havg3 8 hlv300 10 2 hdisk1 hdisk5 /newdata /pwq /NODE0003 hlog301 Catalognode mount point; node 4 root *
3 havg3 8 hlog301 1 2 hdisk1 hdisk5 N/A N/A Catalognode jfslog; node 4 root *
3 havg3 8 hlv301 10 2 hdisk2 hdisk6 N/A N/A Catalognode rawtemp space; node 4 pwq **
4 havg4 8 hlv400 10 2 hdisk3 hdisk7 /dbmnt hlog401 nfsserver pwq home; node 3 root *
4 havg4 8 hlog401 1 2 hdisk3 hdisk7 N/A N/A nfsserver jfslog; node 3 root *
5 havg5 8 hlv500 10 2 hdisk1 hdisk9 /newdata/ pwq/ NODE0005 HLOG501 Dbnode5 mount point; node 6 root *
5 havg5 8 hlog501 1 2 hdisk1 hdisk9 N/A N/A Dbnode5 jfslog; node 6 root *
5 havg5 8 hlv501 10 2 hdisk2 hdisk10 N/A N/A Dbnode5 raw temp space; node 6 pwq **
5 havg5 8 hlv502 100 2 hdisk2 hdisk10 N/A N/A Dbnode5 raw table space; node 6 pwq **
5 havg5 8 halv503 100 2 hdisk3 hdisk11 N/A N/A Dbnode5 raw table space; node 6 pwq **
5 havg5 8 halv504 100 2 hdisk3 hdisk11 N/A N/A Dbnode5 raw table space; node 6 pwq **
5 havg5 8 halv505 100 2 hdisk4 hdisk12 /dbdata5 hlog501 Dbnode6 system table space; node 6 root *
6 havg6 8 hlv600 10 2 hdisk5 hdisk13 /newdata/ pwq/ NODE0006 hlog601 Dbnode6 mount point; node 5 root *
6 havg6 8 hlog601 1 2 hdisk5 hdisk13 N/A N/A Dbnode6 jfslog; node 5 root *
6 havg6 8 hlv601 10 2 hdisk6 hdisk14 N/A N/A Dbnode6 raw temp space; node 5 pwq **
6 havg6 8 hlv602 100 2 hdisk6 hdisk14 N/A N/A Dbnode6 raw table space; node 5 pwq **
6 havg6 8 hlv603 100 2 hdisk7 hdisk15 N/A N/A Dbnode6 raw table space; node 5 pwq **
6 havg6 8 hlv604 100 2 hdisk7 hdisk15 N/A N/A Dbnode6 raw table space; node 5 pwq **
6 havg6 8 hlv605 100 2 hdisk8 hdisk16 /dbdata6 hlog601 Dbnode6 system table space; node 5 root *

Notes:

  1. * jfs file system logical volumes and logs keep root permissions.

  2. ** raw database spaces get database user permissions on /dev raw file entries (/dev/rxxxx).


Table 58. HACMP Volume Groups, Logical Volumes, and File Systems - Blank
SP Node Volume Group Name PP Size (MB) Logical Volume Name # of PPs Copies hdisk List File System Mount Point (MB) File System Log Logical Volume Node Description and Backup User Owner of /dev Logical Device

 

 











 

 











 

 











 

 











 

 











 

 











 

 











 

 











 

 











 

 











 

 











 

 











 

 











 

 











 

 











 

 











 

 











 

 











 

 











 

 











 

 











 

 











 

 











 

 











 

 











 

 











 

 











 

 











 

 











 

 












Table 59. Planning HACMP NFS Server
SP Node External File System Backup Node SP Switch Boot and Service IP Alias Pairs File System to Mount (/etc/filesystems) File System to Specify as Database Home Directory Addresses to which File System is to be Exported (/etc/exports)
3 /dbmnt 4 nfs_boot_3 nfs_client_3 nfs_server:/ dbmnt as /dbi /dbi/pwq nfs_boot_3 nfs_client_3 nfs_server_boot nfs_server nfs_boot_5 nfs_client_5 nfs_boot_6 nfs_client_6
4 /dbmnt 3 nfs_server_boot nfs_server nfs_server:/ dbmnt as /dbi /dbi/pwq nfs_boot_3 nfs_client_3 nfs_server_boot nfs_server nfs_boot_5 nfs_client_5 nfs_boot_6 nfs_client_6
5 N/A N/A nfs_boot_5 nfs_client_5 nfs_server:/ dbmnt as /dbi /dbi/pwq N/A
6 N/A N/A nfs_boot_6 nfs_client_6 nfs_server:/ dbmnt as /dbi /dbi/pwq N/A

Notes:

  1. /etc/passwd must be the same on all nodes. This can be synchronized from the control workstation.

  2. Ensure that the external file system has the permission of the database instance owner.

  3. The /etc/filesystems must have the mount parameters: hard, bg, intr, and rw.

  4. The /etc/exports will have
       -root=ip1:ip2:ip3
    
    only on the server and its backup.


Table 60. Planning HACMP NFS Server - Blank
SP Node External File System Backup Node SP Switch Boot and Service IP Alias Pairs File System to Mount (/etc/filesystems) File System to Specify as Database Home Directory Addresses to which File System is to be Exported (/etc/exports)

 

 







 

 







 

 







 

 







 

 







 

 







 

 







 

 







 

 







 

 







 

 







 

 







 

 







 

 







 

 







 

 







 

 







 

 







 

 







 

 








[ Top of Page | Previous Page | Next Page ]