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. If you already have IBM Spectrum Scale installed and have a IBM Spectrum Scale cluster running , for example, if you have Db2 pureScale Feature Fix Pack 2 installed on your SLES hosts, then after moving to Db2 pureScale Feature Fix Pack 3, you can perform this task at any time before using the Db2 pureScale environment.

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 db2stop command.
  3. Log in as root user.
  4. Stop IBM Spectrum Scale on all hosts by running the db2cluster -cfs -stop -all command.
    <DB2DIR>/db2cluster -cfs -stop -all
    where DB2DIR represents the installation location.
  5. 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. i.e
      IBM:VirtualDisk:0730
  6. Tell IBM Spectrum Scale to use SCSI-3 Persistent Reserve by running the /usr/lpp/mmfs/bin/mmchconfig usePersistentReserve=yes command.
  7. As the root user, start IBM Spectrum Scale on all nodes by running the db2cluster -cfs -start -all command.
  8. Once the IBM Spectrum Scale filesystems are mounted on all hosts, check that SCSI-3 Persistent Reserve has been properly enabled by running the /usr/lpp/mmfs/bin/mmlsnsd -X command on all machines and checking that "pr=yes" appears in the Remarks column. 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
    	 
  9. As the instance user, start the database manager by running the db2start command.

Results

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