WARNING: This procedure changes live kernel, HBA, firmware, boot, Fibre Channel fabric and storage state. It unloads and blacklists drivers, can flash HBA firmware, rebuilds an initial RAM disk, writes sysfs, enables target ports and exports writable storage. Do not run it without authorization for the exact host, HBA ports, firmware image, fabric, initiators and backing devices. Verify recovery and rollback plans before changing firmware or boot configuration.
qla2xxx_pci_tbl[] in the selected tree's
legacy or
newer qla2xxx source.
ql2xfwloadbin module parameter controls whether the driver
requests a firmware file, loads firmware from adapter flash or uses its
default semantics. When file loading is selected, use the exact
FW_FILE_* name defined by the selected tree's
legacy or
newer qla2xxx source. Do not
rename an arbitrary firmware image according to a historical model table.
nightly/conf/nightly.conf are authoritative.
qla2x00t-32gbit, the newer QLogic
tree, by default. Set QLA_32GBIT=no for both build and install
only when selecting the alternative legacy qla2x00t tree. Do
not mix an initiator/HBA module from one tree with the target adapter from
the other.
[root@proj ]# echo blacklist qla2xxx >/etc/modprobe.d/blacklist-qla2xxx.conf [root@proj ]# rmmod qla2xxx
[root@proj scst ]# make 2release
BUILD_2X_MODULE=y, CONFIG_SCSI_QLA_FC=y and
CONFIG_SCSI_QLA2XXX_TARGET=y consistent across the separate
build and privileged install commands. Also keep the same
QLA_32GBIT selection in both commands.
qla2xxx_scst initiator/HBA module and
qla2x00tgt target adapter must come from the same selected
source tree. Do not use historical module sizes or log transcripts to
validate the installation.
qla2xxx_scst in the initial
RAM disk, back up the current image and follow the distribution's procedure
for the exact installed kernel. Verify that the replacement modules are
present before rebuilding and retain a bootable recovery entry. There is no
portable SCST command that can safely select or replace an initial RAM disk.
[root@proj ]# dd if=/dev/zero of=/mnt/disk1 bs=1024k count=512 512+0 records in 512+0 records out [root@proj ]# ls -l /mnt/disk1 -rw-r--r-- 1 root root 536870912 Jun 23 13:27 /mnt/disk1 [root@proj ]# file /mnt/disk1 /mnt/disk1: data
scstadmin. Verify that the installed command matches the SCST
version before applying the configuration below; do not perform a second
uncoordinated installation from this HOWTO.
echo "disabled" > /sys/class/scsi_host/host1/qlini_modeAn accepted dynamic mode change can request an ISP abort, and some transitions are rejected while target mode is active. Check the target state and kernel log before and after changing the attribute.
{
cat <<EOF
HANDLER vdisk_fileio {
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 $(basename $p) {
enabled 1
LUN 0 disk1
}
}
EOF
done
} >scst.conf
Review the generated file against the current configuration, restrict its
targets and initiators and preserve a backup before placing it at
/etc/scst.conf. Do not replace an existing configuration by
following an unreviewed example.
Applying the file is a live operation that opens the backing file, maps the
LUN and enables each configured target:
[root@proj ]# scstadmin -config /etc/scst.confThe same can be done directly via the sysfs interface of SCST:
[root@proj ]# echo "add_device disk1 filename=/mnt/disk1" >/sys/kernel/scst_tgt/handlers/vdisk_fileio/mgmt [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:dbMore information about initiator group configuration together with an example can be found in the scst.conf man page.
[root@initiator ]# echo "- - -" >/sys/class/scsi_host/hostX/scanwhere X is the host number.