Enabling SCSI-3 Persistent Reserve for Db2 pureScale shared file systems

You can enable SCSI-3 Persistent Reserve for the Db2 pureScale shared file systems which will provide faster fail-over support. SCSI-3 Persistent Reserve technology allows for fast eviction and fencing of failed nodes in the cluster.

Before you begin

This task should be performed after you have installed the Db2 pureScale Feature and created your instance.

You need instance user and root user authority.

About this task

Not all disks support SCSI-3 Persistent Reserve. See Shared storage support for DB2® pureScale environments for a list of devices that support SCSI-3 Persistent Reserve.

Procedure

  1. Log in as the instance user.
  2. Stop the database manager by running the following command:
    db2stop
  3. Stop instances by running the following command on all hosts:
    db2stop instance on <hostname>
  4. Log in as root user.
  5. Enter cluster manager maintenance mode for all hosts by running the following command:
    db2cluster -cm -enter -maintenance -all
  6. Stop GPFS on all hosts by running the db2cluster -cfs -stop -all command.
    <DB2DIR>/db2cluster -cfs -stop -all
  7. On Linux:
    1. Find the filesystems as the instance user:
      coralm201:/home/madhusuk >db2cluster -cfs -list -filesystem 
      
          FILE SYSTEM NAME                              MOUNT_POINT 
          ---------------------------------      ------------------------- 
          fs                                                  /fs      
    2. Find the disk info for that filesystem as the instance user:
      coralm201:/home/madhusuk >db2cluster -cfs -list -filesystem fs -disk 
      
      PATH ON LOCAL HOST                      OTHER KNOWN PATHS 
      ---------------------------------      ------------------------- 
      (*) /dev/sdc
    3. Find the information for that disk by running the tsprinquiry command as root:
      coralm201:# /usr/lpp/mmfs/bin/tsprinquiry sdc 
      
      IBM    :VirtualDisk    :0730
    4. Create the /var/mmfs/etc/prcapdevices file on each host in the Db2 pureScale environment and edit the file to add the output from the tsprinquiry command. Here is an example of that output:
      IBM:VirtualDisk:0730
  8. Bring the mmsdrserv daemon online, for configuring parameters in GPFS, by running the following command on all hosts:
    /usr/lpp/mmfs/bin/mmcommon startCcrMonitor
    Note: Step 8 is only meant for Db2 version 11.5.4 and later.
  9. Use SCSI-3 Persistent Reserve (PR) in GPFS by running the following command on one host in the cluster (this change will be propagated to the other hosts in the cluster):
    /usr/lpp/mmfs/bin/mmchconfig usePersistentReserve=yes
  10. As root user, exit cluster manager maintenance mode by running the following command:
    db2cluster -cm -exit -maintenance -all
  11. As the root user, start GPFS on all nodes by running the following command:
    db2cluster -cfs -start -all
  12. Once the IBM Spectrum Scale filesystems are mounted on all hosts, check that SCSI-3 Persistent Reserve (PR) has been properly enabled by running the following command on all machines:
    column /usr/lpp/mmfs/bin/mmlsnsd -X
    And then checking that pr=yes appears in the Remarks column during the result. For example:
    coralm201:/usr/lpp/mmfs/bin # ./mmlsnsd -X
    
    Disk name  NSD volume ID    Device    Devtype  Node name                  Remarks
    ---------------------------------------------------------------------------------
    gpfs12nsd  091A5CBD4C6B8076 /dev/sdc  generic  coralm201.torolab.ibm.com  pr=yes
  13. As the instance user, start instances by running the following command on all hosts:
    db2start instance on <hostname>
  14. As the instance user, start the database manager by running the following command:
    db2start

Results

You can now use the Db2 pureScale shared file systems with SCSI-3 Persistent Reserve.