Problem
If UseFence is set to SCSI3 and powerpath environment is set, then switching the service group with DiskGroup resource may cause following messages to appear in syslog:
reservation conflict
Error Message
From the DMP events log:
4753 <timestamp>: SCSI error occured on Path sdba: opcode=0x5f reported reservation conflict (status=0xc, key=0x0, asc=0x0, ascq=0x0)
4754 <timestamp>: SCSI error occured on Path sdax: opcode=0x5f reported unit attention (status=0x1, key=0x6, asc=0x2a, ascq=0x5)
4755 <timestamp>: SCSI error occured on Path sday: opcode=0x5f reported unit attention (status=0x1, key=0x6, asc=0x2a, ascq=0x5)
4758 <timestamp>: SCSI error occured on Path sdau: opcode=0x5f reported unit attention (status=0x1, key=0x6, asc=0x2a, ascq=0x5)
4761 <timestamp>: SCSI error occured on Path sdaw: opcode=0x5f reported reservation conflict (status=0xc, key=0x0, asc=0x0, ascq=0x0)
4763 <timestamp>: SCSI error occured on Path sdas: opcode=0x5f reported reservation conflict (status=0xc, key=0x0, asc=0x0, ascq=0x0)
4765 <timestamp>: SCSI error occured on Path sdat: opcode=0x5f reported reservation conflict (status=0xc, key=0x0, asc=0x0, ascq=0x0)
From system logs:
<hostname> vxvm:vxconfigd: V-5-1-11401 : dg import with I/O fence enabled
<hostname> vxvm:vxconfigd: V-5-1-11401 datadg: dg import with I/O fence enabled
<hostname> kernel: sd 1:0:1:1: reservation conflict
<hostname> kernel: sd 1:0:1:3: reservation conflict
<hostname> kernel: sd 1:0:1:4: reservation conflict
<hostname> kernel: sd 1:0:1:2: reservation conflict
Solution
Customer has Veritas Cluster Server (VCS) configuration with SCSI3 fencing enabled and configured.
When VCS brings the diskgroup resource online it will use the "groupreserve" option with the command `vxdg import`. As part of the DiskGroup Agent VCS online operation will register keys on the data disks that are being imported. During the import and registration of the key "reservation conflict" is seen in syslog. This is expected behaviour. Once the keys are registered "reservation conflict" messages will no longer be received.
Note: Manually importing a diskgroup without specifically using the option "groupreserve" will not result in "reservation conflict" message. This is because import of a local diskgroup will not automatically register keys when SCSI fencing enabled. Please see man page for vxdg specifically the groupreserve option definition and the difference between local and shared diskgroup behaviour when fencing is enabled.
The -o groupreserve=fence_key option specifies the I/O fencing key for a disk group. If the -o verify
option is also specified, the import of a private disk group fails if the SCSI-3 PR keys have not been
registered on all the paths to the disks. This ensures that a host is not fenced off while importing
the disk group, and that two nodes cannot attempt to fence the disk group at the same time.
When importing a private disk group on which I/O fencing is enabled, the -o groupreserve option must
be used to specify the I/O fencing key explicitly. The specified I/O fencing key, fence_key, must be
no longer than 7 bytes.
When importing a shared disk group on which I/O fencing is enabled, there is no need to specify the
key explicitly provided that the appropriate I/O fencing licenses have been installed, and that clus-
ter-wide fencing has been enabled. The I/O fencing key is automatically created on import.