[root@localhost ~]# yum update -y [root@localhost ~]# reboot
[root@localhost ~]# dmesg | grep -E 'qla2xxx .* QLogic | Found an ISP'
[ 1.881084] qla2xxx [0000:05:04.0]-001d: Found an ISP2422 irq 24 iobase 0xffffc90001e06000. [ 2.901460] qla2xxx [0000:05:04.0]-00fb:1: QLogic QLA2460 - PCI-X 2.0 Single Channel 4Gb Fibre Channel HBA.
[root@localhost ~]# /opt/QLogic_Corporation/QConvergeConsoleCLI/qaucli -fc -b all /lib/firmware/ql2400_fw.bin
[root@localhost ~]# yum install git -y [root@localhost ~]# git clone git://git.QLogic.com/scst-qla2xxx.git
[root@localhost ~]#yum install gcc ncurses-devel kernel-devel lsscsi patch subversion bc bison net-tools -y
[root@localhost ~]# cd / [root@localhost /]# svn co https://svn.code.sf.net/p/scst/svn/trunk scst
[root@localhost /]# cd scst [root@localhost scst]# ln -s ../scst-qla2xxx/drivers/scsi/qla2xxx qla2x00t_git
[root@localhost /]# useradd builder
[root@localhost /]# echo 'builder ALL=(ALL) NOPASSWD: /usr/bin/yum, /usr/bin/yum-builddep' >>/etc/sudoers [root@localhost /]# visudo –sc
[root@centos-test /]# su builder
[builder@localhost /]# ./scst/scripts/rebuild-rhel-kernel-rpm
[builder@localhost /]$ su -c 'rpm -ivh --force /home/builder/rpmbuild/RPMS/x86_64/kernel-*.rpm'
[builder@localhost /]$ su –c reboot
[root@localhost ~]# uname -r 3.10.0-229.el7.centos.scst.x86_64
[root@localhost /]# echo blacklist qla2xxx >/etc/modprobe.d/blacklist-qla2xxx.conf [root@localhost /]# rmmod qla2xxx
[root@localhost /]# cd /scst [root@localhost scst]# make 2release
[root@localhost scst]# BUILD_2X_MODULE=y CONFIG_SCSI_QLA_FC=y CONFIG_SCSI_QLA2XXX_TARGET=y make all install
[root@localhost ~]# ls -l /lib/modules/`uname -r`/extra/qla2* -rw-r--r-- 1 root root 1511833 Sep 10 11:10 /lib/modules/3.10.0-229.11.1.el7.centos.scst.x86_64/extra/qla2x00tgt.ko -rw-r--r-- 1 root root 10699423 Sep 10 11:10 /lib/modules/3.10.0-229.11.1.el7.centos.scst.x86_64/extra/qla2xxx_scst.ko
[root@localhost ~]# ls -l /lib/modules/`uname -r`/extra total 25128 drwxr-xr-x 2 root root 4096 Sep 10 11:10 dev_handlers -rw-r--r-- 1 root root 4309043 Sep 10 11:10 iscsi-scst.ko -rw-r--r-- 1 root root 3100544 Sep 10 11:10 isert-scst.ko -rw-r--r-- 1 root root 1511833 Sep 10 11:10 qla2x00tgt.ko -rw-r--r-- 1 root root 10699423 Sep 10 11:10 qla2xxx_scst.ko -rw-r--r-- 1 root root 5619115 Sep 10 11:10 scst.ko -rw-r--r-- 1 root root 474173 Sep 10 11:10 scst_local.ko
[root@localhost ~]# ls -l /lib/modules/`uname -r`/extra/dev_handlers total 3960 -rw-r--r-- 1 root root 305582 Sep 10 11:10 scst_cdrom.ko -rw-r--r-- 1 root root 292948 Sep 10 11:10 scst_changer.ko -rw-r--r-- 1 root root 328092 Sep 10 11:10 scst_disk.ko -rw-r--r-- 1 root root 308934 Sep 10 11:10 scst_modisk.ko -rw-r--r-- 1 root root 292972 Sep 10 11:10 scst_processor.ko -rw-r--r-- 1 root root 292876 Sep 10 11:10 scst_raid.ko -rw-r--r-- 1 root root 312024 Sep 10 11:10 scst_tape.ko -rw-r--r-- 1 root root 704076 Sep 10 11:10 scst_user.ko -rw-r--r-- 1 root root 1199482 Sep 10 11:10 scst_vdisk.ko
[root@localhost ~]# for m in scst qla2xxx_scst qla2x00tgt scst_vdisk scst_user scst_disk ...; do modprobe $m; done
[10753.981044] [21513]: scst: SCST version 3.1.0-pre1 loaded successfully (max mem for commands 709MB, per device 283MB) [10753.981051] [21513]: scst: Enabled features: TRACING [10753.982152] [21519]: scst: Management thread started [10754.024379] qla2xxx [0000:00:00.0]-0005: QLogic Fibre Channel HBA Driver: 8.04.00.05.2.2-SCST.03-kp. [10754.030864] [21527]: qla2x00t: Initializing QLogic Fibre Channel HBA Driver target mode addon version 3.1.0-pre1 [10754.032397] [21527]: qla2x00t: Target mode driver for QLogic 2x00 controller registered successfully [10754.032409] [21527]: scst: Target template qla2x00t registered successfully [10754.038638] [21528]: scst: Virtual device handler vdisk_fileio for type 0 registered successfully [10754.038647] [21528]: scst: Virtual device handler vdisk_blockio for type 0 registered successfully [10754.038653] [21528]: scst: Virtual device handler vdisk_nullio for type 0 registered successfully [10754.038658] [21528]: scst: Virtual device handler vcdrom for type 5 registered successfully [10754.044786] [21529]: scst: Virtual device handler "scst_user" registered successfully [10754.048905] [21530]: scst_user: Cleanup thread started [10754.052682] [21531]: scst: Device handler "dev_disk" for type 0 registered successfully [10754.052691] [21531]: scst: Device handler "dev_disk_perf" for type 0 registered successfully
[root@localhost ~]# mkinitrd -f /boot/initramfs-`uname -r`.img `uname -r`
[root@localhost /]# cd scst [root@localhost scst]# make -C scstadmin -s install
HANDLER vdisk_blockio { DEVICE disk1 { filename /dev/sdb } } TARGET_DRIVER qla2x00t { TARGET ::::::: { enabled 1 LUN 0 disk1 } }
cat /sys/class/scsi_host/host*/device/fc_host/host*/node_name
[root@localhost scst]# scstadmin -config /etc/scst.conf Collecting current configuration: done. -> Checking configuration file '/etc/scst.conf ' for errors. -> Done, 0 warnings found. -> Opening device 'disk1' using handler 'vdisk_blockio': done. -> Adding device 'disk1' at LUN 0 to driver/target 'qla2x00t/:::::::': done. -> Enabling driver/target 'qla2x00t/:::::::': done. All done.
[root@localhost /]# systemctl enable scst.service
[root@localhost /]# vi /etc/modules-load.d/scst_modules.conf scst_disk scst_user scst_vdisk scst libcrc32c crc_t10dif qla2x00tgt
[root@localhost /]# chmod +x /etc/rc.d/rc.local [root@localhost /]# vi /etc/rc.d/rc.local scstadmin –config /etc/scst.conf
[root@localhost ~]# scstadmin -config /etc/scst.conf
Collecting current configuration: done. -> Checking configuration file '/etc/scst.conf' for errors. -> Done, 0 warnings found. -> Applying configuration. -> Done, 0 change(s) made. All done.
Source: https://habr.com/ru/post/267157/
All Articles