Web and docs updates

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3563 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Vladislav Bolkhovitin
2011-06-10 01:43:05 +00:00
parent 7943d6466e
commit bcf74cdd7b
8 changed files with 555 additions and 93 deletions

View File

@@ -0,0 +1,356 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<title>How to build and configure QLogic target driver for 22xx/23xx/24xx/25xx adapters on Ubuntu/Debian</title>
<style type="text/css">
li {
padding: 5px 0px 5px 0px;
}
li div {
margin-top: 2px;
margin-bottom: 10px;
}
div {
margin-top: 5px;
margin-bottom: 5px;
}
.specialbox {
margin-left: 10px;
width: 800px;
border: 1px black dotted;
padding: 5px;
background-color: lightgrey;
}
</style>
</head>
<body>
<div style="width: 1024px;">
<div style="text-align: center; width: 1024px;"><strong>How to build and configure QLogic target driver for 22xx/23xx/24xx/25xx adapters on Ubuntu/Debian. A Step by step guide.</strong></div>
<br><br>
<div class="specialbox" style="width: 1024px;">
<strong>Prerequisites:</strong>
<ul style="list-style-type: decimal;">
<li>Ubuntu/Debian 64bit base installation as minumum, fully updated.</li>
<li>Working internet/network connection from this installation (for apt).</li>
<li>Knowledge of configuring a Linux Kernel (a good base to work on is the configuration from the running kernel after installation)</li>
<li>Check if there are any patches for your kernel <a href="https://scst.svn.sourceforge.net/svnroot/scst/trunk/scst/kernel/">here</a></li>
</ul>
</div>
<br>
<div class="specialbox" style="width: 1024px;">
<b>Note 1:</b> I know this guide never builds a debian kernel package, i did not care about this, i only wanted to get the Generic SCSI Target Subsystem for Linux to work. I also know its not a good idea to compile anything as root, but again: i did not care about that either: the machine was a clean install, nobody will ever get hurt by me compiling a kernel or anything else as root.
</div>
<div class="specialbox" style="width: 1024px;">
<b>Note 2:</b> I have to thank the original creator of <a>this guide</a>. I can not find your name but i can say i would not have been able to make it work wihtout it. I have based this document on that HowTo as a template.<br>
</div>
<br>
<div style="text-align: center; width: 1024px;"> <strong>ON TARGET</strong></div>
<ul style="list-style-type: decimal;">
<li>Run the following apt command to install everything you might need or find useful:<br>
<div class="specialbox">
# apt-get install linux-source subversion patch libcunit1-ncurses libncurses5-dev screen cramfsprogs bootcd-mkinitramfs lsscsi
</div></li>
<li>Get the appropiate firmware for your QLogic card from<a href="ftp://ftp.qlogic.com/outgoing/linux/firmware">
ftp://ftp.qlogic.com/outgoing/linux/firmware/</a> and put it under /lib/firmware.
It is strongly recommended to use firmware version 5.x or higher for 24xx/25xx adapters. See
<a href="http://sourceforge.net/mailarchive/forum.php?thread_name=4B4CD39F.6020401%40vlnb.net&amp;forum_name=scst-devel">here</a>
for more details why.
<br><br>
Without a firmware image during boot or when you manually insert the QLogic module, you might
get the following error message in the logs (dmesg, /var/log/kern.log or /var/log/syslog)
<br><br>
&lt; snip &gt;<br>
qla2xxx 0000:13:00.0: Firmware image unavailable.<br>
qla2xxx 0000:13:00.0: Failed to initialize adapter<br>
&lt; snip &gt;<br><br>
In this case I have a Qlogic AR312A/HP FC1242SR with a good firmware preloaded.
</li>
<li>Unzip it in /usr/src/<br>
<div class="specialbox">
# tar jxvf linux-2.x.xxx.tar.bz2
</div></li>
<li>Create symlinks<br>
<div class="specialbox">
# pwd<br>
/usr/src<br>
# ln -s /usr/src/linux-2.x.xxx linux<br>
# ln -s /usr/src/linux-2.x.xxx kernel
</div></li>
<li>Get the SCST code. It is possibile either from the <a href="http://scst.sourceforge.net/downloads.html">SCST downloads page</a>
or from the SVN code base.<br><br>
Below we will consider the case of the downloaded from the SVN code. For the release code everything is the same.
You only need unpack all downloaded SCST archives in one directory. It then will contain similar content as
~scst/trunk/ below.<br>
<div class="specialbox">
# svn co https://scst.svn.sourceforge.net/svnroot/scst
</div>
If the command returns successfully then you'll have 'scst'<br>
directory under your current directory ( here it is /root )<br><br>
</li>
<li>Change directory to ~scst/trunk/<br>
<div class="specialbox">
# ls -1<br>
AskingQuestions<br>
doc<br>
fcst<br>
ibmvstgt<br>
iscsi-scst<br>
Makefile<br>
mpt<br>
mvsas_tgt<br>
nightly<br>
qla2x00t<br>
qla_isp<br>
qla_isp-release.patch<br>
README<br>
scripts<br>
scst<br>
scstadmin<br>
scst_local<br>
srpt<br>
SVN_TAGS<br>
usr<br>
www
</div>
</li>
<li>Patch the kernel (the kernel version you've downloaded in step 1)<br>
<div class="specialbox">
# cp /root/scst/trunk/scst/kernel/scst_exec_req_fifo-2.x.xxx.patch /usr/src/linux/<br>
# cd /usr/src/linux/<br>
# patch -p1 &lt; scst_exec_req_fifo-2.x.xxx.patch<br>
</div>
</li>
<li>Replace the QLogic FC driver code in the kernel source tree with the modified version
of QLogic FC driver code from scst code base.<br>
<div class="specialbox">
# pwd<br>
/root/scst/trunk<br>
# mv /usr/src/linux/drivers/scsi/qla2xxx /usr/src/linux/drivers/scsi/qla2xxx_orig<br>
# ln -s /root/scst/trunk/qla2x00t /usr/src/linux/drivers/scsi/qla2xxx
</div>
</li>
<li>Now build the kernel.<br><br>
Make sure you disable kernel hacking feature, and enable
"Device Drivers-&gt;SCSI device support-&gt;SCSI low level drivers-&gt;Qlogic 2xxx target mode support"<br>
(i.e. CONFIG_SCSI_QLA2XXX_TARGET=y)<br>
Also turn OFF HIGHMEM4G|HIGHMEM64G, i.e.<br>
<div class="specialbox">
# grep -i highmem /usr/src/linux/.config<br>
CONFIG_NOHIGHMEM=y<br>
# CONFIG_HIGHMEM4G is not set<br>
# CONFIG_HIGHMEM64G is not set
</div>
If you have system with more than 1GB of memory, consider to change CONFIG_VMSPLIT option to the corresponding value.<br>
<div class="specialbox">
# pwd<br>
/usr/src/linux<br>
# make menuconfig<br>
# make bzImage<br>
# make modules<br>
# make modules_install<br>
# make install
</div>
</li>
<li>Reboot the machine and during boot select the modified kernel to boot from.</li>
<li>Depending on your requirement (performance/debugging) apply the appropiate
patches that comes with choose the appropriate SCST build mode. By default SCST has debug build mode.
Here is how to switch to the release mode:<br>
<div class="specialbox">
# pwd<br>
/root/scst/trunk<br>
# make debug2release
</div>
</li>
<li>First make sure that the link "/lib/modules/`uname -r`/build"<br>
points to the current running kernel sources. Now build the modules.<br>
<ul style="list-style-type= lower-alpha;">
<li> Build scst.<br>
<div class="specialbox">
# cd /root/scst/trunk/scst/src<br>
# make all (here I am building everything)<br>
# make install
</div>
</li>
<li> Build QLogic target driver<br>
<div class="specialbox">
# cd /root/scst/trunk/qla2x00t/qla2x00-target/<br>
# make<br>
# make install
</div>
</li>
</ul>
</li>
<li>Insert the modules.<br>
The driver modules will be installed in '/lib/modules/`you_kernel_version`/extra'.<br>
In addition, scst.h, scst_debug.h as well as Module.symvers or
Modules.symvers will be copied to '/usr/local/include/scst'.<br> The first
file contains all SCST's public data definition, which are used by
target drivers. The other ones support debug messages logging and build process.<br>
<div class="specialbox">
# ls -l /lib/modules/`uname -r`/extra<br>
total 232<br>
drwxr-xr-x 2 root root 4096 Jun 20 18:43 dev_handlers<br>
-rw-r--r-- 1 root root 36756 Jun 20 18:46 qla2x00tgt.ko<br>
-rw-r--r-- 1 root root 160192 Jun 20 18:46 qla2xxx.ko <br>
-rw-r--r-- 1 root root 190848 Jun 20 18:43 scst.ko<br><br>
# ls -l /lib/modules/`uname -r`/extra/dev_handlers<br>
total 192<br>
-rw-r--r-- 1 root root 11757 Jun 20 18:43 scst_cdrom.ko<br>
-rw-r--r-- 1 root root 10111 Jun 20 18:43 scst_changer.ko<br>
-rw-r--r-- 1 root root 12420 Jun 20 18:43 scst_disk.ko<br>
-rw-r--r-- 1 root root 12449 Jun 20 18:43 scst_modisk.ko<br>
-rw-r--r-- 1 root root 10131 Jun 20 18:43 scst_processor.ko<br>
-rw-r--r-- 1 root root 10081 Jun 20 18:43 scst_raid.ko<br>
-rw-r--r-- 1 root root 12563 Jun 20 18:43 scst_tape.ko<br>
-rw-r--r-- 1 root root 37937 Jun 20 18:43 scst_user.ko<br>
-rw-r--r-- 1 root root 50194 Jun 20 18:43 scst_vdisk.ko
</div>
Where:<br>
- scst - SCST itself<br>
- scst_disk - device handler for disks (type 0)<br>
- scst_tape - device handler for tapes (type 1)<br>
- scst_processor - device handler for processors (type 3)<br>
- scst_cdrom - device handler for CDROMs (type 5)<br>
- scst_modisk - device handler for MO disks (type 7)<br>
- scst_changer - device handler for medium changers (type 8)<br>
- scst_raid - device handler for storage array controller (e.g. raid) (type C)<br>
- scst_vdisk - device handler for virtual disks (file, device or ISO CD image).<br>
- scst_user - user space device handler<br><br>
You can insert any of these modules by 'modprobe' program, I've inserted all
the modules !!!<br>
<div class="specialbox">
# for _mod in scst qla2xxx qla2x00tgt scst_vdisk scst_user scst_disk [...etc snip]; do modprobe $_mod; done
</div><br>
&lt; snip from dmesg &gt;<br><br>
scst: SCST version 2.0.0 loaded successfully (max mem for commands 16251MB, per device 6500MB)<br>
scst: Enabled features: TRACING<br>
scst: Target template qla2x00tgt registered successfully<br>
scst: Virtual device handler vdisk for type 0 registered successfully<br>
scst: Virtual device handler "scst_user" registered successfully<br><br>
&lt; snip from dmesg &gt;
</li>
<li>Now let's create our virtual device:<br>
<div class="specialbox">
# dd if=/dev/zero of=/mnt/disk1 bs=1024k count=512<br>
512+0 records in<br>
512+0 records out<br>
# ls -l /mnt/disk1<br>
-rw-r--r-- 1 root root 536870912 Jun 23 13:27 /mnt/disk1<br>
# file /mnt/disk1<br>
/mnt/disk1: data
</div>
</li>
<li>To see the device remotely, we have to add it to at least in the LUNs set for our target.<br>
We must have LUN 0 (LUs numeration must not start from, e.g., 1).<br><br>
The simplest way to do that is to write an scstadmin's config file:<br><br>
<div class="specialbox">
HANDLER vdisk_fileio {<br>
&nbsp; DEVICE disk1 {<br>
&nbsp;&nbsp; filename /mnt/disk1<br>
&nbsp; }<br>
}<br><br>
TARGET_DRIVER qla2x00t {<br>
&nbsp; TARGET 25:00:00:f0:98:87:92:f3 {<br>
&nbsp;&nbsp; LUN 0 disk1<br><br>
&nbsp;&nbsp; enabled 1<br>
&nbsp; }<br>
}
</div><br>
To use it, we need to install scstadmin:<br><br>
<div class="specialbox">
# pwd<br>
/root/scst/trunk/scstadmin<br>
# make<br>
# make install
</div><br>
Let's save our config file as /etc/scst.conf<br><br>
Now run scstadmin:<br><br>
<div class="specialbox">
# scstadmin -config /etc/scst.conf
Collecting current configuration: done.<br><br>
-&gt; Checking configuration file 'qq' for errors.<br>
-&gt; Done, 0 warnings found.<br><br>
-&gt; Opening device 'disk1' using handler 'vdisk_fileio': done.<br>
-&gt; Adding device 'disk1' at LUN 0 to driver/target 'qla2x00t/25:00:00:f0:98:87:92:f3': done.<br>
-&gt; Enabling driver/target 'qla2x00t/25:00:00:f0:98:87:92:f3': done.<br><br>
All done.
</div><br>
The same can be done directly via SCST's sysfs interface:<br><br>
<div class="specialbox">
# echo "add_device disk1 filename=/mnt/disk1" &gt;/sys/kernel/scst_tgt/handlers/vdisk_fileio/mgmt<br>
# echo "add disk1 0" &gt;/sys/kernel/scst_tgt/targets/qla2x00t/25:00:00:f0:98:87:92:f3/luns/mgmt<br>
# echo "1" &gt;/sys/kernel/scst_tgt/targets/qla2x00t/25:00:00:f0:98:87:92:f3/enabled
</div>
</li>
</ul>
<div style="text-align: center; width: 1024px;"><strong>ON INITIATOR</strong></div>
<ul style="list-style-type: decimal;">
<li>&lt; snip from README &gt;<br>
Without loading appropriate device handler, corresponding device
will be invisible for remote initiators, hence we have to
add them manully.<br>
&lt; snip from README &gt;<br><br>
But as I've already loaded the device handler(scst_vdisk) on the target,
hence I don't need to perform step 17. <br><br>
</li>
<li>After enabling the target mode on the target (see step 16),
to see new targets and devices you need either to rescan
initiator(s) manually, for example, by rmmod/modprobe the
corresponding FC device module on the initiator, or reboot the initiator itself.
Automatic discovery isn't supported by all known initiators,
so you need a way to make SCSI subsystem on the initiator to do the new devices discovery and hence be able to see
the new devices attached.<br><br>
Alternatively, if your initiator already connected to the target and you simply added new devices to it, you can try to run
a manual rescan by:<br>
<div class="specialbox">
# echo "- - -" &gt;/sys/class/scsi_host/hostX/scan
</div>
Where X is the host number
</li>
</ul>
<div style="text-align: center; width: 1024px;"><strong>ALL DONE, YOU SHOULD NOW HAVE A WORKING TARGET!</strong></div>
</div>
</body>
</html>

View File

@@ -37,6 +37,7 @@
<h1>Comparison</h1>
<ul class="sidemenu">
<li><a href="comparison.html">Features comparison</a></li>
<li><a href="scstvslio.html">SCST vs LIO/TCM</a></li>
<li><a href="scstvsstgt.html">SCST vs STGT</a></li>
<li><a href="mc_s.html">MC/S vs MPIO</a></li>
</ul>
@@ -51,7 +52,7 @@
mailing list and it will be corrected.
</p>
<p><small>As on September 2010. Partially updated in December 2010.</small></p>
<p><small>As on June 2011.</small></p>
<table bgcolor="#F0F0F0" border="1" cellspacing="1" cellpadding="7" style="text-align:center" width="620">
@@ -60,7 +61,7 @@
</td><td><b><a href="http://scst.sourceforge.net/" title="http://scst.sourceforge.net/" rel="nofollow">SCST</a></b>
</td><td><b><a href="http://stgt.berlios.de/" title="http://stgt.berlios.de/" rel="nofollow">STGT</a></b>
</td><td><b><a href="http://iscsitarget.sourceforge.net/" title="http://iscsitarget.sourceforge.net/" rel="nofollow">IET</a></b>
</td><td><b><a href="http://linux-iscsi.org/" title="http://linux-iscsi.org/" rel="nofollow">LIO</a></b>
</td><td><b><a href="scstvslio.html">LIO/TCM</a></b>
</td></tr>
<tr bgcolor="#E0E0E0">
@@ -69,7 +70,7 @@
<tr>
<td align="left"><b>Upstream kernel</b></td> <td> - </td> <td>Interface with
in-kernel target
drivers</td> <td> - </td> <td> - </td>
drivers (obsolete)</td> <td> - </td> <td> <a href="scstvslio.html">Since 2.6.38</a></td>
</tr>
<tr>
<td align="left"><b>Generic Target Engine</b></td> <td> + </td> <td> + </td> <td> iSCSI only </td> <td> + </td>
@@ -80,22 +81,19 @@
</sup> </td> <td> - </td> <td> Kernel only </td>
</tr>
<tr>
<td align="left"><b>Stability</b></td> <td> + </td> <td> +
<sup><A HREF="#3">3</A>
</sup> </td> <td> + </td> <td> Probably (no released packages) </td>
<td align="left"><b>Stability</b></td> <td> + </td> <td> + </td> <td> + </td> <td> Probably (no released packages) </td>
</tr>
<tr>
<td align="left"><b>Performance <sup><A HREF="#4">4</A></sup></b></td> <td> ***** <sup>
<A HREF="#5">5</A>
</sup></td> <td> ***</td> <td> **** </td> <td> ****
<sup><A HREF="#6">6</A></sup></td>
<td align="left"><b>Performance <sup><A HREF="#3">3</A></sup></b></td> <td> ***** <sup>
<A HREF="#4">4</A>
</sup></td> <td> ***</td> <td> **** </td> <td> **** </td>
</tr>
<tr>
<th align="left"> Zero-copy passing data between target and
backend drivers</th> <td> + <sup>
<A HREF="#7">7</A>
<A HREF="#5">5</A>
</sup></td> <td> + <sup>
<A HREF="#8">8</A>
<A HREF="#6">6</A>
</sup> </td> <td> + </td> <td> + </td>
</tr>
<tr>
@@ -129,7 +127,7 @@ transfer values (Wide (parallel) SCSI, SAS)</b></td> <td> + </td> <td> - </td
</tr>
<tr>
<td align="left"><b>Advanced devices access control
<sup><A HREF="#10">10</A></sup></b></td> <td> + </td> <td> - </td> <td> - </td> <td> + </td>
<sup><A HREF="#8">8</A></sup></b></td> <td> + </td> <td> - </td> <td> - </td> <td> + </td>
</tr>
<tr>
<td align="left"><b>Automatic sessions reassignment (changes in the
@@ -145,10 +143,10 @@ resized through AENs or Unit Attentions (initiators can instantly see
any target reconfiguration in a PnP-like manner)</b></td> <td> + </td> <td> - </td> <td> - </td> <td> - </td>
</tr>
<tr>
<td align="left"><b>Bidirectional Commands</b></td> <td> +</td> <td> + </td> <td> - </td> <td> - </td>
<td align="left"><b>Bidirectional Commands</b></td> <td> +</td> <td> + </td> <td> - </td> <td> + </td>
</tr>
<tr>
<td align="left"><b>Extended CDB (size >16 bytes)</b></td> <td> +</td> <td> + </td> <td> - </td> <td> - </td>
<td align="left"><b>Extended CDB (size >16 bytes)</b></td> <td> +</td> <td> + </td> <td> - </td> <td> + </td>
</tr>
<tr>
<td align="left"><b>Descriptor sense support</b></td> <td> + </td> <td> + </td> <td> - </td> <td> - </td>
@@ -159,12 +157,12 @@ any target reconfiguration in a PnP-like manner)</b></td> <td> + </td> <td> -
</tr>
<tr>
<td align="left"><b>Safe RESERVE/RELEASE implementation according to
SCSI requirements <sup><A HREF="#12">12</A></sup></b></td> <td> Safe </td> <td> Safe </td> <td> Safe from
SCSI requirements <sup><A HREF="#10">10</A></sup></b></td> <td> Safe </td> <td> Safe </td> <td> Safe from
v1.4.18</td> <td> Not safe </td>
</tr>
<tr>
<td align="left"><b>Safe implementation of Task Management commands
<sup><A HREF="#13">13</A></sup></b></td> <td> Safe </td> <td> Not safe </td> <td> Not safe </td> <td> LUN RESET - safe.
<sup><A HREF="#11">11</A></sup></b></td> <td> Safe </td> <td> Not safe </td> <td> Not safe </td> <td> LUN RESET - safe.
Other TM commands not
implemented. </td>
</tr>
@@ -172,11 +170,11 @@ SCSI requirements <sup><A HREF="#12">12</A></sup></b></td> <td> Safe </td> <td
<td align="left"><b>Support for SCSI task attributes, including
ORDERED commands</b></td> <td> + </td> <td> + </td> <td> -, <br> data
corruption possible
<sup><A HREF="#14">
14</A></sup></td> <td> -, <br>data
<sup><A HREF="#12">
12</A></sup></td> <td> -, <br>data
corruption possible
<sup><A HREF="#14">
14</A></sup> </td>
<sup><A HREF="#12">
12</A></sup> </td>
</tr>
<tr>
<td align="left"><b>Persistent (SCSI-3) Reservations
@@ -188,8 +186,11 @@ ORDERED commands</b></td> <td> + </td> <td> + </td> <td> -, <br> data
Through Power Loss Persistent Reservation data</b></td> <td> Durable </td> <td>Not supported</td> <td> - </td> <td> Not durable </td>
</tr>
<tr>
<td align="left"><b>ALUA</b></td> <td> - </td> <td> - </td> <td> - </td> <td> +/-<sup><A HREF="#22">
22</A></sup></td>
<td align="left"><b>ALUA</b></td> <td> +/- (Implicit
only)<sup>
<A HREF="#20">20</A>
</sup> </td> <td> - </td> <td> - </td> <td> +/-<sup><A HREF="#20">
20</A></sup></td>
</tr>
<tr>
<td align="left"><b>Failover Clustering</b></td> <td> + </td> <td> + </td> <td> + </td> <td> + </td>
@@ -228,11 +229,11 @@ to allocate too much memory for buffers and go into OOM state
</tr>
<tr>
<td align="left"><b>Configuration tool with ability to automatically
apply changes in the config file on fly without any restarts</b></td> <td> scstadmin </td> <td> - </td> <td> - </td> <td> - </td>
apply changes in the config file on fly without any restarts</b></td> <td> scstadmin </td> <td> - </td> <td> - </td> <td> rtsadmin? </td>
</tr>
<tr>
<td align="left"><b>SCSI MIBs</b></td> <td> - </td> <td> - </td> <td> - </td> <td> +-
<sup><A HREF="#15">15</A></sup></td>
<sup><A HREF="#13">13</A></sup></td>
</tr>
@@ -243,19 +244,16 @@ apply changes in the config file on fly without any restarts</b></td> <td> scsta
<td align="left"><b>iSCSI</b></td> <td> + </td> <td> + </td> <td> + </td> <td> + </td>
</tr>
<tr>
<td align="left"><b>QLogic (Fibre Channel)</b></td> <td> + </td> <td> - </td> <td> - </td> <td> Preliminary
(just added) </td>
<td align="left"><b>QLogic (Fibre Channel)</b></td> <td> + </td> <td> - </td> <td> - </td> <td> Preliminary</td>
</tr>
<tr>
<td align="left"><b>Emulex (Fibre Channel and FCoE)</b></td> <td> + </td> <td> - </td> <td> - </td> <td> - </td>
</tr>
<tr>
<td align="left"><b>SRP</b></td> <td> + </td> <td> - </td> <td> - </td> <td> - </td>
<td align="left"><b>SRP</b></td> <td> + </td> <td> - </td> <td> - </td> <td> Preliminary </td>
</tr>
<tr>
<td align="left"><b>iSER</b></td> <td> - </td> <td> +
<sup><A HREF="#3">3</A>
</sup> </td> <td> - </td> <td> - </td>
<td align="left"><b>iSER</b></td> <td> - </td> <td> + </td> <td> - </td> <td> - </td>
</tr>
<tr>
<td align="left"><b>Marvell (SAS)</b></td> <td> Beta </td> <td> - </td> <td> - </td> <td> - </td>
@@ -273,11 +271,11 @@ apply changes in the config file on fly without any restarts</b></td> <td> scsta
(not completed) </td> <td> - </td> <td> - </td> <td> - </td>
</tr>
<tr>
<td align="left"><b>IBM pSeries Virtual SCSI</b></td> <td> + </td> <td> + </td> <td> - </td> <td> - </td>
<td align="left"><b>IBM pSeries Virtual SCSI</b></td> <td> + </td> <td> + </td> <td> - </td> <td> Preliminary </td>
</tr>
<tr>
<td align="left"><b>Local access to emulated backstorage devices
<sup><A HREF="#9">9</A></sup></b></td> <td> scst_local </td> <td> - </td> <td> - </td> <td> tcm_loop </td>
<sup><A HREF="#7">7</A></sup></b></td> <td> scst_local </td> <td> - </td> <td> - </td> <td> tcm_loop </td>
</tr>
<tr bgcolor="#E0E0E0">
<td colspan="5"> <b>Supported backstorage</b>
@@ -302,35 +300,33 @@ apply changes in the config file on fly without any restarts</b></td> <td> scsta
</tr>
<tr>
<td align="left"><b>SCSI pass-through
<sup><A HREF="#16">16</A></sup></b></td> <td> + </td> <td> Single
<sup><A HREF="#14">14</A></sup></b></td> <td> + </td> <td> Single
initiator only, not
enforced, limited
functionality for tapes
<sup>
<A HREF="#17">17</A>
enforced<sup>
<A HREF="#15">15</A>
</sup> </td> <td> - </td> <td> Single initiator only, not enforced,
limited functionality for tapes
<sup><A HREF="#17">17</A></sup></td>
<sup><A HREF="#15">15</A></sup></td>
</tr>
<tr>
<td align="left"><b>Zero-copy data read/write to/from backstorage
</b></td> <td>BLOCKIO, user space
FILEIO in O_DIRECT mode,
pass-through <sup>
<A HREF="#18">18</A>
<A HREF="#16">16</A>
</sup></td> <td> - <sup>
<A HREF="#8">8</A>
<A HREF="#6">6</A>
</sup> </td> <td> BLOCKIO </td> <td> BLOCKIO, pass-
through </td>
</tr>
<tr>
<td align="left"><b>Cache safe<sup><A HREF="#11">11</A></sup>
<td align="left"><b>Cache safe<sup><A HREF="#9">9</A></sup>
FILEIO</b></td> <td> Safe </td> <td>Safe only RDWR
backend</td> <td> Safe </td> <td> + (just added) </td>
backend</td> <td> Safe </td> <td> Safe </td>
</tr>
<tr>
<td align="left"><b>Cache safe<sup><A HREF="#11">11</A></sup>
BLOCKIO</b></td> <td> Safe </td> <td> - </td> <td> Not safe </td> <td> + (just added)</td>
<td align="left"><b>Cache safe<sup><A HREF="#9">9</A></sup>
BLOCKIO</b></td> <td> Safe </td> <td> - </td> <td> Not safe </td> <td> Safe </td>
</tr>
<tr>
<td align="left"><b>4k sectors support in pass-through mode</b></td> <td> + </td> <td> - </td> <td> - </td> <td> ? </td>
@@ -352,7 +348,7 @@ CD devices</b></td> <td> - </td> <td> + </td> <td> - </td> <td> - </td>
devices (VTL)</b></td> <td> - </td> <td>Experimental</td> <td> - </td> <td> - </td>
</tr>
<tr>
<td align="left"><b>Thin provisioning support</b></td> <td>+<br></td> <td> - </td> <td> - </td> <td> + (just added) </td>
<td align="left"><b>Thin provisioning support</b></td> <td>+<br></td> <td> - </td> <td> - </td> <td> + </td>
</tr>
<tr bgcolor="#E0E0E0">
@@ -374,10 +370,10 @@ devices (VTL)</b></td> <td> - </td> <td>Experimental</td> <td> - </td> <
</tr>
<tr>
<td align="left"><b>Zero-copy data send/receive</b></td> <td> Send only<sup>
<A HREF="#19">19</A>
<A HREF="#17">17</A>
</sup> </td> <td> In some cases,
send only <sup>
<A HREF="#8">8</A>
<A HREF="#6">6</A>
</sup> </td> <td> Send only</td> <td> Send only </td>
</tr>
<tr>
@@ -418,38 +414,38 @@ target reconfiguration in a PnP-like manner)</b></td> <td> + </td> <td> - </t
</tr>
<tr>
<td align="left"><b>Safe implementation of Task Management commands
<sup><A HREF="#13">13</A></sup></b></td> <td> Safe </td> <td> Not safe </td> <td> Not safe </td> <td> ABORT TASK - not safe,
<sup><A HREF="#11">11</A></sup></b></td> <td> Safe </td> <td> Not safe </td> <td> Not safe </td> <td> ABORT TASK - not safe,
LUN RESET - safe,
other TM commands not
implemented. </td>
</tr>
<tr>
<td align="left"><b>Safe implementation of connections and sessions
reinstatement <sup><A HREF="#20">20</A></sup></b></td> <td> Safe </td> <td> Not safe </td> <td> Not safe </td> <td> Not safe </td>
reinstatement <sup><A HREF="#18">18</A></sup></b></td> <td> Safe </td> <td> Not safe </td> <td> Not safe </td> <td> Not safe </td>
</tr>
<tr>
<td align="left"><b>Usage of hardware instructions for digest
calculations, if available</b></td> <td> + </td> <td> - </td> <td> - </td> <td> + (just added) </td>
calculations, if available</b></td> <td> + </td> <td> - </td> <td> - </td> <td> + </td>
</tr>
<tr>
<td align="left"><b>Each connection multithreaded digest calculation
</b></td> <td> + </td> <td> - </td> <td> - </td> <td> - </td>
</tr>
<tr>
<td align="left"><b>Safe restart <sup><A HREF="#21">21</A></sup>
<td align="left"><b>Safe restart <sup><A HREF="#19">19</A></sup>
</b></td> <td> Safe </td> <td> ? </td> <td> Not safe before
v1.4.18. After -
probably safe.</td> <td> ?</td>
</tr>
<tr>
<td align="left"><b>iSCSI MIBs</b></td> <td> - </td> <td> - </td> <td> - </td> <td> +-
<sup><A HREF="#15">15</A></sup></td>
<sup><A HREF="#13">13</A></sup></td>
</tr>
<tr bgcolor="#E0E0E0">
<td colspan="5"> <b>Local access target</b>
</td></tr>
<tr>
<td align="left"><b>Bidirectional support</b></td> <td> + </td> <td> - </td> <td> - </td> <td> - </td>
<td align="left"><b>Bidirectional support</b></td> <td> + </td> <td> - </td> <td> - </td> <td> + </td>
</tr>
<tr>
<td align="left"><b>Support for AENs (initiators can instantly see any
@@ -466,54 +462,43 @@ target reconfiguration in a PnP-like manner)</b></td> <td> + </td> <td> - </t
<p><A NAME="2"></A> 2. All iSCSI management implemented in user space and actual data transfers in kernel space without user space involved.</p>
<p><A NAME="3"></A> 3. ISER target driver has long known (since Feb 2008) data corruption problem, which localization hasn't been
determined yet and might be in the STGT core. See
<a href="http://lists.berlios.de/pipermail/stgt-devel/2008-February/001367.html">here</a>,
<a href="http://lists.wpkg.org/pipermail/stgt/2009-February/002630.html">here</a> and
<a href="http://lists.wpkg.org/pipermail/stgt/2010-August/004076.html">here</a>.</p>
<p><A NAME="4"></A> 4. The result "in average" is listed. One target can be better somewhere, another one somewhere else. Although manual tuning of target and
<p><A NAME="3"></A> 3. The result "in average" is listed. One target can be better somewhere, another one somewhere else. Although manual tuning of target and
system parameters tends the restore the difference listed in the comparison. You can find example measurements <a href="vl_res.txt">here</a>,
<a href="bart_res.txt">here</a> and <a href="tomasz_res.txt">here</a>.</p>
<p><A NAME="5"></A> 5. All SCST and its drivers' kernel patches supposed to be applied and SCST with the drivers built in the release or performance build.
<p><A NAME="4"></A> 4. All SCST and its drivers' kernel patches supposed to be applied and SCST with the drivers built in the release or performance build.
Without the kernel patches SCST performance will be at "****+" level, except for the case, when user space backstorage handler used
with iSCSI-SCST iSCSI target driver, where performance will be at "***+" level.</p>
<p><A NAME="6"></A> 6. There is no performance data for LIO, which allow to make a direct comparison with other targets.
The conclusion was made based on source code study. LIO should have performance on the IET level or less,
because of more processing overhead. It might be much less for small block sizes. Also the single I/O thread per-device
approach LIO has is not optimal in many cases.</p>
<p><A NAME="7"></A> 7. In SCST data are always passed in zero-copy manner between target and backend drivers without need for any
<p><A NAME="5"></A> 5. In SCST data are always passed in zero-copy manner between target and backend drivers without need for any
additional kernel patches, except in case, when local access (scst_local) used with user space backend. </p>
<p><A NAME="8"></A> 8. Some zero-copy functionality isn't available from user space, sometimes fundamentally.
<p><A NAME="6"></A> 6. Some zero-copy functionality isn't available from user space, sometimes fundamentally.
For instance, zero-copy FILEIO with page cache or zero-copy send to a socket. Also STGT can't use splice() for in-kernel
target drivers, because it has memory management in user space. To use splice() with socket-based user space target drivers
STGT would need a deep redesign of internal interactions between target drivers, core and backend handlers. But in
some cases STGT can use zero-copy sendfile().</p>
<p><A NAME="9"></A> 9. Local access to emulated backstorage devices" means that you can access emulated by a SCSI target devices
<p><A NAME="7"></A> 7. "Local access to emulated backstorage devices" means that you can access emulated by a SCSI target devices
locally on the target host. For instance, you can mount your ISO image from emulated by the target
CDROM device locally on the target host.</p>
<p><A NAME="10"></A> 10. "Advanced devices access control" means that different initiators can see different sets
<p><A NAME="8"></A> 8. "Advanced devices access control" means that different initiators can see different sets
of devices from the same target. This feature is required for hardware targets, which don't have ability
to create virtual targets.</p>
<p><A NAME="11"></A> 11. "Cache safe" means that cache synchronization commands (SYNCHRONIZE_CACHE and FUA attribute) from initiators perform
<p><A NAME="9"></A> 9. "Cache safe" means that cache synchronization commands (SYNCHRONIZE_CACHE and FUA attribute) from initiators perform
what they expected to perform, i.e. push all the requested blocks from all caches, including devices' caches,
to non-volatile media.</p>
<p><A NAME="12"></A> 12. SCSI requires that if an initiator clears reservation held by another initiator, the reservation holder must be notified
<p><A NAME="10"></A> 10. SCSI requires that if an initiator clears reservation held by another initiator, the reservation holder must be notified
about the reservation clearance. Otherwise, several initiators can at the same time change supposed to be protected by the
reservation data, which can corrupt them. This is what was called
<a href="http://communities.vmware.com/thread/53797?tstart=0&amp;start=15">"Russian roulette with your data"</a> on the VMware
community forum by someone working for VMware. But, sure, it can affect not only VMware, but also any other cluster
implementation, relying on this functionality.</p>
<p><A NAME="13"></A> 13. After a task management command completed and before the corresponding response was sent to the initiator, who sent that task management
<p><A NAME="11"></A> 11. After a task management command completed and before the corresponding response was sent to the initiator, who sent that task management
command, all the affected SCSI commands must get into a state, where they can't affect following after
the tasks management response commands from this initiator. This is the safe implementation.
The unsafe implementation only marks all the affected
@@ -523,44 +508,43 @@ target reconfiguration in a PnP-like manner)</b></td> <td> + </td> <td> - </t
SCSI command, which initiator will send after it received the task management response thinking
that all the aborted commands actually fully aborted. This could lead to a data corruption.</p>
<p><A NAME="14"></A> 14. Both IET and LIO report in INQUIRY command response support for full task management model. But they process ORDERED
<p><A NAME="12"></A> 12. Both IET and LIO report in INQUIRY command response support for full task management model. But they process ORDERED
commands the same way as SIMPLE commands, i.e. allow free reorder of them before they get executed. That violates SCSI standard
and can lead to a data corruption to any application relying on commands order provided by ORDERED attribute.</p>
<p><A NAME="15"></A> 15. LIO exports the information needed for an RFC 4455 implementation, but requires additional RFC 4455 implementing module.
<p><A NAME="13"></A> 13. LIO exports the information needed for an RFC 4455 implementation, but requires additional RFC 4455 implementing module.
At the moment, there is no open source implementation of such module.</p>
<p><A NAME="16"></A> 16. SCSI pass-through mode allows to export your local SCSI-capable device. For instance with it you can share your parallel
<p><A NAME="14"></A> 14. SCSI pass-through mode allows to export your local SCSI-capable device. For instance with it you can share your parallel
SCSI tape or SATA DVD-RW device to your iSCSI network.</p>
<p><A NAME="17"></A> 17. STGT and LIO don't emulate all the necessary SCSI host functionality to allow to share SCSI devices
<p><A NAME="15"></A> 15. STGT and LIO don't emulate all the necessary SCSI host functionality to allow to share SCSI devices
in pass-through mode to several initiators, although LIO has some necessary processing, but not all.
They can only pass SCSI commands from initiators to
SCSI devices and responses back. This is safe only with a single initiator. This limitation
isn't enforced anyhow and both STGT and LIO don't issue any warning about it, so an user will not be notified about this
limitation and can quietly corrupt his/her data. You can find more technical information about it
<a href="http://www.mail-archive.com/linux-scsi@vger.kernel.org/msg06911.html">here</a>.
Also neither STGT, nor LIO in pass-through mode do the necessary sense processing for tape devices to
correctly return residual information, so tapes can used with them with limited functionality.</p>
Also LIO in pass-through mode doesn't do necessary sense processing for tape devices to
correctly return residual information, so tapes can used with it with limited functionality.</p>
<p><A NAME="18"></A> 18. You can find a proposal how to implement zero-copy FILEIO in SCST on the <a href="contributing.html#ZC_READ">
<p><A NAME="16"></A> 16. You can find a proposal how to implement zero-copy FILEIO in SCST on the <a href="contributing.html#ZC_READ">
Contributing</a> page.</p>
<p><A NAME="19"></A> 19. Doesn't need any kernel patch, except in the case, when used with user space backend.</p>
<p><A NAME="17"></A> 17. Doesn't need any kernel patch, except in the case, when used with user space backend.</p>
<p><A NAME="20"></A> 20. Connections and sessions reinstatement is, basically, a kind of Task Management command, because it implies commands aborting.
<p><A NAME="18"></A> 18. Connections and sessions reinstatement is, basically, a kind of Task Management command, because it implies commands aborting.
So, similarly to the safe task management above, a safe implementation of connections and sessions reinstatement
must not accept SCSI commands from new connection/session until all the SCSI commands in
being reinstated connection/session get into a state, where they can't affect new commands.</p>
<p><A NAME="21"></A> 21. "Safe restart" means that after the iSCSI target restart, all the connected initiators will seamlessly restore all existing before
<p><A NAME="19"></A> 19. "Safe restart" means that after the iSCSI target restart, all the connected initiators will seamlessly restore all existing before
the restart connections. "Not safe" means that, most likely, the connected initiators will fail to restore
existing connections with some errors. However, your iSCSI initiator also should be able to handle the safe restart. For instance,
old (pre-CentOS/RHEL 5) open-iscsi has problems in this area. But the latest versions do it pretty well.</p>
<p><A NAME="22"></A> 22. All ALUA states
transitioning implemented as empty placeholders, which means this implementation can't be used to build ALUA-based
clusters without additional code.</p>
<p><A NAME="20"></A> 20. Generic implementation, i.e. not coupled to any particular cluster implementation, which means it is needed additional effort
to used with each particular cluster setup.</p>
</div>
</div>

