Small docs updates

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1600 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Vladislav Bolkhovitin
2010-04-09 10:28:50 +00:00
parent 80527e905e
commit 458e83c957
3 changed files with 173 additions and 160 deletions
+7 -1
View File
@@ -38,6 +38,10 @@ compiler complains about redefinition of some symbol, you should either
switch to vanilla kernel, or add or change as necessary the
corresponding to that symbol "#if LINUX_VERSION_CODE" statement.
The sysfs build supports only kernels 2.6.26 and higher, because in
2.6.26 internal kernel's sysfs interface had a major change, which made
it heavily incompatible with pre-2.6.26 version.
If during compilation you see message like "*** No rule to make target
`xxx.h', needed by `yyy.o'. Stop.", then your autogenerated
dependencies don't match your compiler configuration anymore. You should
@@ -127,7 +131,9 @@ Starting from 2.0.0 iSCSI-SCST has sysfs interface. You can switch to it
by running "make disable_proc". To switch back to the procfs interface
you should run "make enable_proc". The procfs interface starting from
version 2.0.0 is obsolete and will be removed in one of the next
versions.
versions. The sysfs build supports only kernels 2.6.26 and higher,
because in 2.6.26 internal kernel's sysfs interface had a major change,
which made it heavily incompatible with pre-2.6.26 version.
Root of SCST sysfs interface is /sys/kernel/scst_tgt. Root of iSCSI-SCST
is /sys/kernel/scst_tgt/targets/iscsi. It has the following entries:
+158 -158
View File
@@ -121,6 +121,164 @@ the following commands:
/etc/init.d/iscsi-scst start
Installing and using iSCSI-SCST without using scstadmin via /sys interface
==========================================================================
First repeat steps 1, 2 and 3 from the first section but leave out
"scstadm scstadm_install" from the make command in step 1.
Next load the scst_disk and scst_vdisk kernel modules as follows:
modprobe scst_disk
modprobe scst_vdisk
The shell script /etc/init.d/iscsi-scst can now be used to start/stop/restart or
check the status of iSCSI-SCST.
Creating targets
----------------
echo "add_target iqn.2007-05.com.example:storage.iscsi-scst-1" > /sys/kernel/scst_tgt/targets/iscsi/mgmt
This will add target iqn.2007-05.com.example:storage.iscsi-scst-1.
Changing targets' parameters
----------------------------
echo "8192" >/sys/kernel/scst_tgt/targets/iscsi/iqn.2007-05.com.example\:storage.iscsi-scst-1/MaxRecvDataSegmentLength
This will change MaxRecvDataSegmentLength parameter of target
iqn.2007-05.com.example:storage.iscsi-scst-1 to 8192.
You can read it then by:
# cat /sys/kernel/scst_tgt/targets/iscsi/iqn.2007-05.com.example\:storage.iscsi-scst-1/MaxRecvDataSegmentLength
8192
[key]
The mark "[key]" shows high level management tools, like scstadmin, that
this attribute has not default value. You can ignore it.
Add vdisk devices
-----------------
dd if=/dev/zero of=/disk1 bs=1M count=1024
This will create a backend file /disk1 for our future virtual device
disk1.
echo "add_device disk1 filename=/disk1; nv_cache=1" >/sys/kernel/scst_tgt/handlers/vdisk_fileio/mgmt
This will add new FILEIO device disk1 with backend file /disk1 and
NV_CACHE option enabled.
Selecting devices to be used by SCST
------------------------------------
You can see the list of available devices:
# ls -1 /sys/kernel/scst_tgt/devices
0:0:0:0
1:0:0:0
3:0:0:0
3:0:0:1
3:0:0:2
3:0:0:3
3:0:0:4
3:0:0:5
3:0:0:6
3:0:0:7
2:0:0:0
4:0:0:0
4:0:0:5
4:0:0:6
4:0:0:7
4:0:0:8
4:0:0:9
4:0:1:0
4:0:1:1
4:0:1:2
4:0:1:3
4:0:1:4
5:0:0:0
5:0:0:5
5:0:0:6
5:0:0:7
5:0:0:8
5:0:0:9
5:0:1:0
5:0:1:1
5:0:1:2
5:0:1:3
5:0:1:4
disk1
Defining LUN masking
--------------------
In order to associate specific LUNs with target
iqn.2007-05.com.example:storage.iscsi-scst-1, do the following:
echo "add 4:0:0:8 0" > /sys/kernel/scst_tgt/targets/iscsi/iqn.2007-05.com.example\:storage.iscsi-scst-1/luns/mgmt
This will assign the LUN 0 for pass-through device 4:0:0:8 to the target
iqn.2007-05.com.example:storage.iscsi-scst-1.
Note, you must have LUN 0 for each group. That's a SCSI requirement
(documented in SCST's README).
echo "add disk1 1 read_only=1" > /sys/kernel/scst_tgt/targets/iscsi/iqn.2007-05.com.example\:storage.iscsi-scst-1/luns/mgmt
This will assign the read only LUN 1 for virtual device disk1 to the
target iqn.2007-05.com.example:storage.iscsi-scst-1.
Deleting a LUN from a group
---------------------------
Run the following command:
echo "del disk1" > /sys/kernel/scst_tgt/targets/iscsi/iqn.2007-05.com.example\:storage.iscsi-scst-1/luns/mgmt
This will remove the LUN "disk1" from the target iqn.2007-05.com.example:storage.iscsi-scst-1.
For more information about LUN masking, refer to SCST README, section
"Access and devices visibility management (LUN masking)".
Enabling targets
----------------
After you created and configured target, you should enable it:
echo 1 >/sys/kernel/scst_tgt/targets/iscsi/iqn.2007-05.com.example\:storage.iscsi-scst-1/enabled
Then enable the iSCSI-SCST driver:
echo 1 >/sys/kernel/scst_tgt/targets/iscsi/enabled
Assigning targets to specific initiators
----------------------------------------
In order to assign targets to specific initiators, you need to have
/etc/initiators.allow and /etc/initiators.deny. You can find
example files in etc/initiators.allow and etc/initiators.deny.
Note that all targets are allowed to all initiators by default, so if
you want to use /etc/initiators.allow, you will need to have
/etc/initiators.deny that looks like this:
ALL ALL
This will deny all initiators expect for those defined in /etc/initiators.allow.
Installing and using iSCSI-SCST without using scstadmin via /proc interface
===========================================================================
@@ -287,164 +445,6 @@ OFMarkInt=Reject
IFMarkInt=Reject
Installing and using iSCSI-SCST without using scstadmin via /sys interface
==========================================================================
First repeat steps 1, 2 and 3 from the first section but leave out
"scstadm scstadm_install" from the make command in step 1.
Next load the scst_disk and scst_vdisk kernel modules as follows:
modprobe scst_disk
modprobe scst_vdisk
The shell script /etc/init.d/iscsi-scst can now be used to start/stop/restart or
check the status of iSCSI-SCST.
Creating targets
----------------
echo "add_target iqn.2007-05.com.example:storage.iscsi-scst-1" > /sys/kernel/scst_tgt/targets/iscsi/mgmt
This will add target iqn.2007-05.com.example:storage.iscsi-scst-1.
Changing targets' parameters
----------------------------
echo "8192" >/sys/kernel/scst_tgt/targets/iscsi/iqn.2007-05.com.example\:storage.iscsi-scst-1/MaxRecvDataSegmentLength
This will change MaxRecvDataSegmentLength parameter of target
iqn.2007-05.com.example:storage.iscsi-scst-1 to 8192.
You can read it then by:
# cat /sys/kernel/scst_tgt/targets/iscsi/iqn.2007-05.com.example\:storage.iscsi-scst-1/MaxRecvDataSegmentLength
8192
[key]
The mark "[key]" shows high level management tools, like scstadmin, that
this attribute has not default value. You can ignore it.
Add vdisk devices
-----------------
dd if=/dev/zero of=/disk1 bs=1M count=1024
This will create a backend file /disk1 for our future virtual device
disk1.
echo "add_device disk1 filename=/disk1; nv_cache=1" >/sys/kernel/scst_tgt/handlers/vdisk_fileio/mgmt
This will add new FILEIO device disk1 with backend file /disk1 and
NV_CACHE option enabled.
Selecting devices to be used by SCST
------------------------------------
You can see the list of available devices:
# ls -1 /sys/kernel/scst_tgt/devices
0:0:0:0
1:0:0:0
3:0:0:0
3:0:0:1
3:0:0:2
3:0:0:3
3:0:0:4
3:0:0:5
3:0:0:6
3:0:0:7
2:0:0:0
4:0:0:0
4:0:0:5
4:0:0:6
4:0:0:7
4:0:0:8
4:0:0:9
4:0:1:0
4:0:1:1
4:0:1:2
4:0:1:3
4:0:1:4
5:0:0:0
5:0:0:5
5:0:0:6
5:0:0:7
5:0:0:8
5:0:0:9
5:0:1:0
5:0:1:1
5:0:1:2
5:0:1:3
5:0:1:4
disk1
Defining LUN masking
--------------------
In order to associate specific LUNs with target
iqn.2007-05.com.example:storage.iscsi-scst-1, do the following:
echo "add 4:0:0:8 0" > /sys/kernel/scst_tgt/targets/iscsi/iqn.2007-05.com.example\:storage.iscsi-scst-1/luns/mgmt
This will assign the LUN 0 for pass-through device 4:0:0:8 to the target
iqn.2007-05.com.example:storage.iscsi-scst-1.
Note, you must have LUN 0 for each group. That's a SCSI requirement
(documented in SCST's README).
echo "add disk1 1 read_only=1" > /sys/kernel/scst_tgt/targets/iscsi/iqn.2007-05.com.example\:storage.iscsi-scst-1/luns/mgmt
This will assign the read only LUN 1 for virtual device disk1 to the
target iqn.2007-05.com.example:storage.iscsi-scst-1.
Deleting a LUN from a group
---------------------------
Run the following command:
echo "del disk1" > /sys/kernel/scst_tgt/targets/iscsi/iqn.2007-05.com.example\:storage.iscsi-scst-1/luns/mgmt
This will remove the LUN "disk1" from the target iqn.2007-05.com.example:storage.iscsi-scst-1.
For more information about LUN masking, refer to SCST README, section
"Access and devices visibility management (LUN masking)".
Enabling targets
----------------
After you created and configured target, you should enable it:
echo 1 >/sys/kernel/scst_tgt/targets/iscsi/iqn.2007-05.com.example\:storage.iscsi-scst-1/enabled
Then enable the iSCSI-SCST driver:
echo 1 >/sys/kernel/scst_tgt/targets/iscsi/enabled
Assigning targets to specific initiators
----------------------------------------
In order to assign targets to specific initiators, you need to have
/etc/initiators.allow and /etc/initiators.deny. You can find
example files in etc/initiators.allow and etc/initiators.deny.
Note that all targets are allowed to all initiators by default, so if
you want to use /etc/initiators.allow, you will need to have
/etc/initiators.deny that looks like this:
ALL ALL
This will deny all initiators expect for those defined in /etc/initiators.allow.
Bart Van Assche
Erez Zilber
Vladislav Bolkhovitin
+8 -1
View File
@@ -54,6 +54,10 @@ your compiler complains about redefinition of some symbol, you should
either switch to vanilla kernel, or add or change as necessary the
corresponding to that symbol "#if LINUX_VERSION_CODE" statement.
The sysfs build supports only kernels 2.6.26 and higher, because in
2.6.26 internal kernel's sysfs interface had a major change, which made
it heavily incompatible with pre-2.6.26 version.
At first, make sure that the link "/lib/modules/`you_kernel_version`/build"
points to the source code for your currently running kernel.
@@ -582,7 +586,10 @@ SCST sysfs interface
Starting from 2.0.0 SCST has sysfs interface. You can switch to it by
running "make disable_proc". To switch back to the procfs interface you
should run "make enable_proc".
should run "make enable_proc". The sysfs build supports only kernels
2.6.26 and higher, because in 2.6.26 internal kernel's sysfs interface
had a major change, which made it heavily incompatible with pre-2.6.26
version.
Root of SCST sysfs interface is /sys/kernel/scst_tgt. It has the
following entries: