fence_scsi with iSCSI Access
I have a cluster with two nodes. Both have an iscsi disk /dev/sdb.
I have checked on both nodes if the disk is supporting;
[root@d-cn1 ~]# sg_persist --in --report-capabilities -v /dev/sdb inquiry cdb: 12 00 00 00 24 00 LIO-ORG lvu30 4.0 Peripheral device type: disk Persistent reservation in cdb: 5e 02 00 00 00 00 00 20 00 00 Report capabilities response: Replace Lost Reservation Capable(RLR_C): 0 Compatible Reservation Handling(CRH): 1 Specify Initiator Ports Capable(SIP_C): 1 All Target Ports Capable(ATP_C): 1 Persist Through Power Loss Capable(PTPL_C): 1 Type Mask Valid(TMV): 1 Allow Commands: 1 Persist Through Power Loss Active(PTPL_A): 0 Support indicated in Type mask: Write Exclusive, all registrants: 1 Exclusive Access, registrants only: 1 Write Exclusive, registrants only: 1 Exclusive Access: 1 Write Exclusive: 1 Exclusive Access, all registrants: 1 [root@d-cn1 ~]#
[root@d-cn2 ~]# sg_persist --in --report-capabilities -v /dev/sdb inquiry cdb: 12 00 00 00 24 00 LIO-ORG lvu30 4.0 Peripheral device type: disk Persistent reservation in cdb: 5e 02 00 00 00 00 00 20 00 00 Report capabilities response: Replace Lost Reservation Capable(RLR_C): 0 Compatible Reservation Handling(CRH): 1 Specify Initiator Ports Capable(SIP_C): 1 All Target Ports Capable(ATP_C): 1 Persist Through Power Loss Capable(PTPL_C): 1 Type Mask Valid(TMV): 1 Allow Commands: 1 Persist Through Power Loss Active(PTPL_A): 0 Support indicated in Type mask: Write Exclusive, all registrants: 1 Exclusive Access, registrants only: 1 Write Exclusive, registrants only: 1 Exclusive Access: 1 Write Exclusive: 1 Exclusive Access, all registrants: 1 [root@d-cn2 ~]#
I have created a dence_scsi;
pcs stonith create scsi fence_scsi pcmk_host_list="d-cn1 d-cn2" pcmk_reboot_action="off" devices="/dev/sdb" meta provides="unfencing" --force
However, both nodes have the same key, and I think that's why fence_scsi is failing;
[root@d-amhs-cn1 ~]# sg_persist -i -n -r -d /dev/sdb PR generation=0x2, Reservation follows: Key=0xd00e0001 scope: LU_SCOPE, type: Write Exclusive, registrants only [root@d-amhs-cn1 ~]# [root@d-amhs-cn2 ~]# sg_persist -i -n -r -d /dev/sdb PR generation=0x2, Reservation follows: Key=0xd00e0001 scope: LU_SCOPE, type: Write Exclusive, registrants only [root@d-amhs-cn2 ~]#
and when I want to register a new key in this case;
[root@d-amhs-cn1 ~]# sg_persist --out --register --param-sark=0xDEADBEEF /dev/sdb LIO-ORG lvu30 4.0 Peripheral device type: disk PR out (Register): Reservation conflict sg_persist failed: Reservation conflict [root@d-amhs-cn1 ~]#
Shouldn't I see different PR generation on both nodes? How can I check further?
Responses