View File

@@ -36,8 +36,10 @@
<div id="main">
<h1>SCST Downloads</h1>
<p>The latest stable released version of SCST core is 2.0.0.1. It requires Linux kernel 2.6.18 or higher.
More detail information you could find in its README file.</p>
<p>The latest stable released version of SCST core is 2.0.0.1. The latest updates for it
you can find it in the SVN branch 2.0.0.x.</p>
<p>The latest stable pre release version is 2.1-rc1. You can find it in the SVN branch 2.1.0.x.</p>
<p>You can also download prebuilt SCST modules for
<a href="http://linuxsoft.cern.ch/cern/slc5X/x86_64/yum/extras/repoview">Scientific Linux CERN 5</a> (RHEL5-based),

View File

@@ -151,6 +151,7 @@
<p><a href="http://iscsi-scst.sourceforge.net/SCST_Gentoo_HOWTO.txt">Gentoo HOWTO For iSCSI-SCST</a></p>
<p><a href="http://alpinelinux.org/wiki/High_performance_SCST_iSCSI_Target_on_Linux_software_Raid" class="readmore">Alpine Linux HOWTO</a></p>
<p><a href="qla2x00t-howto.html">HOWTO For QLogic Target Driver</a></p>
<p><a href="qla2x00t-howto-debian.html">Ubuntu/Debian HOWTO For QLogic Target Driver</a></p>
<p><a href="http://lpfcxxxx.sourceforge.net/HOWTO.lpfc">HOWTO For Emulex lpfc Target Driver</a></p>
<p><a href="sgv_cache.html">SCST SGV Cache Description</a></p>
<h1>Articles</h1>

