diff --git a/qla2x00t/doc/qla2x00t-howto.html b/qla2x00t/doc/qla2x00t-howto.html index ae601831e..66b418723 100644 --- a/qla2x00t/doc/qla2x00t-howto.html +++ b/qla2x00t/doc/qla2x00t-howto.html @@ -8,7 +8,7 @@ How to configure QLogic target driver for 22xx/23xx/24xx/25xx adapters
@@ -35,12 +35,12 @@ body > ol > li {padding-bottom:3ex;}qla2xxx 0000:13:00.0: Firmware image unavailable. qla2xxx 0000:13:00.0: Failed to initialize adapter- In this case I had to download ql2300_fw.bin. + In this case I had to download ql2500_fw.bin.
[root@proj ]# apt-get install gcc libncurses5-dev linux-headers lsscsi patch subversion+
[root@proj ]# apt-get install gcc libncurses5-dev linux-headers-`uname -r` lsscsi patch subversionOn RHEL/CentOS/SL systems these packages can be installed as follows:
[root@proj ]# yum install gcc ncurses-devel kernel-devel lsscsi patch subversionAnd on SUSE systems these packages can be installed by running the following command: @@ -59,18 +59,12 @@ And on SUSE systems these packages can be installed by running the following com been extracted in a single directory. The structure of that directory will be identical to that of the SCST trunk. -
[root@proj ]# svn co https://scst.svn.sourceforge.net/svnroot/scst/trunk scst+
[root@proj ]# svn co https://svn.code.sf.net/p/scst/svn/trunk scstAfter the above command finished a directory called 'scst' will have been created in the current directory, which is /root in this how-to.
[root@proj ]# rmmod qla2xxx -[root@proj ]# echo blacklist qla2xxx >/etc/modprobe.d/blacklist-qla2xxx.conf-
[root@proj src ]# tar -xjf /usr/src/linux-2.6.26.tar.bz2+
[root@proj ]# cd /usr/src +[root@proj src ]# tar -xjf /usr/src/linux-3.11.8.tar.bz2Instructions for obtaining a distribution-specific kernel source tree vary. An example for Debian: -
[root@proj src ]# apt-get install linux-source-2.6 -[root@proj src ]# tar xjf linux-source-2.6.32.tar.bz2-
[root@proj src ]# pwd -/usr/src -[root@proj src ]# ln -s /usr/src/linux-2.6.26 linux -[root@proj src ]# ln -s /usr/src/linux-2.6.26 kernel+
[root@proj src ]# apt-get install linux-source-`uname -r` +[root@proj src ]# tar xjf linux-source-`uname -r`.tar.bz2
[root@proj ]# cd /usr/src/linux-2.6.26 -[root@proj linux-2.6.26]# patch -p1 < /root/scst/scst/kernel/scst_exec_req_fifo-2.6.26.patch+
[root@proj src ]# ln -s linux-3.11 linux +[root@proj src ]# cd linux +[root@proj linux ]# patch -p1 < /root/scst/scst/kernel/scst_exec_req_fifo-3.11.patch
[root@proj linux ]# pwd +/usr/src/linux +[root@proj linux ]# make menuconfig- Make sure you disable kernel hacking feature and HIGHMEM4G|HIGHMEM64G, i.e. -
[root@proj ]# grep -i highmem /usr/src/linux/.config + If you have built a 32-bit kernel make sure to disable HIGHMEM4G and + HIGHMEM64G, i.e. +[root@proj linux ]# grep -i highmem .config CONFIG_NOHIGHMEM=y # CONFIG_HIGHMEM4G is not set # CONFIG_HIGHMEM64G is not set- If you have a system with more than 1GB of memory, consider to change CONFIG_VMSPLIT option to the corresponding value. - -[root@proj linux ]# pwd -/usr/src/linux -[root@proj linux ]# make menuconfig -[root@proj linux ]# make bzImage -[root@proj linux ]# make modules -[root@proj linux ]# make modules_install -[root@proj linux ]# make install+ If you have built a 32-bit kernel on a system with more than 1GB of memory, + consider to change CONFIG_VMSPLIT option to an appropriate value. +
[root@proj linux ]# make -j$(ls -1d /sys/devices/system/cpu/cpu[0-9]* | wc -l) bzImage modules +[root@proj linux ]# make modules_install install
[root@proj ]# echo blacklist qla2xxx >/etc/modprobe.d/blacklist-qla2xxx.conf +[root@proj ]# rmmod qla2xxx+
[root@proj linux ] pwd +[root@proj linux ]# pwd /usr/src/linux -[root@proj linux ] make oldconfig -[root@proj linux ] make clean -[root@proj linux ] rm -rf /lib/modules/`uname -r` -[root@proj linux ] make modules -[root@proj linux ] make modules_install -[root@proj linux ] make install -[root@proj linux ] reboot+[root@proj linux ]# make oldconfig +[root@proj linux ]# make clean +[root@proj linux ]# rm -rf /lib/modules/`uname -r` +[root@proj linux ]# make -j$(ls -1d /sys/devices/system/cpu/cpu[0-9]* | wc -l) bzImage modules +[root@proj linux ]# make modules_install install +[root@proj linux ]# reboot
[root@proj trunk ] pwd +[root@proj scst ]# pwd /root/scst -[root@proj trunk ] make 2release+[root@proj scst ]# make 2release
[root@proj ]# cd /root/scst/scst/src -[root@proj ]# make all -[root@proj ]# make install-
[root@proj ]# cd /root/scst +[root@proj scst ]# BUILD_2X_MODULE=y CONFIG_SCSI_QLA_FC=y CONFIG_SCSI_QLA2XXX_TARGET=y make all install-
[root@proj trunk]# pwd -/root/scst
[root@proj trunk]# BUILD_2X_MODULE=y CONFIG_SCSI_QLA_FC=y CONFIG_SCSI_QLA2XXX_TARGET=y \ -make -s -C qla2x00t/qla2x00-target install-
[root@proj trunk]# ls -l /lib/modules/`uname -r`/extra/qla2* + Verify that compilation and installation succeeded: +[root@proj scst]# ls -l /lib/modules/`uname -r`/extra/qla2* -rw-r--r-- 1 root root 36756 Jun 20 18:46 qla2x00tgt.ko -rw-r--r-- 1 root root 160192 Jun 20 18:46 qla2xxx_scst.ko-
[root@proj ]# update-initrd -c -k $(uname -r)-For Ubuntu systems: -
[root@proj ]# update-initramfs -c -k $(uname -r)-For RHEL/CentOS/SL systems: -
[root@proj ]# mkinitrd -f /boot/initramfs-$(uname -r).img $(uname -r)-And for SUSE systems: -
[root@proj ]# mkinitrd+Linux distribution. The initial RAM disk can be rebuilt e.g. as follows: +
[root@proj ]# type update-initrd >/dev/null 2>&1 && update-initrd -c -k `uname -r`
+[root@proj ]# type update-initramfs >/dev/null 2>&1 && update-initramfs -c -k `uname -r`
+[root@proj ]# if type mkinitrd >/dev/null 2>&1; then
+if { rpm -q sles-release || rpm -q openSUSE-release; } >/dev/null 2>&1;
+then mkinitrd; else mkinitrd -f /boot/initramfs-`uname -r`.img `uname -r`; fi; fi
[root@proj ]# make -C scstadmin -s install+
+modprobe qla2x00tgt
+find /sys/kernel/scst_tgt/targets/qla2x00t -name enabled | \
+while read f; do echo 1 >$f & done; wait
+find /sys -name issue_lip | while read f; do echo 1 >$f & done; wait
+{
+cat <<EOF
HANDLER vdisk_fileio {
- DEVICE disk1 {
- filename /mnt/disk1
- }
+ DEVICE disk1 {
+ filename /mnt/disk1
+ }
}
+EOF
+for p in /sys/kernel/scst_tgt/targets/qla2x00t/*; do
+[ -d $p ] || continue
+cat <<EOF
TARGET_DRIVER qla2x00t {
- TARGET 25:00:00:f0:98:87:92:f3 {
- LUN 0 disk1
+ TARGET $(basename $p) {
+ enabled 1
- enabled 1
- }
-}
+ LUN 0 disk1
+ }
+}
+EOF
+done
+} >scst.conf
-Before we can apply that file we have to install scstadmin first:
+Check the generated config file. If it looks fine to you, move it to the
+default location:
+mv -i scst.conf /etc/scst.conf-
[root@proj ]# make -C scstadmin -s install- -Let's save our configuration file as /etc/scst.conf.
[root@proj ]# scstadmin -config /etc/scst.conf @@ -320,11 +307,28 @@ The same can be done directly via the sysfs interface of SCST: [root@proj ]# echo "add disk1 0" >/sys/kernel/scst_tgt/targets/qla2x00t/25:00:00:f0:98:87:92:f3/luns/mgmt [root@proj ]# echo "1" >/sys/kernel/scst_tgt/targets/qla2x00t/25:00:00:f0:98:87:92:f3/enabled-
[root@proj ]# ls -d /sys/kernel/scst_tgt/targets/qla2x00t/*/sessions/*|sed 's,.*/,,' | sort -u +10:00:00:00:c9:95:c7:1a +10:00:00:00:c9:95:c7:1b +21:00:00:24:ff:46:c0:84 +21:00:00:24:ff:46:c0:85 +21:00:00:24:ff:6c:ca:d8 +21:00:00:24:ff:6c:ca:d9 +21:00:00:24:ff:6c:ca:da +21:00:00:24:ff:6c:ca:db+ More information about initiator group configuration together with an + example can be found in the scst.conf man page.
Without loading appropriate device handler, corresponding device will be invisible for remote