mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-20 20:21:30 +00:00
Pass-through dev handlers docs updated
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1709 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -308,13 +308,32 @@ echo "add disk1 0" >/sys/kernel/scst_tgt/targets/iscsi/iqn.2006-10.net.vlnb:tgt/
|
||||
echo 1 >/sys/kernel/scst_tgt/targets/iscsi/iqn.2006-10.net.vlnb:tgt/enabled
|
||||
echo 1 >/sys/kernel/scst_tgt/targets/iscsi/enabled
|
||||
|
||||
Below is more advanced sample script, which configures more virtual
|
||||
Below is another sample script, which configures 1 real local SCSI disk
|
||||
0:0:1:0 one target iqn.2006-10.net.vlnb:tgt with all default parameters:
|
||||
|
||||
#!/bin/bash
|
||||
|
||||
modprobe scst
|
||||
modprobe scst_disk
|
||||
|
||||
echo "add_device 0:0:1:0" >/sys/kernel/scst_tgt/handlers/dev_disk/mgmt
|
||||
|
||||
service iscsi-scst start
|
||||
|
||||
echo "add_target iqn.2006-10.net.vlnb:tgt" >/sys/kernel/scst_tgt/targets/iscsi/mgmt
|
||||
echo "add 0:0:1:0 0" >/sys/kernel/scst_tgt/targets/iscsi/iqn.2006-10.net.vlnb:tgt/luns/mgmt
|
||||
|
||||
echo 1 >/sys/kernel/scst_tgt/targets/iscsi/iqn.2006-10.net.vlnb:tgt/enabled
|
||||
echo 1 >/sys/kernel/scst_tgt/targets/iscsi/enabled
|
||||
|
||||
Below is an advanced sample script, which configures more virtual
|
||||
devices of various types, including virtual CDROM and 2 targets, one
|
||||
with all default parameters, another one with some not default
|
||||
parameters, incoming and outgoing user names for CHAP authentification,
|
||||
and special permissions for initiator iqn.2005-03.org.open-iscsi:cacdcd2520,
|
||||
which will see another set of devices. Also this sample configures CHAP
|
||||
authentication for discovery sessions and iSNS server with access control.
|
||||
authentication for discovery sessions and iSNS server with access
|
||||
control.
|
||||
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
@@ -205,13 +205,32 @@ echo "add disk1 0" >/sys/kernel/scst_tgt/targets/iscsi/iqn.2006-10.net.vlnb:tgt/
|
||||
echo 1 >/sys/kernel/scst_tgt/targets/iscsi/iqn.2006-10.net.vlnb:tgt/enabled
|
||||
echo 1 >/sys/kernel/scst_tgt/targets/iscsi/enabled
|
||||
|
||||
Below is more advanced sample script, which configures more virtual
|
||||
Below is another sample script, which configures 1 real local SCSI disk
|
||||
0:0:1:0 one target iqn.2006-10.net.vlnb:tgt with all default parameters:
|
||||
|
||||
#!/bin/bash
|
||||
|
||||
modprobe scst
|
||||
modprobe scst_disk
|
||||
|
||||
echo "add_device 0:0:1:0" >/sys/kernel/scst_tgt/handlers/dev_disk/mgmt
|
||||
|
||||
service iscsi-scst start
|
||||
|
||||
echo "add_target iqn.2006-10.net.vlnb:tgt" >/sys/kernel/scst_tgt/targets/iscsi/mgmt
|
||||
echo "add 0:0:1:0 0" >/sys/kernel/scst_tgt/targets/iscsi/iqn.2006-10.net.vlnb:tgt/luns/mgmt
|
||||
|
||||
echo 1 >/sys/kernel/scst_tgt/targets/iscsi/iqn.2006-10.net.vlnb:tgt/enabled
|
||||
echo 1 >/sys/kernel/scst_tgt/targets/iscsi/enabled
|
||||
|
||||
Below is an advanced sample script, which configures more virtual
|
||||
devices of various types, including virtual CDROM and 2 targets, one
|
||||
with all default parameters, another one with some not default
|
||||
parameters, incoming and outgoing user names for CHAP authentification,
|
||||
and special permissions for initiator iqn.2005-03.org.open-iscsi:cacdcd2520,
|
||||
which will see another set of devices. Also this sample configures CHAP
|
||||
authentication for discovery sessions and iSNS server with access control.
|
||||
authentication for discovery sessions and iSNS server with access
|
||||
control.
|
||||
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
@@ -237,7 +237,22 @@ modprobe qla2x00tgt
|
||||
echo "add disk1 0" >/sys/kernel/scst_tgt/targets/qla2x00t/25:00:00:f0:98:87:92:f3/luns/mgmt
|
||||
echo 1 >/sys/kernel/scst_tgt/targets/qla2x00t/25:00:00:f0:98:87:92:f3/enabled
|
||||
|
||||
Below is more advanced sample script, which configures more virtual
|
||||
Below is another sample script, which configures 1 real local SCSI disk
|
||||
0:0:1:0 for usage with 25:00:00:f0:98:87:92:f3 target:
|
||||
|
||||
#!/bin/bash
|
||||
|
||||
modprobe scst
|
||||
modprobe scst_disk
|
||||
|
||||
echo "add_device 0:0:1:0" >/sys/kernel/scst_tgt/handlers/dev_disk/mgmt
|
||||
|
||||
modprobe qla2x00tgt
|
||||
|
||||
echo "add 0:0:1:0 0" >/sys/kernel/scst_tgt/targets/qla2x00t/25:00:00:f0:98:87:92:f3/luns/mgmt
|
||||
echo 1 >/sys/kernel/scst_tgt/targets/qla2x00t/25:00:00:f0:98:87:92:f3/enabled
|
||||
|
||||
Below is an advanced sample script, which configures more virtual
|
||||
devices of various types, including virtual CDROM. In this script
|
||||
initiator 25:00:00:f0:99:87:94:a3 will see disk1 and disk2 devices, all
|
||||
other initiators will see read only blockio, nullio and cdrom devices.
|
||||
|
||||
14
scst/README
14
scst/README
@@ -1395,11 +1395,6 @@ In the SYSFS interface all real SCSI devices are listed in
|
||||
instance 1:0:0:0. The recommended way to match those numbers to your
|
||||
devices is use of lsscsi utility.
|
||||
|
||||
When a pass-through dev handler is loaded it assigns itself to all
|
||||
existing SCSI devices of its SCSI type. If you later want to unassign some
|
||||
SCSI device from it or assign it to another dev handler you can use the
|
||||
following interface.
|
||||
|
||||
Each pass-through dev handler has in its root subdirectory
|
||||
/sys/kernel/scst_tgt/handlers/handler_name, e.g.
|
||||
/sys/kernel/scst_tgt/handlers/dev_disk, "mgmt" file. It allows the
|
||||
@@ -1408,7 +1403,7 @@ following commands. They can be sent to it using, e.g., echo command.
|
||||
- "add_device" - this command assigns SCSI device with
|
||||
host:channel:id:lun numbers to this dev handler.
|
||||
|
||||
echo "add_device 1:0:0:0" >mgmt
|
||||
echo "add_device 1:0:0:0" >/sys/kernel/scst_tgt/handlers/dev_disk/mgmt
|
||||
|
||||
will assign SCSI device 1:0:0:0 to this dev handler.
|
||||
|
||||
@@ -1418,6 +1413,13 @@ host:channel:id:lun numbers from this dev handler.
|
||||
As usually, on read the "mgmt" file returns small help about available
|
||||
commands.
|
||||
|
||||
You need to manually assign each your real SCSI device to the
|
||||
corresponding pass-through dev handler using the "add_device" command,
|
||||
otherwise the real SCSI devices will not be visible remotely. The
|
||||
assignment isn't done automatically, because it could lead to the
|
||||
pass-through dev handlers load and initialization problems if any of the
|
||||
local real SCSI devices are malfunctioning.
|
||||
|
||||
As any other hardware, the local SCSI hardware can not handle commands
|
||||
with amount of data and/or segments count in scatter-gather array bigger
|
||||
some values. Therefore, when using the pass-through mode you should note
|
||||
|
||||
@@ -979,11 +979,6 @@ In the SYSFS interface all real SCSI devices are listed in
|
||||
instance 1:0:0:0. The recommended way to match those numbers to your
|
||||
devices is use of lsscsi utility.
|
||||
|
||||
When a pass-through dev handler is loaded it assigns itself to all
|
||||
existing SCSI devices of its SCSI type. If you later want to unassign some
|
||||
SCSI device from it or assign it to another dev handler you can use the
|
||||
following interface.
|
||||
|
||||
Each pass-through dev handler has in its root subdirectory
|
||||
/sys/kernel/scst_tgt/handlers/handler_name, e.g.
|
||||
/sys/kernel/scst_tgt/handlers/dev_disk, "mgmt" file. It allows the
|
||||
@@ -992,7 +987,7 @@ following commands. They can be sent to it using, e.g., echo command.
|
||||
- "add_device" - this command assigns SCSI device with
|
||||
host:channel:id:lun numbers to this dev handler.
|
||||
|
||||
echo "add_device 1:0:0:0" >mgmt
|
||||
echo "add_device 1:0:0:0" >/sys/kernel/scst_tgt/handlers/dev_disk/mgmt
|
||||
|
||||
will assign SCSI device 1:0:0:0 to this dev handler.
|
||||
|
||||
@@ -1002,6 +997,13 @@ host:channel:id:lun numbers from this dev handler.
|
||||
As usually, on read the "mgmt" file returns small help about available
|
||||
commands.
|
||||
|
||||
You need to manually assign each your real SCSI device to the
|
||||
corresponding pass-through dev handler using the "add_device" command,
|
||||
otherwise the real SCSI devices will not be visible remotely. The
|
||||
assignment isn't done automatically, because it could lead to the
|
||||
pass-through dev handlers load and initialization problems if any of the
|
||||
local real SCSI devices are malfunctioning.
|
||||
|
||||
As any other hardware, the local SCSI hardware can not handle commands
|
||||
with amount of data and/or segments count in scatter-gather array bigger
|
||||
some values. Therefore, when using the pass-through mode you should note
|
||||
|
||||
Reference in New Issue
Block a user