View File

@@ -37,6 +37,7 @@
<h1>Comparison</h1>
<ul class="sidemenu">
<li><a href="comparison.html">Features comparison</a></li>
<li><a href="scstvslio.html">SCST vs LIO/TCM</a></li>
<li><a href="scstvsstgt.html">SCST vs STGT</a></li>
<li><a href="mc_s.html">MC/S vs MPIO</a></li>
</ul>

119
www/scstvslio.html Normal file
View File

@@ -0,0 +1,119 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="author" content="Daniel Fernandes">
<meta name="Robots" content="index,follow">
<link rel="stylesheet" href="images/Orange.css" type="text/css">
<title>SCST vs LIO/TCM</title>
</head>
<body>
<!-- wrap starts here -->
<div id="wrap">
<div id="header">
<div class="logoimg"></div><h1 id="logo"><span class="orange"></span></h1>
<h2 id=slogan>Generic SCSI Target Subsystem for Linux</h2>
</div>
<div id="menu">
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="http://www.sourceforge.net/projects/scst">Main</a></li>
<li><a href="http://sourceforge.net/news/?group_id=110471">News</a></li>
<li><a href="targets.html">Drivers</a></li>
<li><a href="downloads.html">Downloads</a></li>
<li><a href="contributing.html">Contributing</a></li>
<li id="current"><a href="comparison.html">Comparison</a></li>
<li><a href="users.html">Users</a></li>
<li><a href="solutions.html">Solutions</a></li>
</ul>
</div>
<!-- content-wrap starts here -->
<div id="content-wrap">
<div id="sidebar">
<h1>Comparison</h1>
<ul class="sidemenu">
<li><a href="comparison.html">Features comparison</a></li>
<li><a href="scstvslio.html">SCST vs LIO/TCM</a></li>
<li><a href="scstvsstgt.html">SCST vs STGT</a></li>
<li><a href="mc_s.html">MC/S vs MPIO</a></li>
</ul>
</div>
<div id="main">
<h1>SCST vs LIO/TCM</h1>
<p>LIO, from recently being renamed to TCM, is another independent from SCST implementation
of SCSI target framework for Linux. It's started as PyX iSCSI target and then was
accommodated to other transports. But it's still in many kinds iSCSI-oriented.
You can find an example when people are not happy with it
<a href="http://thread.gmane.org/gmane.linux.scsi/65703/focus=66749">here</a>.</p>
<p>LIO maintainer, Nicholas Bellinger, is very good in building personal relationships and promoting LIO,
although often using misleading half, less-then-half and simply deceitful statements
about LIO current state, capabilities and future directions as well as about its competitor, SCST.
For instance, he setup LIO targets comparison page with obviously wrong statements about SCST, like
that it isn't fully zero copy or it isn't a generic target engine (while LIO, of course, is fully
zero-copy and fully generic target engine). Any
<a href="http://sourceforge.net/mailarchive/message.php?msg_id=21741080">attempts</a>
to correct it were simply ignored.</p>
<p>With those tricks Nicholas Bellinger was capable to attract key Linux kernel developers, and
they suddenly changed their opinion about Linux SCSI target subsystem in the opposite direction.
They previously asserted that
in-kernel SCSI target is the wrong direction, SCSI target must be in the user space, so
STGT is what everybody needed. Now their opinion is that SCSI target driver should be in the kernel space
and the only target good for them is LIO, doesn't matter that:</p>
<ol>
<li><span>SCST is a lot more mature and advanced</span></li>
<li><span>SCST from the beginning is a generic SCSI target</span></li>
<li><span>SCST has a lot more features</span></li>
<li><span>SCST has better performance</span></li>
<li><span>SCST has a lot more users</span></li>
<li><span>SCST has much bigger community</span></li>
</ol>
<p>So, rejecting base principles of the Linux kernel community that the best code should win, the worst
code was chosen.</p>
<p>You can find more background behind choosing LIO as the mainline kernel SCSI target
subsystem if you read <a href="http://thread.gmane.org/gmane.linux.kernel/1078109/focus=1078310">this thread</a>
as well as searching for targets related topics in Linux kernel and Linux SCSI mailing lists.</p>
<p>Particularly notable is that James Bottomley from the beginning was telling that SCST
can't be merged in the mainline kernel, because it doesn't offer a drop in replacement for STGT
to avoid having 2 target infrastructures in the kernel at the same time. But, since LIO can't
offer user space backend drivers and doesn't have ibmvstgt driver analog, for LIO the drop in replacement wasn't
a requirement, so 2.6.38+ kernels successfully have both STGT and LIO.</p>
</div>
</div>
</div>
<!-- wrap ends here -->
<!-- footer starts here -->
<div id="footer">
<p>&copy; Copyright 2004-2011 <b><font color="#EC981F">Vladislav Bolkhovitin/SCST Ltd &amp others.</font></b>&nbsp;&nbsp;
Design by: <b><font color="#EC981F">Daniel Fernandes</font></b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
</div>
<!-- footer ends here -->
<!-- Piwik -->
<script type="text/javascript">
var pkBaseURL = (("https:" == document.location.protocol) ? "https://apps.sourceforge.net/piwik/scst/" : "http://apps.sourceforge.net/piwik/scst/");
document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
</script><script type="text/javascript">
piwik_action_name = '';
piwik_idsite = 1;
piwik_url = pkBaseURL + "piwik.php";
piwik_log(piwik_action_name, piwik_idsite, piwik_url);
</script>
<object><noscript><p><img src="http://apps.sourceforge.net/piwik/scst/piwik.php?idsite=1" alt="piwik"></p></noscript></object>
<!-- End Piwik Tag -->
</body>
</html>

View File

@@ -37,6 +37,7 @@
<h1>Comparison</h1>
<ul class="sidemenu">
<li><a href="comparison.html">Features comparison</a></li>
<li><a href="scstvslio.html">SCST vs LIO/TCM</a></li>
<li><a href="scstvsstgt.html">SCST vs STGT</a></li>
<li><a href="mc_s.html">MC/S vs MPIO</a></li>
</ul>
@@ -70,10 +71,8 @@
</ul>
<p>Also don't be deceived by the fact that some (small) part of STGT was accepted into the kernel.<br>
It doesn't mean that STGT has the "kernel quality". STGT as a whole similarly to any other
out-of-kernel-tree project lives on its own, hence has its own quality level, which isn't necessary better, than the
quality level of SCST.</p>
<p>Time has proved that STGT is too weak to satisfy modern storage requirements. Now it is obsolete and
soon going to be removed from the mainline kernel.</p>
</div>
</div>