|
From: Vladislav B. <vs...@vl...> - 2016-02-27 03:52:01
|
Sebastian Herbszt wrote on 02/26/2016 03:02 PM: > Vladislav Bolkhovitin wrote: >> Hi, >> >> Recently I reviewed SCST ALUA code and figured out that some commands, e.g. TEST UNIT >> READY, were allowed in ALUA states, namely, "standby" and "offline" states, where they >> by SPC(-4) rules are not supposed to be allowed. This is not a big deal and formally >> not a violation, because according to the SPC "The device server may support other >> commands while in the [those] state[s]", but potentially might lead to bad initiators >> confusions leading to initiators start sending data access commands in those states, >> then got deadly confused by seeing them refused (they are not allowed in those states). >> It could happen, because SUCCESS reply on TEST UNIT READY by definition of this command >> means that this device is fully ready, including READ/WRITE commands. >> >> So, if you are using SCST with "standby" or "offline" ALUA states, we would greatly >> appreciate, if you try the latest trunk and check that it continues working with all >> your initiators. >> >> Thanks, >> Vlad > > I tested r6776 and r6814 with linux kernel 4.4 and scst_local by creating > a volume in standby state and running multipath-tools 0.5.0 from openSUSE > and the alua handler: > > r6776: > > [47439.972057] scsi 7:0:0:0: Direct-Access SCST_FIO disk0 320 PQ: 0 ANSI: 6 > [47439.972512] sd 7:0:0:0: alua: supports implicit TPGS > [47439.973836] sd 7:0:0:0: [sdc] 20480 512-byte logical blocks: (10.4 MB/10.0 MiB) > [47439.973841] sd 7:0:0:0: [sdc] 4096-byte physical blocks > [47439.974011] sd 7:0:0:0: [sdc] Write Protect is off > [47439.974016] sd 7:0:0:0: [sdc] Mode Sense: 83 00 10 08 > [47439.974087] sd 7:0:0:0: [sdc] Write cache: enabled, read cache: enabled, supports DPO and FUA > [47439.974888] sd 7:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE > [47439.974895] sd 7:0:0:0: [sdc] tag#0 Sense Key : Not Ready [current] > [47439.974978] sd 7:0:0:0: [sdc] tag#0 Add. Sense: Logical unit not accessible, target port in standby state > [47439.974990] sd 7:0:0:0: [sdc] tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00 > [47440.005885] sd 7:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE > [47440.005897] sd 7:0:0:0: [sdc] tag#0 Sense Key : Not Ready [current] > [47440.005903] sd 7:0:0:0: [sdc] tag#0 Add. Sense: Logical unit not accessible, target port in standby state > [47440.005910] sd 7:0:0:0: [sdc] tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00 > [47440.006094] sd 7:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE > [47440.006099] sd 7:0:0:0: [sdc] tag#0 Sense Key : Not Ready [current] > [47440.006104] sd 7:0:0:0: [sdc] tag#0 Add. Sense: Logical unit not accessible, target port in standby state > [47440.006108] sd 7:0:0:0: [sdc] tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00 > [47440.007594] sd 7:0:0:0: alua: port group 01 rel port 00 > [47440.007766] sd 7:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE > [47440.007771] sd 7:0:0:0: [sdc] tag#0 Sense Key : Not Ready [current] > [47440.007784] sd 7:0:0:0: [sdc] tag#0 Add. Sense: Logical unit not accessible, target port in standby state > [47440.007790] sd 7:0:0:0: [sdc] tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00 > [47440.007815] sd 7:0:0:0: alua: port group 01 state S non-preferred supports tolUSNA > [47440.008083] sd 7:0:0:0: Attached scsi generic sg3 type 0 > [47440.008333] sdc: unable to read partition table > [47440.009079] sd 7:0:0:0: [sdc] Attached SCSI disk > > multipathd keeps reinstating the path due to it being up and the kernel > fails it again: > > multipathd: 26162356632353435: sdc - tur checker reports path is up > multipathd: 8:32: reinstated > multipathd: 26162356632353435: remaining active paths: 1 > kernel: [49923.734687] sd 7:0:0:0: alua: port group 01 state S non-preferred supports tolUSNA > kernel: [49923.746762] device-mapper: multipath: Failing path 8:32. > multipathd: sdc: mark as failed > multipathd: 26162356632353435: remaining active paths: 0 > > > r6814: > > [51756.969952] scsi 8:0:0:0: Direct-Access SCST_FIO disk0 320 PQ: 0 ANSI: 6 > [51756.972145] sd 8:0:0:0: [sdc] 20480 512-byte logical blocks: (10.4 MB/10.0 MiB) > [51756.972153] sd 8:0:0:0: [sdc] 4096-byte physical blocks > [51756.972376] sd 8:0:0:0: [sdc] Write Protect is off > [51756.972384] sd 8:0:0:0: [sdc] Mode Sense: 83 00 10 08 > [51756.972545] sd 8:0:0:0: [sdc] Write cache: enabled, read cache: enabled, supports DPO and FUA > [51756.976823] sd 8:0:0:0: alua: supports implicit TPGS > [51756.977147] sd 8:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE > [51756.977155] sd 8:0:0:0: [sdc] tag#0 Sense Key : Not Ready [current] > [51756.977161] sd 8:0:0:0: [sdc] tag#0 Add. Sense: Logical unit not accessible, target port in standby state > [51756.977169] sd 8:0:0:0: [sdc] tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00 > [51756.977337] sd 8:0:0:0: alua: port group 01 rel port 00 > [51756.977391] sd 8:0:0:0: alua: port group 01 state S non-preferred supports TOlUSNA > [51756.977593] sd 8:0:0:0: Attached scsi generic sg3 type 0 > [51756.977902] sdc: unable to read partition table > [51756.978739] sd 8:0:0:0: [sdc] Attached SCSI disk > > multipathd still keeps reinstating the path but now due to it being in standby > state and the kernel fails it again: > > multipathd: 26162356632353435: sdc - tur checker reports path is in standby state > multipathd: 8:32: reinstated > multipathd: 26162356632353435: remaining active paths: 1 > kernel: [51943.169432] sd 8:0:0:0: alua: port group 01 state S non-preferred supports TOlUSNA > kernel: [51943.183203] device-mapper: multipath: Failing path 8:32. > multipathd: sdc: mark as failed > multipathd: 26162356632353435: remaining active paths: 0 > > > The multipath tur checker now returning standby state (ghost) instead of up > sounds more correct. As expected. Thank you! Vlad |