mirror of
https://github.com/SCST-project/scst.git
synced 2026-08-17 04:36:22 +00:00
Remove support for "make enable_proc" and "make disable_proc"
Since RHEL 5 and kernel versions before 2.6.26 rely on procfs support, this patch removes support for RHEL 5.x and also for kernel versions before 2.6.26. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7829 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -138,9 +138,6 @@ help:
|
||||
@echo " usr_install : usr target: install"
|
||||
@echo " usr_uninstall : usr target: uninstall"
|
||||
@echo ""
|
||||
@echo " enable_proc : switch to procfs interface"
|
||||
@echo " disable_proc : switch to sysfs interface (default)"
|
||||
@echo ""
|
||||
@echo " 2perf : changes debug state to full performance"
|
||||
@echo " 2release : changes debug state to release"
|
||||
@echo " 2debug : changes debug state to full debug"
|
||||
@@ -579,26 +576,6 @@ release-archive:
|
||||
@if [ -d $(SCST_LOCAL_DIR) ]; then cd $(SCST_LOCAL_DIR) && $(MAKE) $@; fi
|
||||
@if [ -d $(FCST_DIR) ]; then cd $(FCST_DIR) && $(MAKE) $@; fi
|
||||
|
||||
enable_proc: extraclean
|
||||
cd $(SCST_DIR) && $(MAKE) $@
|
||||
@if [ -d $(QLA_DIR) ]; then cd $(QLA_DIR) && $(MAKE) $@; fi
|
||||
@if [ -d $(QLA_OLD_DIR) ]; then cd $(QLA_OLD_DIR) && $(MAKE) $@; fi
|
||||
# @if [ -d $(LSI_DIR) ]; then cd $(LSI_DIR) && $(MAKE) $@; fi
|
||||
# @if [ -d $(SRP_DIR) ]; then cd $(SRP_DIR) && $(MAKE) $@; fi
|
||||
@if [ -d $(ISCSI_DIR) ]; then cd $(ISCSI_DIR) && $(MAKE) $@; fi
|
||||
# @if [ -d $(SCST_LOCAL_DIR) ]; then cd $(SCST_LOCAL_DIR) && $(MAKE) $@; fi
|
||||
@if [ -d $(SCSTADM_DIR) ]; then cd $(SCSTADM_DIR) && $(MAKE) $@; fi
|
||||
|
||||
disable_proc: extraclean
|
||||
cd $(SCST_DIR) && $(MAKE) $@
|
||||
@if [ -d $(QLA_DIR) ]; then cd $(QLA_DIR) && $(MAKE) $@; fi
|
||||
@if [ -d $(QLA_OLD_DIR) ]; then cd $(QLA_OLD_DIR) && $(MAKE) $@; fi
|
||||
# @if [ -d $(LSI_DIR) ]; then cd $(LSI_DIR) && $(MAKE) $@; fi
|
||||
# @if [ -d $(SRP_DIR) ]; then cd $(SRP_DIR) && $(MAKE) $@; fi
|
||||
@if [ -d $(ISCSI_DIR) ]; then cd $(ISCSI_DIR) && $(MAKE) $@; fi
|
||||
# @if [ -d $(SCST_LOCAL_DIR) ]; then cd $(SCST_LOCAL_DIR) && $(MAKE) $@; fi
|
||||
@if [ -d $(SCSTADM_DIR) ]; then cd $(SCSTADM_DIR) && $(MAKE) $@; fi
|
||||
|
||||
.PHONY: all install uninstall clean extraclean tags help \
|
||||
qla qla_install qla_uninstall qla_clean qla_extraclean \
|
||||
qla_old qla_old_install qla_old_uninstall qla_old_clean qla_old_extraclean \
|
||||
@@ -614,4 +591,4 @@ disable_proc: extraclean
|
||||
mvsas mvsas_install mvsas_uninstall mvsas_clean mvsas_extraclean \
|
||||
fcst fcst_install fcst_uninstall fcst_clean fcst_extraclean \
|
||||
scst-rpm scst-dkms-rpm dpkg \
|
||||
2perf 2release 2debug enable_proc disable_proc
|
||||
2perf 2release 2debug
|
||||
|
||||
@@ -1,121 +0,0 @@
|
||||
IBM Virtual SCSI Target (ibmvstgt)
|
||||
==================================
|
||||
|
||||
|
||||
Introduction
|
||||
------------
|
||||
The virtual SCSI (VSCSI) protocol as defined in [2] is a protocol that allows
|
||||
one logical partition (LPAR) to access SCSI targets provided by another LPAR.
|
||||
The LPAR that provides one or more SCSI targets is called the VIO server or
|
||||
VIOS. The ibmvstgt driver is a VIOS driver that makes it possible to access
|
||||
exported target devices via the VSCSI protocol.
|
||||
|
||||
Setup
|
||||
-----
|
||||
After having configured the LPARs, boot the LPARs and load the ibmvstgt kernel
|
||||
module in the VIOS. After the target driver has been loaded, verify that a
|
||||
message similar to the following appears in the initiator kernel log:
|
||||
|
||||
ibmvscsi 30000028: partner initialized
|
||||
ibmvscsi 30000028: host srp version: 16.a, host partition VIOS3-P6 (40), OS 2, max io 67108864
|
||||
ibmvscsi 30000028: sent SRP login
|
||||
ibmvscsi 30000028: SRP_LOGIN succeeded
|
||||
|
||||
In the above log messages, the number 30000028 refers to the VIOS. The last
|
||||
two digits, 0x28, refer to the VIOS partition number (0x28 = 40).
|
||||
|
||||
The next step is to decide which SCSI devices to export. Here is an example of
|
||||
a configuration in which 16 RAM disks have been exported (see also [1] for
|
||||
more information):
|
||||
|
||||
$ cat /proc/scsi_tgt/vdisk/vdisk
|
||||
Name Size(MB) Block size Options File name T10 device id
|
||||
ram000 16 512 NV /dev/ram0 c726a6ab
|
||||
ram001 16 512 NV /dev/ram1 eca3eb12
|
||||
ram002 16 512 NV /dev/ram2 8e9fb87
|
||||
ram003 16 512 NV /dev/ram3 912b0e46
|
||||
ram004 16 512 NV /dev/ram4 c52a6cdf
|
||||
ram005 16 512 NV /dev/ram5 b3f98ada
|
||||
ram006 16 512 NV /dev/ram6 fb5fd9ce
|
||||
ram007 16 512 NV /dev/ram7 3285b724
|
||||
ram008 16 512 NV /dev/ram8 6a93ad6d
|
||||
ram009 16 512 NV /dev/ram9 f0c60f83
|
||||
ram010 16 512 NV /dev/ram10 f0c60f84
|
||||
ram011 16 512 NV /dev/ram11 f0c60f85
|
||||
ram012 16 512 NV /dev/ram12 f0c60f86
|
||||
ram013 16 512 NV /dev/ram13 f0c60f87
|
||||
ram014 16 512 NV /dev/ram14 f0c60f88
|
||||
ram015 16 512 NV /dev/ram15 f0c60f89
|
||||
|
||||
After this step a LUN has to be assigned to each exported SCSI device. Some
|
||||
non-Linux initiator operating systems only accept LUN numbes that are
|
||||
multiples of 256 and require that the LUN addressing method is used. The LUN
|
||||
addressing method is only available for other groups than the Default group.
|
||||
Configuring such a group can be done e.g. as follows:
|
||||
|
||||
vios_id="30000028"
|
||||
echo "add_group ${vios_id} LUN" >/proc/scsi_tgt/scsi_tgt
|
||||
echo "add ${vios_id}" >/proc/scsi_tgt/groups/${vios_id}/names
|
||||
lun=0
|
||||
for name in ram000 ram001 ram002 ram003 ram004 ram005 ram006 ram007 \
|
||||
ram008 ram009 ram010 ram011 ram012 ram013 ram014 ram015
|
||||
do
|
||||
lun=$((lun+256))
|
||||
echo "add $name $lun" >/proc/scsi_tgt/groups/${vios_id}/devices
|
||||
done
|
||||
|
||||
In the above, the first echo command will create a group and will enable LUN
|
||||
addressing for that group. The second echo command tells SCST to use this
|
||||
group instead of the Default group for VSCSI. And the subsequent commands
|
||||
assign LUNs to the exported vdisks. The result of the above commands will
|
||||
be as follows:
|
||||
|
||||
# cat /proc/scsi_tgt/groups/30000028/devices
|
||||
Device (host:ch:id:lun or name) LUN Options
|
||||
ram000 256
|
||||
ram001 512
|
||||
ram002 768
|
||||
ram003 1024
|
||||
ram004 1280
|
||||
ram005 1536
|
||||
ram006 1792
|
||||
ram007 2048
|
||||
ram008 2304
|
||||
ram009 2560
|
||||
ram010 2816
|
||||
ram011 3072
|
||||
ram012 3328
|
||||
ram013 3584
|
||||
ram014 3840
|
||||
ram015 4096
|
||||
|
||||
After SCST has been configured, make the new configuration available to the
|
||||
initiator by rescanning the SCSI bus, e.g. as follows:
|
||||
|
||||
# rescan-scsi-bus --hosts=2 --ids=0-31
|
||||
# lsscsi 2:
|
||||
[2:0:1:0] disk IBM VDASD blkdev 0001 /dev/sdb
|
||||
[2:0:2:0] disk IBM VDASD blkdev 0001 /dev/sdc
|
||||
[2:0:3:0] disk IBM VDASD blkdev 0001 /dev/sdd
|
||||
[2:0:4:0] disk IBM VDASD blkdev 0001 /dev/sde
|
||||
[2:0:5:0] disk IBM VDASD blkdev 0001 /dev/sdf
|
||||
[2:0:6:0] disk IBM VDASD blkdev 0001 /dev/sdg
|
||||
[2:0:7:0] disk IBM VDASD blkdev 0001 /dev/sdh
|
||||
[2:0:8:0] disk IBM VDASD blkdev 0001 /dev/sdi
|
||||
[2:0:9:0] disk IBM VDASD blkdev 0001 /dev/sdj
|
||||
[2:0:10:0] disk IBM VDASD blkdev 0001 /dev/sdk
|
||||
[2:0:11:0] disk IBM VDASD blkdev 0001 /dev/sdl
|
||||
[2:0:12:0] disk IBM VDASD blkdev 0001 /dev/sdm
|
||||
[2:0:13:0] disk IBM VDASD blkdev 0001 /dev/sdn
|
||||
[2:0:14:0] disk IBM VDASD blkdev 0001 /dev/sdo
|
||||
[2:0:15:0] disk IBM VDASD blkdev 0001 /dev/sdp
|
||||
[2:0:16:0] disk IBM VDASD blkdev 0001 /dev/sdq
|
||||
|
||||
|
||||
References
|
||||
----------
|
||||
[1] SCST Configuration Interface, Documentation/scst/README.scst.
|
||||
[2] Power.org Standard for Power Architecture Platform Requirements (PAPR)
|
||||
(Workstation, Server), Version 2.4, December 7, 2009, http://www.power.org.
|
||||
[3] Virtual I/O (VIO) and Virtualization, IBM Developerworks, 2010,
|
||||
http://www.ibm.com/developerworks/wikis/display/virtualization/VIO.
|
||||
+1
-11
@@ -379,17 +379,7 @@ conftest/use_pre_440_wr_structure/result-$(KVER).txt: \
|
||||
grep "^#EXTRA_CFLAGS += \-DCONFIG_SCST_DEBUG -g -fno-inline -fno-inline-functions" $(ISERTMOD)/Makefile >/dev/null
|
||||
rm $(ISERTMOD)/Makefile.aa
|
||||
|
||||
disable_proc:
|
||||
sed -i.aa s/"^#\?define CONFIG_SCST_PROC"/"\/* #define CONFIG_SCST_PROC *\/"/ $(INCDIR)/iscsi_scst_ver.h
|
||||
grep "^\/\* #define CONFIG_SCST_PROC \*\/" $(INCDIR)/iscsi_scst_ver.h >/dev/null
|
||||
rm $(INCDIR)/iscsi_scst_ver.h.aa
|
||||
|
||||
enable_proc:
|
||||
sed -i.aa s/"^\/\?\* #define CONFIG_SCST_PROC \*\/"/"#define CONFIG_SCST_PROC"/ $(INCDIR)/iscsi_scst_ver.h
|
||||
grep "^#define CONFIG_SCST_PROC" $(INCDIR)/iscsi_scst_ver.h >/dev/null
|
||||
rm $(INCDIR)/iscsi_scst_ver.h.aa
|
||||
|
||||
release-archive:
|
||||
../scripts/generate-release-archive iscsi-scst "$$(sed -n 's/^#define[[:blank:]]ISCSI_VERSION_STRING[[:blank:]]*\"\([^\"]*\)\".*/\1/p' include/iscsi_scst_ver.h)"
|
||||
|
||||
.PHONY: all mods progs install clean extraclean 2release 2debug 2perf disable_proc enable_proc
|
||||
.PHONY: all mods progs install clean extraclean 2release 2debug 2perf
|
||||
|
||||
@@ -25,12 +25,6 @@ do that by running the following command from the SCST directory:
|
||||
make 2release
|
||||
make scst scst_install iscsi iscsi_install scstadm scstadm_install
|
||||
|
||||
When using RHEL 5 or CentOS 5, use these commands instead:
|
||||
|
||||
make 2release
|
||||
make enable_proc
|
||||
make scst scst_install iscsi iscsi_install scstadm scstadm_install
|
||||
|
||||
iSCSI-SCST includes the following components:
|
||||
* kernel modules: iscsi-scst.ko scst.ko scst_vdisk.ko
|
||||
* iscsi-scstd - daemon
|
||||
|
||||
@@ -182,14 +182,4 @@ extraclean: clean
|
||||
grep "^#EXTRA_CFLAGS += \-DCONFIG_SCST_DEBUG -g -fno-inline -fno-inline-functions" Makefile >/dev/null
|
||||
rm Makefile.aa
|
||||
|
||||
disable_proc:
|
||||
sed -i.aa s/"^#\?define CONFIG_SCST_PROC"/"\/* #define CONFIG_SCST_PROC *\/"/ ../qla_attr.c
|
||||
grep "^\/\* #define CONFIG_SCST_PROC \*\/" ../qla_attr.c >/dev/null
|
||||
rm ../qla_attr.c.aa
|
||||
|
||||
enable_proc:
|
||||
sed -i.aa s/"^\/\?\* #define CONFIG_SCST_PROC \*\/"/"#define CONFIG_SCST_PROC"/ ../qla_attr.c
|
||||
grep "^#define CONFIG_SCST_PROC" ../qla_attr.c >/dev/null
|
||||
rm ../qla_attr.c.aa
|
||||
|
||||
.PHONY: all tgt install uninstall clean extraclean 2perf 2release 2debug disable_proc enable_proc qla2xxx_scst
|
||||
.PHONY: all tgt install uninstall clean extraclean 2perf 2release 2debug qla2xxx_scst
|
||||
|
||||
@@ -603,7 +603,6 @@ if [ "${run_local_compilation}" = "true" ]; then
|
||||
compile_scst_no_dlm || exit $?
|
||||
compile_scst_patched 2release || exit $?
|
||||
compile_scst_patched 2perf || exit $?
|
||||
# compile_scst_patched enable_proc || exit $?
|
||||
if type rpmbuild >/dev/null 2>&1; then
|
||||
make_rpm || exit $?
|
||||
fi
|
||||
|
||||
+1
-7
@@ -47,12 +47,6 @@ extraclean:
|
||||
2perf:
|
||||
cd $(SCST_DIR) && $(MAKE) $@
|
||||
|
||||
disable_proc:
|
||||
cd $(SCST_DIR) && $(MAKE) $@
|
||||
|
||||
enable_proc:
|
||||
cd $(SCST_DIR) && $(MAKE) $@
|
||||
|
||||
release-archive:
|
||||
../scripts/generate-release-archive scst \
|
||||
"$$(sed -n 's/^#define[[:blank:]]SCST_VERSION_NAME[[:blank:]]*\"\([^\"]*\)\".*/\1/p' include/scst_const.h)" \
|
||||
@@ -68,4 +62,4 @@ help:
|
||||
@echo " - be sure to compile qla against the correct initiator"
|
||||
@echo " driver. Read its README for details."
|
||||
|
||||
.PHONY: all install uninstall clean extraclean help 2release 2debug 2perf disable_proc enable_proc
|
||||
.PHONY: all install uninstall clean extraclean help 2release 2debug 2perf
|
||||
|
||||
-287
@@ -2848,204 +2848,6 @@ or initiator-target link, you can increase SCST_MAX_TGT_DEV_COMMANDS in
|
||||
scst_priv.h to 64. Usually initiators don't try to push more commands on
|
||||
the target.
|
||||
|
||||
|
||||
Obsolete /proc interface
|
||||
------------------------
|
||||
|
||||
Also for communications with user space programs SCST provides
|
||||
proc-based interface in /proc/scsi_tgt directory. This interface is
|
||||
available in the procfs build only. Starting from version 2.0.0 it is
|
||||
obsolete and will be removed in one of the next versions. To switch in
|
||||
the procfs build you need to run "make enable_proc" command before
|
||||
building anything else.
|
||||
|
||||
It contains the following entries.
|
||||
|
||||
- "help" file, which provides online help for SCST commands
|
||||
|
||||
- "scsi_tgt" file, which on read provides information of serving by SCST
|
||||
devices and their dev handlers. On write it supports the following
|
||||
command:
|
||||
|
||||
* "assign H:C:I:L HANDLER_NAME" assigns dev handler "HANDLER_NAME"
|
||||
on device with host:channel:id:lun. The recommended way to find out
|
||||
H:C:I:L numbers is use of lsscsi utility.
|
||||
|
||||
- "sessions" file, which lists currently connected initiators (open sessions)
|
||||
|
||||
- "sgv" file provides some statistic about with which block sizes
|
||||
commands from remote initiators come and how effective sgv_pool in
|
||||
serving those allocations from the cache, i.e. without memory
|
||||
allocations requests to the kernel. "Size" - is the commands data
|
||||
size upper rounded to power of 2, "Hit" - how many there are
|
||||
allocations from the cache, "Total" - total number of allocations.
|
||||
|
||||
- "threads" file, which allows to read and set number of SCST's threads
|
||||
|
||||
- "version" file, which shows version of SCST
|
||||
|
||||
- "trace_level" file, which allows to read and set trace (logging) level
|
||||
for SCST. Also this file allows to dump persistent reservations
|
||||
information about some device in the log file. See
|
||||
/proc/scsi_tgt/help file for list of commands and trace levels. See
|
||||
also section "Dealing with massive logs" for more info how to make
|
||||
correct logs when you enabled trace levels producing a lot of logs
|
||||
data.
|
||||
|
||||
Each dev handler has own subdirectory. Most dev handler have only two
|
||||
files in this subdirectory: "trace_level" and "type". The first one is
|
||||
similar to main SCST "trace_level" file, the latter one shows SCSI type
|
||||
number of this handler as well as some text description.
|
||||
|
||||
For example, "echo "assign 1:0:1:0 dev_disk" >/proc/scsi_tgt/scsi_tgt"
|
||||
will assign device handler "dev_disk" to real device sitting on host 1,
|
||||
channel 0, ID 1, LUN 0.
|
||||
|
||||
|
||||
Access and devices visibility management (LUN masking) - /proc interface
|
||||
------------------------------------------------------------------------
|
||||
|
||||
Access and devices visibility management allows for an initiator or
|
||||
group of initiators to see different devices with different LUNs
|
||||
with necessary access permissions.
|
||||
|
||||
SCST supports two modes of access control:
|
||||
|
||||
1. Target-oriented. In this mode you define for each target devices and
|
||||
their LUNs, which are accessible to all initiators, connected to that
|
||||
target. This is a regular access control mode, which people usually mean
|
||||
thinking about access control in general. For instance, in IET this is
|
||||
the only supported mode. In this mode you should create a security group
|
||||
with name "Default_TARGET_NAME", where "TARGET_NAME" is name of the
|
||||
target, like "Default_iqn.2007-05.com.example:storage.disk1.sys1.xyz"
|
||||
for target "iqn.2007-05.com.example:storage.disk1.sys1.xyz". Then you
|
||||
should add to it all LUNs, available from that target.
|
||||
|
||||
2. Initiator-oriented. In this mode you define which devices and their
|
||||
LUNs are accessible for each initiator. In this mode you should create
|
||||
for each set of one or more initiators, which should access to the same
|
||||
set of devices with the same LUNs, a separate security group, then add
|
||||
to it available devices and names of allowed initiator(s).
|
||||
|
||||
Both modes can be used simultaneously. In this case initiator-oriented
|
||||
mode has higher priority, than target-oriented.
|
||||
|
||||
When a target driver registers itself in SCST core, it tells SCST core
|
||||
its name. Then, when there is a new connection from a remote initiator,
|
||||
the target driver registers this connection in SCST core and tells it
|
||||
the name of the remote initiator. Then SCST core finds the corresponding
|
||||
devices for it using the following algorithm:
|
||||
|
||||
1. It searches through all defined groups trying to find group
|
||||
containing the initiator name. If it succeeds, the found group is used.
|
||||
|
||||
2. Otherwise, it searches through all groups trying to find group with
|
||||
name "Default_TARGET_NAME". If it succeeds, the found group is used.
|
||||
|
||||
3. Otherwise, the group with name "Default" is used. This group is
|
||||
always defined, but empty by default.
|
||||
|
||||
Names of both target and initiator you can clarify in the kernel log. In
|
||||
it SCST reports to which group each session is assigned.
|
||||
|
||||
In /proc/scsi_tgt each group represented as "groups/GROUP_NAME/"
|
||||
subdirectory. In it there are files "devices" and "names". File
|
||||
"devices" lists devices and their LUNs in the group, file "names" lists
|
||||
names of initiators, which allowed to access devices in this group.
|
||||
|
||||
To configure access and devices visibility management SCST provides the
|
||||
following files and directories under /proc/scsi_tgt:
|
||||
|
||||
- "add_group GROUP_NAME" to /proc/scsi_tgt/scsi_tgt adds group "GROUP_NAME"
|
||||
|
||||
- "del_group GROUP_NAME" to /proc/scsi_tgt/scsi_tgt deletes group "GROUP_NAME"
|
||||
|
||||
- "rename_group OLD_NAME NEW_NAME" to /proc/scsi_tgt/scsi_tgt renames
|
||||
group "OLD_NAME" to "NEW_NAME".
|
||||
|
||||
- "add H:C:I:L lun [READ_ONLY]" to /proc/scsi_tgt/groups/GROUP_NAME/devices adds
|
||||
device with host:channel:id:lun with LUN "lun" in group "GROUP_NAME". Optionally,
|
||||
the device could be marked as read only. The recommended way to find out
|
||||
H:C:I:L numbers is use of lsscsi utility.
|
||||
|
||||
- "replace H:C:I:L lun [READ_ONLY]" to /proc/scsi_tgt/groups/GROUP_NAME/devices
|
||||
replaces by device with host:channel:id:lun existing with LUN "lun"
|
||||
device in group "GROUP_NAME" with generation of INQUIRY DATA HAS
|
||||
CHANGED Unit Attention. If the old device doesn't exist, this
|
||||
command acts as the "add" command. Optionally, the device could be
|
||||
marked as read only. The recommended way to find out H:C:I:L numbers
|
||||
is use of lsscsi utility.
|
||||
|
||||
- "del H:C:I:L" to /proc/scsi_tgt/groups/GROUP_NAME/devices deletes device with
|
||||
host:channel:id:lun from group "GROUP_NAME". The recommended way to find out
|
||||
H:C:I:L numbers is use of lsscsi utility.
|
||||
|
||||
- "add V_NAME lun [READ_ONLY]" to /proc/scsi_tgt/groups/GROUP_NAME/devices adds
|
||||
device with virtual name "V_NAME" with LUN "lun" in group "GROUP_NAME".
|
||||
Optionally, the device could be marked as read only.
|
||||
|
||||
- "replace V_NAME lun [READ_ONLY]" to /proc/scsi_tgt/groups/GROUP_NAME/devices
|
||||
replaces by device with virtual name "V_NAME" existing with LUN
|
||||
"lun" device in group "GROUP_NAME" with generation of INQUIRY DATA
|
||||
HAS CHANGED Unit Attention. If the old device doesn't exist, this
|
||||
command acts as the "add" command. Optionally, the device could
|
||||
be marked as read only.
|
||||
|
||||
- "del V_NAME" to /proc/scsi_tgt/groups/GROUP_NAME/devices deletes device with
|
||||
virtual name "V_NAME" from group "GROUP_NAME"
|
||||
|
||||
- "clear" to /proc/scsi_tgt/groups/GROUP_NAME/devices clears the list of devices
|
||||
for group "GROUP_NAME"
|
||||
|
||||
- "add NAME" to /proc/scsi_tgt/groups/GROUP_NAME/names adds name "NAME" to group
|
||||
"GROUP_NAME". For NAME you can use simple DOS-type patterns,
|
||||
containing '*' and '?' symbols. '*' means match all any symbols, '?'
|
||||
means match only any single symbol. For instance, "blah.xxx" will
|
||||
match "bl?h.*". Additionally, you can use negative sign '!' to
|
||||
revert the value of the pattern. For instance, "ah.xxx" will match
|
||||
"!bl?h.*".
|
||||
|
||||
- "del NAME" to /proc/scsi_tgt/groups/GROUP_NAME/names deletes name "NAME" from group
|
||||
"GROUP_NAME"
|
||||
|
||||
- "move NAME NEW_GROUP_NAME" to /proc/scsi_tgt/groups/OLD_GROUP_NAME/names
|
||||
moves name "NAME" from group "OLD_GROUP_NAME" to group "NEW_GROUP_NAME".
|
||||
|
||||
- "clear" to /proc/scsi_tgt/groups/GROUP_NAME/names clears the list of names
|
||||
for group "GROUP_NAME"
|
||||
|
||||
Examples:
|
||||
|
||||
- "echo "add 1:0:1:0 0" >/proc/scsi_tgt/groups/Default/devices" will
|
||||
add real device sitting on host 1, channel 0, ID 1, LUN 0 to "Default"
|
||||
group with LUN 0.
|
||||
|
||||
- "echo "add disk1 1" >/proc/scsi_tgt/groups/Default/devices" will
|
||||
add virtual VDISK device with name "disk1" to "Default" group
|
||||
with LUN 1.
|
||||
|
||||
- "echo "21:*:e0:?b:83:*'" >/proc/scsi_tgt/groups/LAB1/names" will
|
||||
add a pattern, which matches WWNs of Fibre Channel ports from LAB1.
|
||||
|
||||
Consider you need to have an iSCSI target with name
|
||||
"iqn.2007-05.com.example:storage.disk1.sys1.xyz" (you defined it in
|
||||
iscsi-scst.conf), which should export virtual device "dev1" with LUN 0
|
||||
and virtual device "dev2" with LUN 1, but initiator with name
|
||||
"iqn.2007-05.com.example:storage.disk1.spec_ini.xyz" should see only
|
||||
virtual device "dev2" with LUN 0. To achieve that you should do the
|
||||
following commands:
|
||||
|
||||
# echo "add_group Default_iqn.2007-05.com.example:storage.disk1.sys1.xyz" >/proc/scsi_tgt/scsi_tgt
|
||||
# echo "add dev1 0" >/proc/scsi_tgt/groups/Default_iqn.2007-05.com.example:storage.disk1.sys1.xyz/devices
|
||||
# echo "add dev2 1" >/proc/scsi_tgt/groups/Default_iqn.2007-05.com.example:storage.disk1.sys1.xyz/devices
|
||||
|
||||
# echo "add_group spec_ini" >/proc/scsi_tgt/scsi_tgt
|
||||
# echo "add iqn.2007-05.com.example:storage.disk1.spec_ini.xyz" >/proc/scsi_tgt/groups/spec_ini/names
|
||||
# echo "add dev2 0" >/proc/scsi_tgt/groups/spec_ini/devices
|
||||
|
||||
It is highly recommended to use scstadmin utility instead of described
|
||||
in this section low level interface.
|
||||
|
||||
IMPORTANT
|
||||
=========
|
||||
|
||||
@@ -3079,95 +2881,6 @@ initiators or add new devices to old groups, but not altering existing
|
||||
LUNs in them.
|
||||
|
||||
|
||||
VDISK /proc interface
|
||||
---------------------
|
||||
|
||||
This interface starting from version 2.0.0 is obsolete and will be
|
||||
removed in one of the next versions. To switch to it you should run
|
||||
"make enable_proc".
|
||||
|
||||
After loading VDISK device handler creates in /proc/scsi_tgt/
|
||||
subdirectories "vdisk" and "vcdrom". They have the following layout:
|
||||
|
||||
- "trace_level" and "type" files as described above
|
||||
|
||||
- "help" file, which provides online help for VDISK commands
|
||||
|
||||
- "vdisk"/"vcdrom" files, which on read provides information of
|
||||
currently open device files. On write it supports the following
|
||||
command:
|
||||
|
||||
* "open NAME [PATH] [BLOCK_SIZE] [FLAGS]" - opens file "PATH" as
|
||||
device "NAME" with block size "BLOCK_SIZE" bytes with flags
|
||||
"FLAGS". "PATH" could be empty only for VDISK CDROM. "BLOCK_SIZE"
|
||||
and "FLAGS" are valid only for disk VDISK. The block size must be
|
||||
power of 2 and >= 512 bytes. Default is 512. Possible flags:
|
||||
|
||||
- WRITE_THROUGH - write back caching disabled. Note, this option
|
||||
has sense only if you also *manually* disable write-back cache
|
||||
in *all* your backstorage devices and make sure it's actually
|
||||
disabled, since many devices are known to lie about this mode to
|
||||
get better benchmark results.
|
||||
|
||||
- READ_ONLY - read only
|
||||
|
||||
- O_DIRECT - both read and write caching disabled. This mode
|
||||
isn't currently fully implemented, you should use user space
|
||||
fileio_tgt program in O_DIRECT mode instead (see below).
|
||||
|
||||
- NULLIO - in this mode no real IO will be done, but success will be
|
||||
returned. Intended to be used for performance measurements at the same
|
||||
way as "*_perf" handlers.
|
||||
|
||||
- NV_CACHE - enables "non-volatile cache" mode. In this mode it is
|
||||
assumed that the target has a GOOD UPS with ability to cleanly
|
||||
shutdown target in case of power failure and it is
|
||||
software/hardware bugs free, i.e. all data from the target's
|
||||
cache are guaranteed sooner or later to go to the media. Hence
|
||||
all data synchronization with media operations, like
|
||||
SYNCHRONIZE_CACHE, are ignored in order to bring more
|
||||
performance. Also in this mode target reports to initiators that
|
||||
the corresponding device has write-through cache to disable all
|
||||
write-back cache workarounds used by initiators. Use with
|
||||
extreme caution, since in this mode after a crash of the target
|
||||
journaled file systems don't guarantee the consistency after
|
||||
journal recovery, therefore manual fsck MUST be ran. Note, that
|
||||
since usually the journal barrier protection (see "IMPORTANT"
|
||||
note below) turned off, enabling NV_CACHE could change nothing
|
||||
from data protection point of view, since no data
|
||||
synchronization with media operations will go from the
|
||||
initiator. This option overrides WRITE_THROUGH.
|
||||
|
||||
- BLOCKIO - enables block mode, which will perform direct block
|
||||
IO with a block device, bypassing page-cache for all operations.
|
||||
This mode works ideally with high-end storage HBAs and for
|
||||
applications that either do not need caching between application
|
||||
and disk or need the large block throughput. See also below.
|
||||
|
||||
- REMOVABLE - with this flag set the device is reported to remote
|
||||
initiators as removable.
|
||||
|
||||
* "close NAME" - closes device "NAME".
|
||||
|
||||
* "resync_size NAME" - refreshes size of device "NAME". Intended to be
|
||||
used after device resize.
|
||||
|
||||
* "change NAME [PATH]" - changes a virtual CD in the VDISK CDROM.
|
||||
|
||||
* "set_t10_dev_id NAME T10_DEVICE_ID" - sets T10 vendor specific
|
||||
identifier on Device Identification VPD page (0x83) of device
|
||||
"NAME" in INQUIRY data. By default VDISK handler always generates
|
||||
T10_DEVICE_ID for every new created device at creation time.
|
||||
This parameter allows to overwrite generated by VDISK value of
|
||||
T10_DEVICE_ID.
|
||||
|
||||
By default, if neither BLOCKIO, nor NULLIO option is supplied, FILEIO
|
||||
mode is used.
|
||||
|
||||
For example, "echo "open disk1 /vdisks/disk1" >/proc/scsi_tgt/vdisk/vdisk"
|
||||
will open file /vdisks/disk1 as virtual FILEIO disk with name "disk1".
|
||||
|
||||
|
||||
Credits
|
||||
-------
|
||||
|
||||
|
||||
+1
-21
@@ -223,24 +223,4 @@ extraclean: clean
|
||||
rm Makefile.aa
|
||||
cd $(DEV_HANDLERS_DIR) && $(MAKE) $@
|
||||
|
||||
disable_proc:
|
||||
sed -i.aa s/"^#\?define CONFIG_SCST_PROC"/"\/* #define CONFIG_SCST_PROC *\/"/ ../include/scst.h
|
||||
grep "^\/\* #define CONFIG_SCST_PROC \*\/" ../include/scst.h >/dev/null
|
||||
rm ../include/scst.h.aa
|
||||
sed -i.aa s/"^s\?cst-y += scst_proc.o"/"#scst\-y += scst_proc.o"/ Makefile
|
||||
grep "^#scst\-y += scst_proc.o" Makefile >/dev/null
|
||||
sed -i.aa s/"^#\?scst\-y += scst_sysfs.o"/"scst\-y += scst_sysfs.o"/ Makefile
|
||||
grep "^scst\-y += scst_sysfs.o" Makefile >/dev/null
|
||||
rm Makefile.aa
|
||||
|
||||
enable_proc:
|
||||
sed -i.aa s/"^\/\?\* #define CONFIG_SCST_PROC \*\/"/"#define CONFIG_SCST_PROC"/ ../include/scst.h
|
||||
grep "^#define CONFIG_SCST_PROC" ../include/scst.h >/dev/null
|
||||
rm ../include/scst.h.aa
|
||||
sed -i.aa s/"^#\?scst\-y += scst_proc.o"/"scst\-y += scst_proc.o"/ Makefile
|
||||
grep "^scst\-y += scst_proc.o" Makefile >/dev/null
|
||||
sed -i.aa s/"^s\?cst\-y += scst_sysfs.o"/"#scst\-y += scst_sysfs.o"/ Makefile
|
||||
grep "^#scst\-y += scst_sysfs.o" Makefile >/dev/null
|
||||
rm Makefile.aa
|
||||
|
||||
.PHONY: all install uninstall clean extraclean 2release 2debug 2perf disable_proc enable_proc
|
||||
.PHONY: all install uninstall clean extraclean 2release 2debug 2perf
|
||||
|
||||
+1
-9
@@ -161,15 +161,7 @@ distclean:
|
||||
extraclean:
|
||||
cd $(SCSTADMIN_DIR) && $(MAKE) $@
|
||||
|
||||
disable_proc:
|
||||
-rm -f scstadmin
|
||||
ln -s scstadmin.sysfs scstadmin
|
||||
|
||||
enable_proc:
|
||||
-rm -f scstadmin
|
||||
ln -s scstadmin.procfs scstadmin
|
||||
|
||||
release-archive:
|
||||
../scripts/generate-release-archive scstadmin "$$(sed -n 's/^\$$Version[[:blank:]]*=[[:blank:]]*'"'"'SCST Configurator v\([^'"'"']*\)'"'"'.*/\1/p' scstadmin.sysfs/scstadmin)"
|
||||
|
||||
.PHONY: all install uninstall perl-module clean distclean extraclean disable_proc enable_proc
|
||||
.PHONY: all install uninstall perl-module clean distclean extraclean
|
||||
|
||||
@@ -1,64 +0,0 @@
|
||||
Installation:
|
||||
=============
|
||||
|
||||
Installation is simple.
|
||||
|
||||
#> make
|
||||
#> make install
|
||||
|
||||
This installs scstadmin, the init.d script and the perl module. If you want SCST to
|
||||
startup and configure automatically upon boot, enable SCST using your favorite
|
||||
SysV init editor.
|
||||
|
||||
NOTE: The init.d startup & shutdown scripts now depend on lsb-core. Ensure you have
|
||||
lsb-core installed or 'make install' will fail. Make sure /usr/lib/lsb/install_initd
|
||||
exists.
|
||||
|
||||
To enable the obsolete procfs version:
|
||||
|
||||
#> make enable_proc
|
||||
#> make
|
||||
#> make install
|
||||
|
||||
|
||||
Getting Started:
|
||||
================
|
||||
|
||||
The following pertains to the older procfs based SCST.
|
||||
|
||||
The scstadmin script is much more functional than scst_db at this point but uses a
|
||||
standard text-based config file. The original thought behind scst_db was to write
|
||||
a daemon process which would except network connections and issue SCST commands. A
|
||||
client app would then connect to that port.
|
||||
|
||||
Copy scst.conf to /etc and edit it to your liking. if you have an existing configuration
|
||||
then have scstadmin write it out to a config file for you:
|
||||
|
||||
#> scstadmin -WriteConfig /etc/scst.conf
|
||||
|
||||
When removing devices, users or groups from the config file keep in mind that
|
||||
"scstadmin -config" will NOT remove those configurations from the running system unless
|
||||
you use the -ForceConfig flag. Also, using the init script to reload the configuration
|
||||
|
||||
#> /etc/init.d/scst reload-config
|
||||
|
||||
will also not remove configurations from a running system.
|
||||
|
||||
NOTE! Section "[TARGETS enable]" in the config file is for qla2x00t driver only!
|
||||
|
||||
Mark.Buechler@gmail.com
|
||||
|
||||
|
||||
To Do:
|
||||
======
|
||||
|
||||
- Compare device and assignment options between current and saved configurations and
|
||||
reopen/reassign as required if -ForceConfig is used.
|
||||
|
||||
Completed:
|
||||
==========
|
||||
|
||||
- Create options section to scst.conf which will be carried forward in a -writeconfig.
|
||||
|
||||
- Add option to issue a LIP after any group assignment changes so initiators can see
|
||||
the change immediately.
|
||||
@@ -1,120 +0,0 @@
|
||||
# Automatically generated by SCST Configurator v1.0.11.
|
||||
|
||||
# NOTE: Options are pipe (|) seperated.
|
||||
|
||||
[OPTIONS]
|
||||
#OPTION <1|0|YES|NO|TRUE|FALSE|VALUE>
|
||||
# Copy configuration options during a -writeconfig
|
||||
KEEP_CONFIG TRUE
|
||||
# For FC targets, issue a LIP after every assignment change
|
||||
ISSUE_LIP FALSE
|
||||
|
||||
[HANDLER vdisk]
|
||||
#DEVICE <vdisk name>,<device path>,<options>,<block size>,<t10 device id>
|
||||
DEVICE GW15K000,/dev/evms/GW15K000,,512
|
||||
DEVICE GW15K001,/dev/evms/GW15K001,,512
|
||||
DEVICE MP15K004,/dev/evms/MP15K004,,512
|
||||
DEVICE MP15K005,/dev/evms/MP15K005,,512
|
||||
DEVICE MP15K006,/dev/evms/MP15K006,,512
|
||||
DEVICE MP15K007,/dev/evms/MP15K007,,512
|
||||
DEVICE MP15K008,/dev/evms/MP15K008,,512
|
||||
DEVICE MP15K009,/dev/evms/MP15K009,,512
|
||||
DEVICE MP15K00a,/dev/evms/MP15K00a,,512
|
||||
DEVICE MP15K00b,/dev/evms/MP15K00b,,512
|
||||
DEVICE MP15K00c,/dev/evms/MP15K00c,,512
|
||||
DEVICE MP15K00d,/dev/evms/MP15K00d,,512
|
||||
DEVICE MP15K00e,/dev/evms/MP15K00e,,512
|
||||
DEVICE MS10K006,/dev/evms/MS10K002,,512
|
||||
DEVICE MS15K000,/dev/evms/MS15K000,,512
|
||||
DEVICE MS15K001,/dev/evms/MS15K001,,512
|
||||
DEVICE MS15K002,/dev/evms/MS15K002,,512
|
||||
DEVICE MS15K005,/dev/evms/MS15K003,,512
|
||||
DEVICE RG10K000,/dev/evms/RG10K000,,512
|
||||
DEVICE RG72K001,/dev/evms/RG72K001,,512
|
||||
|
||||
[HANDLER vcdrom]
|
||||
|
||||
[GROUP CORBIN2_a]
|
||||
#USER <user wwn>
|
||||
USER 21:00:00:e0:8b:11:8d:8a
|
||||
|
||||
[GROUP CORBIN3_a]
|
||||
#USER <user wwn>
|
||||
USER 21:00:00:e0:8b:03:9e:1a
|
||||
|
||||
[GROUP MENTASM_a]
|
||||
#USER <user wwn>
|
||||
USER 21:00:00:e0:8b:11:06:8a
|
||||
|
||||
[GROUP PC1_a]
|
||||
#USER <user wwn>
|
||||
USER 21:00:00:e0:8b:11:3f:8d
|
||||
|
||||
[GROUP PC2_a]
|
||||
#USER <user wwn>
|
||||
USER 21:00:00:e0:8b:03:d8:4a
|
||||
|
||||
[GROUP PC3_a]
|
||||
#USER <user wwn>
|
||||
USER 21:00:00:e0:8b:13:ba:01
|
||||
|
||||
[GROUP PC4_a]
|
||||
#USER <user wwn>
|
||||
USER 21:00:00:e0:8b:11:a6:8b
|
||||
|
||||
[GROUP RAISTLIN_a]
|
||||
#USER <user wwn>
|
||||
USER 21:00:00:e0:8b:11:75:8b
|
||||
|
||||
[ASSIGNMENT CORBIN2_a]
|
||||
#ASSIGNMENT <device name>,<lun>,<options>
|
||||
DEVICE MP15K009,0
|
||||
DEVICE MS10K006,1
|
||||
DEVICE RG10K000,2
|
||||
DEVICE RG72K001,3
|
||||
|
||||
[ASSIGNMENT CORBIN3_a]
|
||||
#ASSIGNMENT <device name>,<lun>,<options>
|
||||
DEVICE MP15K00d,0
|
||||
|
||||
[ASSIGNMENT Default]
|
||||
#ASSIGNMENT <device name>,<lun>,<options>
|
||||
DEVICE GW15K000,0
|
||||
DEVICE GW15K001,1
|
||||
|
||||
[ASSIGNMENT MENTASM_a]
|
||||
#ASSIGNMENT <device name>,<lun>,<options>
|
||||
DEVICE MP15K006,0
|
||||
DEVICE MP15K008,1
|
||||
DEVICE MP15K00e,2
|
||||
|
||||
[ASSIGNMENT PC1_a]
|
||||
#ASSIGNMENT <device name>,<lun>,<options>
|
||||
DEVICE MS15K000,0
|
||||
|
||||
[ASSIGNMENT PC2_a]
|
||||
#ASSIGNMENT <device name>,<lun>,<options>
|
||||
DEVICE MS15K005,0
|
||||
|
||||
[ASSIGNMENT PC3_a]
|
||||
#ASSIGNMENT <device name>,<lun>,<options>
|
||||
DEVICE MP15K00c,0
|
||||
|
||||
[ASSIGNMENT PC4_a]
|
||||
#ASSIGNMENT <device name>,<lun>,<options>
|
||||
DEVICE MP15K005,0
|
||||
DEVICE MP15K007,1
|
||||
|
||||
[ASSIGNMENT RAISTLIN_a]
|
||||
#ASSIGNMENT <device name>,<lun>,<options>
|
||||
DEVICE MP15K00a,0
|
||||
DEVICE MP15K00b,1
|
||||
|
||||
[TARGETS enable]
|
||||
# This section is for qla2x00t targets only
|
||||
#HOST <wwn identifier>
|
||||
HOST 0x50060b0000397178
|
||||
HOST 0x50060b000039717a
|
||||
|
||||
[TARGETS disable]
|
||||
# This section is for qla2x00t targets only
|
||||
@@ -1,38 +0,0 @@
|
||||
ifndef PREFIX
|
||||
PREFIX=/usr/local
|
||||
endif
|
||||
|
||||
MODULE_VERSION = 0.8.22
|
||||
TOOL = scstadmin
|
||||
|
||||
SBINDIR := $(PREFIX)/sbin
|
||||
|
||||
all: perl-module
|
||||
|
||||
install install_vendor: all
|
||||
$(MAKE) -C scst-$(MODULE_VERSION) $@ DESTDIR=$(DESTDIR)
|
||||
install -d $(DESTDIR)$(SBINDIR)
|
||||
install -m 755 $(TOOL) $(DESTDIR)$(SBINDIR)
|
||||
|
||||
uninstall:
|
||||
-rm -f $(DESTDIR)$(SBINDIR)/$(TOOL)
|
||||
$(MAKE) -C scst-$(MODULE_VERSION) uninstall
|
||||
|
||||
perl-module:
|
||||
@cd ./scst-$(MODULE_VERSION); \
|
||||
perl Makefile.PL;
|
||||
$(MAKE) -C scst-$(MODULE_VERSION)
|
||||
|
||||
test:
|
||||
$(MAKE) -C scst-$(MODULE_VERSION) test
|
||||
|
||||
clean:
|
||||
-$(MAKE) -C scst-$(MODULE_VERSION) clean
|
||||
|
||||
distclean: clean
|
||||
-rm -f scst-$(MODULE_VERSION)/Makefile.old
|
||||
rm -f *.orig *.rej
|
||||
|
||||
extraclean: distclean
|
||||
|
||||
.PHONY: all install uninstall perl-module clean distclean extraclean
|
||||
@@ -1,4 +0,0 @@
|
||||
lib/SCST/SCST.pm
|
||||
Makefile.PL
|
||||
MANIFEST This list of files
|
||||
README
|
||||
@@ -1,13 +0,0 @@
|
||||
#!/usr/bin/perl -w
|
||||
#
|
||||
# Makefile for the SCST_SCST perl module
|
||||
#
|
||||
|
||||
use ExtUtils::MakeMaker;
|
||||
|
||||
WriteMakefile(
|
||||
'NAME' => 'SCST_SCST',
|
||||
'VERSION_FROM' => 'lib/SCST/SCST.pm',
|
||||
'AUTHOR' => 'Mark R. Buechler <Mark.Buechler@gmail.com>',
|
||||
'PREREQ_PM' => {},
|
||||
);
|
||||
@@ -1,16 +0,0 @@
|
||||
SCST_SCST is a perl module for querying and configuring SCST.
|
||||
|
||||
|
||||
AVAILABILITY
|
||||
|
||||
Currently SCST_SCST ships with SCST itself available from
|
||||
http://scst.sourceforge.net.
|
||||
|
||||
|
||||
INSTALLATION
|
||||
|
||||
Install SCST_SCST as you would any other perl module:
|
||||
|
||||
perl Makefile.PL
|
||||
make
|
||||
make install
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+1
-11
@@ -63,16 +63,6 @@ extraclean:
|
||||
cd $(STPGD_DIR) && $(MAKE) $@
|
||||
cd $(EVENTS_DIR) && $(MAKE) $@
|
||||
|
||||
disable_proc:
|
||||
cd $(FILEIO_DIR) && $(MAKE) $@
|
||||
cd $(STPGD_DIR) && $(MAKE) $@
|
||||
cd $(EVENTS_DIR) && $(MAKE) $@
|
||||
|
||||
enable_proc:
|
||||
cd $(FILEIO_DIR) && $(MAKE) $@
|
||||
cd $(STPGD_DIR) && $(MAKE) $@
|
||||
cd $(EVENTS_DIR) && $(MAKE) $@
|
||||
|
||||
help:
|
||||
@echo " all (the default) : make all"
|
||||
@echo " clean : clean files"
|
||||
@@ -84,4 +74,4 @@ help:
|
||||
@echo " - be sure to compile qla against the correct initiator"
|
||||
@echo " driver. Read its README for details."
|
||||
|
||||
.PHONY: all install uninstall clean extraclean help 2release 2debug 2perf disable_proc enable_proc
|
||||
.PHONY: all install uninstall clean extraclean help 2release 2debug 2perf
|
||||
|
||||
Reference in New Issue
Block a user