|
From: Bart V. A. <bva...@ac...> - 2011-06-10 18:44:47
|
On Fri, Jun 10, 2011 at 4:41 AM, Vladislav Bolkhovitin <vs...@vl...> wrote:
> It looks very good and definitely the right thing to do. Committed,
> thanks!
>
> Should you now update the related parts of READMEs and HOWTOs?
>
Here is a patch for the iSCSI howto - I hope I haven't missed to update
anything:
Index: iscsi-scst/doc/iscsi-scst-howto.txt
===================================================================
--- iscsi-scst/doc/iscsi-scst-howto.txt (revision 3567)
+++ iscsi-scst/doc/iscsi-scst-howto.txt (working copy)
@@ -16,12 +16,12 @@
While iSCSI-SCST works fine with an unpatched Linux kernel with the same
or better speed as other open source iSCSI targets, including IET, if
you want even better performance you have to patch and rebuild the
-kernel. Select the patch according to your kernel version (2.6.18.1 in
+kernel. Select the patch according to your kernel version (2.6.38.x in
the example below):
- cd /usr/src/kernels/linux-2.6.18.1
- patch -p1 <
$HOME/scst/iscsi-scst/kernel/patches/put_page_callback-2.6.18.1.patch
- patch -p1 < $HOME/scst/scst/kernel/scst_exec_req_fifo-2.6.18.patch
+ cd /usr/src/kernels/linux-2.6.38.8
+ patch -p1 <
$HOME/scst/iscsi-scst/kernel/patches/put_page_callback-2.6.38.patch
+ patch -p1 < $HOME/scst/scst/kernel/scst_exec_req_fifo-2.6.38.patch
make clean
Next, build and install the kernel:
@@ -29,21 +29,25 @@
make && make modules
make modules_install && make install
-For some Linux distributions (a.o. Ubuntu and openSUSE) the above steps do
not
-rebuild the initial RAM disk. Make sure you regenerate the RAM disk before
-rebooting. Please look up the documentation of the update-initrd,
-update-initramfs or the mkinitrd command supplied with your distribution.
+For some Linux distributions (e.g. Ubuntu) the above steps do not rebuild
the
+initial RAM disk. Make sure you regenerate the RAM disk before rebooting.
+Please look up the documentation of the update-initrd, update-initramfs or
the
+mkinitrd command supplied with your distribution.
Now reboot your system such that the newly built kernel is loaded.
Once the system is again up and running the next step is to build and
install
-SCST, iSCSI-SCST and scstadmin. You can do this by running the following
-command from the SCST directory:
+SCST, iSCSI-SCST and scstadmin. With most distros (including RHEL 6) you
can
+do that by running the following command from the SCST directory:
make scst scst_install iscsi iscsi_install scstadm scstadm_install
+When using RHEL 5 or CentOS 5, use these commands instead:
+
+ make enable_proc
+ make scst scst_install iscsi iscsi_install scstadm scstadm_install
+
iSCSI-SCST includes the following components:
- * /etc/init.d/iscsi-scst - service script
* iscsi-scstd - daemon
* man pages
* Obsolete configuration files located under iscsi-scst/etc/obsolete,
need to be copied to
@@ -65,13 +69,29 @@
/etc/init.d/open-iscsi start
cat /etc/iscsi/initiatorname.iscsi
-3. Set up /etc/scst.conf
+3. Install scstadmin
+On any distro except RHEL 5, install the administrative scripts as follows:
+
+ cd scstadmin
+ make install
+
+When using RHEL 5 or CentOS 5, use these commands instead:
+
+ cd scstadmin
+ make enable_proc
+ make install
+
+When using the procfs interface, you will also have to uncomment and edit
the
+variable SCST_TARGET_MODULES in /etc/default/scst.
+
+4. Set up /etc/scst.conf
+
The scst.conf configuration file is loaded at system boot time by the
shell script /etc/init.d/iscsi-scst. The target, device and LUN
configuration is defined in this file.
-Here is the sample config file. Copy it in /etc/scst.conf
+Here is a sample config file. Copy it in /etc/scst.conf:
HANDLER vdisk_fileio {
DEVICE disk01 {
@@ -98,40 +118,24 @@
Note that for each SCSI device LUN 0 must exist. This is required by the
SCSI
protocol and is also documented in SCST's README file.
-Then run the following commands:
-
- modprobe scst
- modprobe scst_vdisk
- modprobe iscsi-scst
- iscsi-scstd
- scstadmin -config /etc/scst.conf
-
-You should have the working iSCSI-SCST now. Do the following steps if
-you need to automatically configure it upon reboot.
-
-4. Edit /etc/init.d/iscsi-scst
-
-Add additional modules you need to the ADD_MODULES variable, e.g.
scst_disk.
-
5. Create soft links in /etc/init.d
This will make SCST to start automatically upon system boot. Use either
chkconfig or update-rc.d, depending on the Linux distribution you are
using.
An example for Debian systems such as Ubuntu:
- update-rc.d iscsi-scst defaults
+ update-rc.d scst defaults
-On openSUSE you can let SCST start automatically through the following
commands:
+On openSUSE you can let SCST start automatically through the following
command:
- insserv iscsi-scst
+ insserv scst
6. Restart SCST and iSCSI-SCST
If you don't want to reboot now, you can make the above settings effective
via
-the following commands:
+the following command:
- /etc/init.d/iscsi-scst stop
- /etc/init.d/iscsi-scst start
+ /etc/init.d/scst restart
Installing and using iSCSI-SCST without using scstadmin via /sys interface
|