scsi_target crashed when initiator is using LSI PCI-X Ultra320
SCSI card
Mark Terribile
materribile at yahoo.com
Wed Feb 18 21:54:42 PST 2004
Jerry,
> Initiator: PC with Windows 2000, LSI Ultra320 SCSI card
> Target: PC with FreeBSD 5.2, on-board Adaptec 7899W chip
> command on target:
> ./scsi_target 0:1:0 file
>
> When I rescan hardware on initiator, the Target's scsi_target program exit
> itself. Then I re-run scsi_target program again, and rescan hardware on
>initiator, then...
>
> Target crashed! ( I can't grab the log because it's not logged in messages)
My recent work was on a different setup (Linux initiator) but I found that
when _anything_ changed (including the SCSI target emulator exiting or dying)
I had to rescan on the initiator or else things would crash soon. Try
rescanning the initiator after the emulator shuts down, before restarting it.
And then you have to debug the target emulator. It took me a while to figure
out how the confounded thing works. The key is the queues on which the
transaction structs (I don't have it in front of me and do not recall their
names, but there is one kind for ATIOs and one for CTIOs) are placed. They
start out on one fixed queue, and are placed on another (different for ATIO
and CTIO) when the struct is sent to the SCSI target layer via the write(2)
on targN. When they are returned with work to do, the CTIOs are placed on
queues linked to the ATIOs while the async read or write is underway.
Side note in case you haven't been watching VERY closely: /dev/targ0,
/dev/targ1, etc., are created WHEN YOU OPEN THEM in FreeBSD5.x; if they
exist you can't open them because something else has the file open!
Hope this helps. I'm curious about this one; I may have to play
target to a MicroSoft initiator one of these days.
Seems lots of people are making SCSI targets of themselves these days.
Mark Terribile
materribile at yahoo.com
__________________________________
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools
More information about the freebsd-scsi
mailing list