</title>
<body>
-<div style="text-align: center;"> <strong>How to configure QLogic target driver for 22xx/23xx/24xx/25xx adapters. Step by step guide.</strong></br></br></div>\r
-\r
- <div style="text-align: center;"> <strong>ON TARGET</strong></div><br><br>\r
-\r
-1: Get the Linux kernel sources for version >= 2.6.26 from kernel.org</br>\r
- <br>I've downloaded kernel version 2.6.26</br>\r
- <br><a href="ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.26.tar.bz2">ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.26.tar.bz2</a></br></br></br>\r
-\r
-2: Get the appropiate firmware for your QLogic card from<a href="ftp://ftp.qlogic.com/outgoing/linux/firmware">\r
- ftp://ftp.qlogic.com/outgoing/linux/firmware/</a> and put it under /lib/firmware.\r
+<div style="text-align: center;"> <strong>How to configure QLogic target driver for 22xx/23xx/24xx/25xx adapters. Step by step guide.</strong></br></br></div>
+
+ <div style="text-align: center;"> <strong>ON TARGET</strong></div><br><br>
+
+1: Get the Linux kernel sources for version >= 2.6.26 from kernel.org</br>
+ <br>I've downloaded kernel version 2.6.26</br>
+ <br><a href="ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.26.tar.bz2">ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.26.tar.bz2</a></br></br></br>
+
+2: 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&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'll\r
- get the following error mesage in the logs(/var/log/messages)\r
+ Without a firmware image during boot or when you manually insert the QLogic module, you'll
+ get the following error mesage in the logs(/var/log/messages)
</br></br>
- < snip ></br>\r
-\r
- qla2xxx 0000:13:00.0: Firmware image unavailable.</br>\r
- qla2xxx 0000:13:00.0: Failed to initialize adapter</br>\r
- < snip ></br></br>\r
-\r
- In this case I had to download ql2300_fw.bin</br></br></br>\r
-\r
-3: Unzip it under /usr/src/</br>\r
- [root@proj src ] bunzip2 /usr/src/linux-2.6.26.tar.bz2</br>\r
- [root@server src ] tar -xvf /usr/src/linux-2.6.26.tar</br></br></br>\r
- \r
-4: Create symlinks</br>\r
- [root@proj src ] pwd</br>\r
- /usr/src</br>\r
- [root@proj src ] ln -s /usr/src/linux-2.6.26 linux</br>\r
- [root@proj src ] ln -s /usr/src/linux-2.6.26 kernel</br></br></br>\r
-\r
-5: Get the SCST code from their SVN code base.</br>\r
- [root@proj ] svn co https://scst.svn.sourceforge.net/svnroot/scst</br>\r
- If the command returns successfully then you'll have 'scst'</br>\r
- directory under your current directory ( here it is /root )</br></br>\r
- \r
- Please check if svn (open source version control system) is installed on\r
- your Linux box.</br></br></br>\r
-\r
-6: Change directory to ~scst/trunk/</br>\r
- [root@proj trunk]# pwd</br>\r
- /root/scst/trunk</br></br>\r
-\r
- [root@proj trunk]# ls</br>\r
- AskingQuestions iscsi-release.patch mpt qla2x00t-release.patch scripts scst-full_perf.patch usr www\r
- doc iscsi-scst qla2x00t qla_isp scst scst-release.patch usr-full_perf.patch\r
- iscsi-full_perf.patch Makefile qla2x00t-full_perf.patch README scstadmin srpt usr-release.patch</br></br>\r
-
-7: Patch the kernel (the kernel version you've downloaded in step 1)</br>\r
- [root@proj ] cp /root/scst/trunk/scst/kernel/scst_exec_req_fifo-2.6.26.patch /usr/src</br></br>\r
- \r
- [root@proj ] cd /usr/src</br>\r
- [root@proj src] patch -p0 < scst_exec_req_fifo-2.6.26.patch</br></br></br>\r
-\r
-8: Replace the QLogic FC driver code in the kernel source tree with the modified version \r
- of QLogic FC driver code from scst code base.</br></br>\r
- [root@proj trunk] pwd</br>\r
- /root/scst/trunk</br>\r
- [root@proj trunk] mv /usr/src/linux/drivers/scsi/qla2xxx /usr/src/linux/drivers/scsi/qla2xxx_orig</br>\r
- [root@proj trunk] ln -s /root/scst/trunk/qla2x00t /usr/src/linux/drivers/scsi/qla2xxx</br></br></br>\r
- \r
-9: Now build the kernel.</br></br>\r
- \r
- Make sure you disable kernel hacking feature, and enable\r
- "Device Drivers->SCSI device support->SCSI low level drivers->Qlogic 2xxx target mode support"</br>\r
- (i.e. CONFIG_SCSI_QLA2XXX_TARGET=y)</br>\r
- Also turn OFF HIGHMEM4G|HIGHMEM64G,</br>\r
- i.e.</br>\r
- [root@proj ] grep -i highmem /usr/src/linux/.config</br>\r
- CONFIG_NOHIGHMEM=y</br>\r
- # CONFIG_HIGHMEM4G is not set</br>\r
- # CONFIG_HIGHMEM64G is not set</br></br>\r
- \r
+ < snip ></br>
+
+ qla2xxx 0000:13:00.0: Firmware image unavailable.</br>
+ qla2xxx 0000:13:00.0: Failed to initialize adapter</br>
+ < snip ></br></br>
+
+ In this case I had to download ql2300_fw.bin</br></br></br>
+
+3: Unzip it under /usr/src/</br>
+ [root@proj src ] bunzip2 /usr/src/linux-2.6.26.tar.bz2</br>
+ [root@server src ] tar -xvf /usr/src/linux-2.6.26.tar</br></br></br>
+
+4: Create symlinks</br>
+ [root@proj src ] pwd</br>
+ /usr/src</br>
+ [root@proj src ] ln -s /usr/src/linux-2.6.26 linux</br>
+ [root@proj src ] ln -s /usr/src/linux-2.6.26 kernel</br></br></br>
+
+5: Get the SCST code from their SVN code base.</br>
+ [root@proj ] svn co https://scst.svn.sourceforge.net/svnroot/scst</br>
+ If the command returns successfully then you'll have 'scst'</br>
+ directory under your current directory ( here it is /root )</br></br>
+
+ Please check if svn (open source version control system) is installed on
+ your Linux box.</br></br></br>
+
+6: Change directory to ~scst/trunk/</br>
+ [root@proj trunk]# pwd</br>
+ /root/scst/trunk</br></br>
+
+ [root@proj trunk]# ls</br>
+ AskingQuestions iscsi-release.patch mpt qla2x00t-release.patch scripts scst-full_perf.patch usr www
+ doc iscsi-scst qla2x00t qla_isp scst scst-release.patch usr-full_perf.patch
+ iscsi-full_perf.patch Makefile qla2x00t-full_perf.patch README scstadmin srpt usr-release.patch</br></br>
+
+7: Patch the kernel (the kernel version you've downloaded in step 1)</br>
+ [root@proj ] cp /root/scst/trunk/scst/kernel/scst_exec_req_fifo-2.6.26.patch /usr/src</br></br>
+
+ [root@proj ] cd /usr/src</br>
+ [root@proj src] patch -p0 < scst_exec_req_fifo-2.6.26.patch</br></br></br>
+
+8: 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></br>
+ [root@proj trunk] pwd</br>
+ /root/scst/trunk</br>
+ [root@proj trunk] mv /usr/src/linux/drivers/scsi/qla2xxx /usr/src/linux/drivers/scsi/qla2xxx_orig</br>
+ [root@proj trunk] ln -s /root/scst/trunk/qla2x00t /usr/src/linux/drivers/scsi/qla2xxx</br></br></br>
+
+9: Now build the kernel.</br></br>
+
+ Make sure you disable kernel hacking feature, and enable
+ "Device Drivers->SCSI device support->SCSI low level drivers->Qlogic 2xxx target mode support"</br>
+ (i.e. CONFIG_SCSI_QLA2XXX_TARGET=y)</br>
+ Also turn OFF HIGHMEM4G|HIGHMEM64G,</br>
+ i.e.</br>
+ [root@proj ] grep -i highmem /usr/src/linux/.config</br>
+ CONFIG_NOHIGHMEM=y</br>
+ # CONFIG_HIGHMEM4G is not set</br>
+ # CONFIG_HIGHMEM64G is not set</br></br>
+
If you have system with more than 1GB of memory, consider to change CONFIG_VMSPLIT option to the correspinding value.
- </br></br>\r
- [root@proj linux ] pwd</br>\r
- /usr/src/linux</br>\r
- [root@proj linux ] make menuconfig</br>\r
- [root@proj linux ] make bzImage</br>\r
- [root@proj linux ] make modules</br>\r
- [root@proj linux ] make modules_install</br>\r
- [root@proj linux ] make install</br></br></br>\r
- \r
-10: Reboot the machine and during boot select the modified kernel to boot from.</br></br></br>\r
-\r
-11:Depending on your requirement (performance/debugging) apply the appropiate\r
+ </br></br>
+ [root@proj linux ] pwd</br>
+ /usr/src/linux</br>
+ [root@proj linux ] make menuconfig</br>
+ [root@proj linux ] make bzImage</br>
+ [root@proj linux ] make modules</br>
+ [root@proj linux ] make modules_install</br>
+ [root@proj linux ] make install</br></br></br>
+
+10: Reboot the machine and during boot select the modified kernel to boot from.</br></br></br>
+
+11: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></br>\r
- [root@proj trunk ] pwd</br>\r
- /root/scst/trunk</br>\r
- [root@proj trunk ] make debug2release</br></br></br>\r
-\r
-12:OPTIONAL step: do the cleanup before building scst module</br>\r
- (Follow step 11 only if you get error "scst: disagrees about version of\r
- symbol struct_module")</br></br>\r
- \r
- This error indicates that the kernel module the script was trying to\r
- load was compiled against kernel headers that do not match the running\r
- kernel. Doing a clean rebuild of the kernel and SCST should make the\r
- above error go away. To make sure nothing of the old kernel is left,\r
- Do clean rebuild of kernel and SCST :</br>\r
- Follow the step below:</br></br>\r
- \r
- [root@proj linux ] pwd</br>\r
- /usr/src/linux</br>\r
- [root@proj linux ] make oldconfig</br>\r
- [root@proj linux ] make clean</br>\r
- [root@proj linux ] rm -rf /lib/modules/`uname -r`</br>\r
- [root@proj linux ] make modules</br>\r
- [root@proj linux ] make modules_install</br>\r
- [root@proj linux ] make install</br>\r
- [root@proj linux ] reboot</br></br></br>\r
-\r
-13:Now build the modules.</br>\r
- But first make sure that the link "/lib/modules/`uname -r`/build"</br>\r
- points to the current running kernel sources.</br></br>\r
- \r
- a) Build scst.</br>\r
- [root@proj ] cd /root/scst/trunk/scst/src</br>\r
- [root@proj ] make all (here I am building everything)</br>\r
- [root@proj ] make install</br>\r
- \r
-\r
- b) Build QLogic target driver</br>\r
- [root@proj ] cd /root/scst/trunk/qla2x00t/qla2x00-target/</br>\r
- root@proj ] make</br>\r
- [root@proj ] make install</br></br></br>\r
- \r
- \r
-14:Insert the modules.</br>\r
- The driver modules will be installed in '/lib/modules/`you_kernel_version`/extra'.</br>\r
- In addition, scst.h, scst_debug.h as well as Module.symvers or\r
- Modules.symvers will be copied to '/usr/local/include/scst'.</br> The first\r
- file contains all SCST's public data definition, which are used by\r
- target drivers. The other ones support debug messages logging and build process.</br></br>\r
- \r
- [root@proj scst]# ls -l /lib/modules/`uname -r`/extra</br>\r
- total 232</br>\r
- drwxr-xr-x 2 root root 4096 Jun 20 18:43 dev_handlers</br>\r
- -rw-r--r-- 1 root root 36756 Jun 20 18:46 qla2x00tgt.ko</br>\r
- -rw-r--r-- 1 root root 160192 Jun 20 18:46 qla2xxx.ko </br> \r
- -rw-r--r-- 1 root root 190848 Jun 20 18:43 scst.ko</br></br>\r
- \r
- [root@proj scst]# ls -l /lib/modules/`uname -r`/extra/dev_handlers</br>\r
- total 192</br>\r
- -rw-r--r-- 1 root root 11757 Jun 20 18:43 scst_cdrom.ko</br>\r
- -rw-r--r-- 1 root root 10111 Jun 20 18:43 scst_changer.ko</br>\r
- -rw-r--r-- 1 root root 12420 Jun 20 18:43 scst_disk.ko</br>\r
- -rw-r--r-- 1 root root 12449 Jun 20 18:43 scst_modisk.ko</br>\r
- -rw-r--r-- 1 root root 10131 Jun 20 18:43 scst_processor.ko</br>\r
- -rw-r--r-- 1 root root 10081 Jun 20 18:43 scst_raid.ko</br>\r
- -rw-r--r-- 1 root root 12563 Jun 20 18:43 scst_tape.ko</br>\r
- -rw-r--r-- 1 root root 37937 Jun 20 18:43 scst_user.ko</br>\r
- -rw-r--r-- 1 root root 50194 Jun 20 18:43 scst_vdisk.ko</br></br>\r
- \r
- where:</br>\r
- - scst - SCST itself</br>\r
- - scst_disk - device handler for disks (type 0)</br>\r
- - scst_tape - device handler for tapes (type 1)</br>\r
- - scst_processor - device handler for processors (type 3)</br>\r
- - scst_cdrom - device handler for CDROMs (type 5)</br>\r
- - scst_modisk - device handler for MO disks (type 7)</br>\r
- - scst_changer - device handler for medium changers (type 8)</br>\r
- - scst_raid - device handler for storage array controller (e.g. raid) (type C)</br>\r
- - scst_vdisk - device handler for virtual disks (file, device or ISO CD image).</br>\r
- - scst_user - user space device handler</br></br>\r
-\r
- You can insert any of these modules by 'modprobe' program, I've inserted all\r
- the modules !!!</br>\r
- [root@proj ] for _mod in scst qla2xxx qla2x00tgt scst_vdisk scst_user \r
- scst_disk....; do modprobe $_mod; done</br></br>\r
-\r
- < snip from dmesg ></br></br>\r
-\r
- scst: SCST version 1.0.0-rc1 loaded successfully (max mem for commands 16251MB, per device 6500MB)</br>\r
- scst: Enabled features: TRACING</br>\r
- scst: Target template qla2x00tgt registered successfully</br>\r
- scst: Virtual device handler vdisk for type 0 registered successfully</br>\r
- scst: Virtual device handler "scst_user" registered successfully</br>\r
- --------</br>\r
- --------</br>\r
- < snip from dmesg ></br></br></br>\r
-\r
-15:To see the devices remotely, we have to add them to atleast "Default" security group.</br>\r
- Where each security group will have LUN 0(LUs numeration must not start from, e.g., 1)</br></br>\r
-\r
- \r
- [root@proj ] dd if=/dev/zero of=/mnt/disk1 bs=1024k count=512</br>\r
- 512+0 records in</br>\r
- 512+0 records out</br></br>\r
- \r
- [root@proj ] ls -l /mnt/disk1</br>\r
- -rw-r--r-- 1 root root 536870912 Jun 23 13:27 /mnt/disk1</br></br>\r
- \r
- [root@proj ] file /mnt/disk1</br>\r
- /mnt/disk1: data</br></br>\r
-\r
- \r
- [root@proj ] echo "open vm_disk /mnt/disk1" > /proc/scsi_tgt/vdisk/vdisk</br>\r
- \r
- [root@proj ] echo "add vm_disk 0" >/proc/scsi_tgt/groups/Default/devices</br></br>\r
-\r
- < snip from dmesg ></br>\r
- dev_vdisk: Attached SCSI target virtual disk vm_disk (file="/mnt/disk1", fs=512MB, bs=512, nblocks=1048576, cyln=512)</br>\r
- scst: Attached SCSI target mid-level to virtual device vm_disk (id 1)</br>\r
- scst: Added device vm_disk to group Default (LUN 0, rd_only 0)</br>\r
- < snip from dmesg ></br></br>\r
- \r
- [root@proj ] cat /proc/scsi_tgt/groups/Default/devices</br>\r
- Device (host:ch:id:lun or name) Virtual lun Options</br>\r
- vm_disk 0 </br></br>\r
-\r
- [root@proj ] cat /proc/scsi_tgt/vdisk/vdisk</br>\r
- Name Size(MB) Block size Options File name</br>\r
- vm_disk 512 512 /mnt/disk1</br></br></br>\r
- \r
- \r
-16:After the drivers are loaded, the target mode should be enabled via a</br>\r
-\r
- sysfs interface on a per card basis. Under the appropriate scsi_host\r
- there is an entry target_mode_enabled, where you should write "1", like:</br>\r
-\r
- [root@proj ] echo "1" >/sys/class/scsi_host/host11/target_mode_enabled</br></br>\r
-\r
-\r
- <div style="text-align: center;"><strong>ON INITIATOR</strong></div></br>\r
-\r
-17:< snip from README ></br>\r
- Without loading appropriate device handler, corresponding device\r
- will be invisible for remote initiators, hence we have to\r
- add them manully.</br> \r
- < snip from README ></br></br>\r
-\r
- But as I've already loaded the device handler(scst_vdisk) on the target, \r
- hence I don't need to perform step 17. </br></br>\r
- \r
-\r
-18:After enabling the target mode on the target (see step 16),\r
- to see new targets and devices you need either to rescan \r
- initiator(s) manually, for example, by rmmod/modprobe the\r
+ Here is how to switch to the release mode:</br></br>
+ [root@proj trunk ] pwd</br>
+ /root/scst/trunk</br>
+ [root@proj trunk ] make debug2release</br></br></br>
+
+12:OPTIONAL step: do the cleanup before building scst module</br>
+ (Follow step 11 only if you get error "scst: disagrees about version of
+ symbol struct_module")</br></br>
+
+ This error indicates that the kernel module the script was trying to
+ load was compiled against kernel headers that do not match the running
+ kernel. Doing a clean rebuild of the kernel and SCST should make the
+ above error go away. To make sure nothing of the old kernel is left,
+ Do clean rebuild of kernel and SCST :</br>
+ Follow the step below:</br></br>
+
+ [root@proj linux ] pwd</br>
+ /usr/src/linux</br>
+ [root@proj linux ] make oldconfig</br>
+ [root@proj linux ] make clean</br>
+ [root@proj linux ] rm -rf /lib/modules/`uname -r`</br>
+ [root@proj linux ] make modules</br>
+ [root@proj linux ] make modules_install</br>
+ [root@proj linux ] make install</br>
+ [root@proj linux ] reboot</br></br></br>
+
+13:Now build the modules.</br>
+ But first make sure that the link "/lib/modules/`uname -r`/build"</br>
+ points to the current running kernel sources.</br></br>
+
+ a) Build scst.</br>
+ [root@proj ] cd /root/scst/trunk/scst/src</br>
+ [root@proj ] make all (here I am building everything)</br>
+ [root@proj ] make install</br></br>
+
+
+ b) Build QLogic target driver</br>
+ [root@proj ] cd /root/scst/trunk/qla2x00t/qla2x00-target/</br>
+ root@proj ] make</br>
+ [root@proj ] make install</br></br></br>
+
+
+14: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></br>
+
+ [root@proj scst]# 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>
+
+ [root@proj scst]# 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</br></br>
+
+ 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>
+ [root@proj ] for _mod in scst qla2xxx qla2x00tgt scst_vdisk scst_user
+ scst_disk....; do modprobe $_mod; done</br></br>
+
+ < snip from dmesg ></br></br>
+
+ scst: SCST version 1.0.0-rc1 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>
+ --------</br>
+ < snip from dmesg ></br></br></br>
+
+15:To see the devices remotely, we have to add them to atleast "Default" security group.</br>
+ Where each security group will have LUN 0(LUs numeration must not start from, e.g., 1)</br></br>
+
+
+ [root@proj ] dd if=/dev/zero of=/mnt/disk1 bs=1024k count=512</br>
+ 512+0 records in</br>
+ 512+0 records out</br></br>
+
+ [root@proj ] ls -l /mnt/disk1</br>
+ -rw-r--r-- 1 root root 536870912 Jun 23 13:27 /mnt/disk1</br></br>
+
+ [root@proj ] file /mnt/disk1</br>
+ /mnt/disk1: data</br></br>
+
+
+ [root@proj ] echo "open vm_disk /mnt/disk1" > /proc/scsi_tgt/vdisk/vdisk</br>
+
+ [root@proj ] echo "add vm_disk 0" >/proc/scsi_tgt/groups/Default/devices</br></br>
+
+ < snip from dmesg ></br>
+ dev_vdisk: Attached SCSI target virtual disk vm_disk (file="/mnt/disk1", fs=512MB, bs=512, nblocks=1048576, cyln=512)</br>
+ scst: Attached SCSI target mid-level to virtual device vm_disk (id 1)</br>
+ scst: Added device vm_disk to group Default (LUN 0, rd_only 0)</br>
+ < snip from dmesg ></br></br>
+
+ [root@proj ] cat /proc/scsi_tgt/groups/Default/devices</br>
+ Device (host:ch:id:lun or name) Virtual lun Options</br>
+ vm_disk 0 </br></br>
+
+ [root@proj ] cat /proc/scsi_tgt/vdisk/vdisk</br>
+ Name Size(MB) Block size Options File name</br>
+ vm_disk 512 512 /mnt/disk1</br></br></br>
+
+
+16:After the drivers are loaded, the target mode should be enabled via a</br>
+
+ sysfs interface on a per card basis. Under the appropriate scsi_host
+ there is an entry target_mode_enabled, where you should write "1", like:</br>
+
+ [root@proj ] echo "1" >/sys/class/scsi_host/host11/target_mode_enabled</br></br>
+
+
+ <div style="text-align: center;"><strong>ON INITIATOR</strong></div></br>
+
+17:< snip from README ></br>
+ Without loading appropriate device handler, corresponding device
+ will be invisible for remote initiators, hence we have to
+ add them manully.</br>
+ < snip from README ></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>
+
+
+18: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,\r
- so you need a way to make SCSI subsystem on the initiator to do the new devices discovery and hence be able to see\r
- the new devices attached.</br></br>\r
+ 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>
- [root@initiator ] echo "- - -" >/sys/class/scsi_host/hostX/scan</br>\r
- where X: host number</br></br></br>\r
- \r
-</body>\r
-</html> \r
+ [root@initiator ] echo "- - -" >/sys/class/scsi_host/hostX/scan</br>
+ where X: host number</br></br></br>
+
+</body>
+</html>