Following this article, you basically:
- Make sure
for i in scst{,_vdisk,_disk,_user} qla2xxx_scst qla2x00tgt; do modprobe $i; done
won't give any errors (whether in terminal or in dmesg). For good measure, replacemodprobe
withecho
, and then copy the output into/etc/modules
, so it would be loaded on boot. - Use
scstadmin -list_target
,scstadmin -list_handler
,scstadmin -list_target
to see what you've got. None of these lists should be empty. - Create a
/etc/scst.conf
file, where you set options forHANDLER
andTARGET_DRIVER
. An example can be seen inman scst.conf
. Note: if you configureTARGET_DRIVER qla2x00t
, then inside it, in sub-paragraphTARGET 00:11:…
, where the00:11:…
is a WWN of FC ports, which can be looked up at/sys/class/fc_host/host*/port_name
. These params can also be seen atsystool -c fc_host -v
ofsysfsutils
package. - Execute
scstadmin -conf /etc/scst.conf
On errors in dmesg, whenever you see stuff like sqatgt: Missing parameter foo
, the foo some_value
has to be added in the scst.conf
. scstadmin
will write those into mgmt
file, but you shouldn't do it manually, there's scstadmin
for writing there with the right syntax.
- LUN (Logical Unit Numbers): a device, which can be read/written from/to.
- SCST handler is kinda like an SCST plugin to handle particular type of devices. E.g. to read from block device there's one plugin, from a file system another, and for cdrom there's yet another one.
handler
s are configured inscst.conf
with a HANDLER section (seeman scst.conf
for example). - SCSI initiator: an endpoint (e.g. a computer) that initiates a session against the target
- SCSI target: an endpoint that accepts a session from initiators, and provides them with LUNs.
- configuring is done by writing a config file and executing
scstadmin -config myconfig
. Internallyscstadmin
configures by writing stuff into various files under/sys/kernel/scst_tgt
. Stuff similar to the following:echo "add_target my_target" > /sys/kernel/scst_tgt/targets/iscsi/mgmt
. - no
initiator
configuration is required. While setting up target, you also pass a WWN or IQN or whatever identifier of initiator, and then upon enabling target it will connect to initiator and you shall see a new block device inlsblk
. - scst-created disks can be seen in
lsscsi
output
- missing target files (ones with WWN) at
/sys/kernel/scst_tgt/targets/qla2x00t/
: check that/sys/module/qla2xxx_scst/parameters/qlini_mode
isdisabled
. If isn't, add a lineoptions qla2xxx_scst qlini_mode="disabled"
under a/etc/modprobe.d
dir and reload theqla2xxx_scst
driver.
Upon rebuilding you do rmmod iscsi_scst scst
and then modprobe iscsi_scst
.