|
From: Yevheniy D. <zh...@uv...> - 2017-02-22 21:30:39
|
Hello!
There is a bug in onecore driver preventing using persistent
reservations, it causes scst_init_session to always registers new
sessions with transport id 00:00:00:00:00:00:00:00. Consequently, all
registered keys have same meaningless transport id like "FCP-2
00:00:00:00:00:00:00:00/1".
#tail /var/log/kern.log: (notice line scst_init_session:7673)
eb 22 19:33:21 storage2-1 kernel: [fc0] Link Up, NPORT, speed is 4000
Feb 22 19:33:21 storage2-1 kernel: [fc0] [010000.dctl01] found
(initiator) WWPN eui.2FFC00C0DD1376AD WWNN eui.100000C0DD1376AD
Feb 22 19:33:21 storage2-1 kernel: [fc0] [010000.dctl01]
ocs_scsi_new_initiator new initiator: 010000.dctl01 name
2f:fc:00:c0:dd:13:76:ad
Feb 22 19:33:21 storage2-1 kernel: [21107]: scst:
scst_init_session:7652:Using security group "10:00:00:90:fa:08:d5:ba"
for initiator "2f:fc:00:c0:dd:13:76:ad" (target 10:00:00:90:fa:08:d5:ba)
Feb 22 19:33:21 storage2-1 kernel: [21107]: scst_init_session:7673:sess
ffff880857924a80 (ini 2f:fc:00:c0:dd:13:76:ad), transport id
00:00:00:00:00:00:00:00/1
Feb 22 19:33:21 storage2-1 kernel: [fc0] [010000.dctl01]
ocs_scst_worker_thread registered new initiator: 2f:fc:00:c0:dd:13:76:ad
(ffff880857924a80)
Feb 22 19:33:21 storage2-1 kernel: [fc0] [010000.010200] found
(initiator) WWPN eui.10000090FA8132A6 WWNN eui.20000090FA8132A6
Feb 22 19:33:21 storage2-1 kernel: [fc0] [010000.010200]
ocs_scsi_new_initiator new initiator: 010000.010200 name
10:00:00:90:fa:81:32:a6
Feb 22 19:33:21 storage2-1 kernel: [21107]: scst:
scst_init_session:7652:Using security group "oikt_esx_rek" for initiator
"10:00:00:90:fa:81:32:a6" (target 10:00:00:90:fa:08:d5:ba)
#sg_persist -n -o --register --param-sark abcd /dev/sde
#sg_persist -i -n -s /dev/sde
PR generation=0x1
Key=0xabcd
All target ports bit clear
Relative port address: 0x1
not reservation holder
Transport Id of initiator:
FCP-2 World Wide Name:
00 00 00 00 00 00 00 00 00 ........
#echo 1 > /sys/kernel/scst_tgt/devices/TOESC_SBD/dump_prs
Feb 22 20:33:25 storage2-1 kernel: [1807]: scst:
scst_pr_dump_prs:242:Persistent reservations for device TOESC_SBD:
Feb 22 20:33:25 storage2-1 kernel: [1807]: scst: scst_pr_dump_prs:257:
[0] registrant 00:00:00:00:00:00:00:00/1, key 000000000000abcd (reg
ffff880873bcb400, tgt_dev ffff880857bb8440)
This behaviour leads to a bunch of problems on clustered initiators and
breaks PR on vmware esx completely.
Proposed patch is self-explaining the reason of the problem, the wwpn
variable was set to 0 and never changed.
diff -r -U3 a/driver/linux/common/ocs_scst/ocs_scst.c
b/driver/linux/common/ocs_scst/ocs_scst.c
--- a/driver/linux/common/ocs_scst/ocs_scst.c 2015-06-09
21:01:43.000000000 +0200
+++ b/driver/linux/common/ocs_scst/ocs_scst.c 2017-02-22
21:07:36.883875928 +0100
@@ -767,6 +767,7 @@
ocs_memset(node->tgt_node.scsi_transport_id, 0,
sizeof(node->tgt_node.scsi_transport_id));
node->tgt_node.scsi_transport_id[0] =
OCS_SCST_TRANSPORT_ID;
#if defined(OCS_INCLUDE_FC)
+ wwpn = ocs_htobe64(ocs_node_get_wwpn(node));
ocs_memcpy(&node->tgt_node.scsi_transport_id[8], &wwpn, sizeof(wwpn));
#else
I've send this email also to broadcom support, but i think its OK to
have it here in scst-devel list in case somebody else hits the problem.
With best regards,
--
Ing. Evzen Demcenko
Senior Linux Administrator
UVT s.r.o.
|