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
- Log in as the instance user.
- Stop the database manager by running the following command:
- Stop instances by running the following command on all hosts:
db2stop instance on <hostname>
- Log in as root user.
- Enter cluster manager maintenance mode for all hosts by running the following
command:
db2cluster -cm -enter -maintenance -all
- Stop GPFS on all hosts by running the db2cluster -cfs -stop -all
command.
<DB2DIR>/db2cluster -cfs -stop -all
- On Linux:
- Find the filesystems as the instance
user:
coralm201:/home/madhusuk >db2cluster -cfs -list -filesystem
FILE SYSTEM NAME MOUNT_POINT
--------------------------------- -------------------------
fs /fs
- 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
- Find the information for that disk by running the tsprinquiry command as
root:
coralm201:# /usr/lpp/mmfs/bin/tsprinquiry sdc
IBM :VirtualDisk :0730
- 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
- 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.
- 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
- As root user, exit cluster manager maintenance mode by running the following
command:
db2cluster -cm -exit -maintenance -all
- As the root user, start GPFS on all nodes by running the following command:
db2cluster -cfs -start -all
- 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
- As the instance user, start instances by running the following command on all
hosts:
db2start instance on <hostname>
- As the instance user, start the database manager by running the following command:
Results
You can now use the Db2
pureScale shared file
systems with SCSI-3 Persistent Reserve.