Re: stgt does not preempt SCSI-2 reservations; may break MS Cluster Service failover

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello again.

Just in case someone is pulling this from the list archives, here's the
sum-up for the record. This is my procedure for testing SCSI-2
reservations and preempting them, thus simulating a MSCS failover
procedure from a Linux open-iSCSI host. With slightly different results
for STGT and IET.

With tgtd 0.9.8:

Node A:
# sg_raw /dev/sdc 16 00 00 00 00 00
SCSI Status: Good
Sense Information:
sense buffer empty

Node B, immediately afterwards:
# sg_raw /dev/sdc 16 00 00 00 00 00
SCSI Status: Reservation Conflict
Sense Information:
sense buffer empty

Good, now preempting the reservation with a device reset on node B:
# sg_reset -d /dev/sdc
sg_reset: starting device reset
sg_reset: completed device reset

(Alternatively, a host reset on node B works too)
# sg_reset -h /dev/sdc
sg_reset: starting host reset
sg_reset: completed host reset

Afterwards, on node B:
# sg_raw /dev/sdc 16 00 00 00 00 00
SCSI Status: Good
Sense Information:
sense buffer empty

Whereas, on node B this just hangs:
# sg_reset -b /dev/sdc
sg_reset: starting bus reset

Thus, preempting the reservation via a host or device reset works,
whereas via a bus reset it appears not to. It appears that MSCS (at
least in the Windows 2003 version) uses bus resets to preempt
reservations on quorum devices for cluster node failover.

It says in a support article
(http://support.microsoft.com/?scid=kb%3Ben-us%3B309186&x=12&y=9) that
with storport drivers MSCS uses a device reset instead of a bus reset,
which works fine with tgt. I would assume that this does not apply to
using the MS iSCSI initiator -- Ross, maybe you can correct me if I'm
wrong here?


Conversely, here's the same procedure with IET 0.4.17:

Node A:
# sg_raw /dev/sdc 16 00 00 00 00 00
SCSI Status: Good
Sense Information:
sense buffer empty

Node B, immediately afterwards:
# sg_raw /dev/sdc 16 00 00 00 00 00
SCSI Status: Reservation Conflict
Sense Information:
sense buffer empty

Device reset on node B:
# sg_reset -d /dev/sdc
sg_reset: starting device reset
sg_reset: completed device reset

(Alternatively, a host reset on node B works too)
# sg_reset -h /dev/sdc
sg_reset: starting host reset
sg_reset: completed host reset

And here, a bus reset works as well:
# sg_reset -b /dev/sdc
sg_reset: starting bus reset
sg_reset: completed bus reset

Afterwards, on node B:
# sg_raw /dev/sdc 16 00 00 00 00 00
SCSI Status: Good
Sense Information:
sense buffer empty

Hope this is helpful.
Cheers,
Florian

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux SCSI]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux