Files
scst/INSTALL.md
T
Gleb Chesnokov 9129391ac3 docs: Refresh build and installation guides
The top-level guides still describe retired source, QLogic, service and
kernel-support workflows. Following them can select the wrong driver,
cross-compile only part of the tree, or misstate module-signing policy.

Commit 7aade0a109 ("Makefile: Make the qla2x00t-32gbit driver
the default QLogic FC driver") made the newer tree the default.
Commit 0d3c9018af ("debian, scstadmin: Add systemd scst.service")
added the installed systemd unit.

Point source users at GitHub and kernel support at
nightly/conf/nightly.conf. Separate kernel and user-space cross builds,
follow the current service recipes, and make module acceptance depend
on the target kernel and platform policy.
2026-08-21 10:05:36 +03:00

4.0 KiB

Building and installing SCST

Prerequisites

If the following packages have not yet been installed, install these now:

which
bzip2
gcc
kernel-devel or kernel-default-devel
kernel-modules-extra (only on Fedora)
libelf-dev, libelf-devel or elfutils-libelf-devel
libperl-dev or perl-devel
make
openssl (if CONFIG_MODULE_SIG is enabled in the target kernel)
perl
perl-Data-Dumper
perl-ExtUtils-MakeMaker (not needed on Debian systems)
rpm-build (only on RPM-based systems)
tar

Supported kernel versions

The maintained list of supported upstream and distribution kernels is the ABT_KERNELS list in nightly/conf/nightly.conf. The GitHub Actions regression matrix is a subset and is not the complete support list.

Building SCST

The next step is to build and install SCST. How to do that depends on whether or not your Linux distribution supports a package manager:

make 2release
if rpm -q glibc >/dev/null 2>&1; then
    rm -rf {,scstadmin/}rpmbuilddir
    make rpm
    sudo rpm -U $PWD/{,scstadmin/}rpmbuilddir/RPMS/*/*.rpm
elif dpkg-query -s libc-bin >/dev/null 2>&1; then
    sudo apt install build-essential debhelper devscripts gcc make lintian quilt
    sudo apt install linux-headers-$(uname -r) || sudo apt install pve-headers-$(uname -r)
    make dpkg
    sudo dpkg -i $PWD/dpkg/{scst,iscsi-scst,scstadmin}_*.deb
else
    make 2release
    BUILD_2X_MODULE=y CONFIG_SCSI_QLA_FC=y CONFIG_SCSI_QLA2XXX_TARGET=y make all
    sudo BUILD_2X_MODULE=y CONFIG_SCSI_QLA_FC=y CONFIG_SCSI_QLA2XXX_TARGET=y make -C "$PWD" install
fi

Since the above step installs several kernel modules into directory /lib/modules/$(uname -r), that step has to be repeated every time a new kernel or a kernel update has been installed. If you want to avoid this, install the scst-dkms package instead of the scst package.

For example, if you want to have dkms support for your SCST rpm install, then you would use the following command to make your SCST packages:

make rpm-dkms

or

make scst-dkms-rpm

make rpm-dkms also builds scstadmin packages in addition to the SCST dkms packages. Both make commands will create rpm packages that will cause SCST to be automatically rebuilt and installed every time a new kernel version is installed and booted for which the SCST kernel modules had not yet been built so that SCST rpm packages will not need to be rebuilt after each kernel update.

Configuring SCST

The easiest way to configure SCST is to create a configuration file /etc/scst.conf and by using scstadmin to load that configuration file. The /etc/init.d/scst script uses scstadmin to load the /etc/scst.conf file. The following information is present in /etc/scst.conf:

  • Which local storage has to be exported by SCST, e.g. a file, block device or SCSI device.
  • Through which storage adapter ports SCST allows access to the local storage.
  • Which initiator systems are allowed to log in.

For more information about scst.conf, see also scstadmin/scstadmin.sysfs/man5/scst.conf.5.

On systems that use systemd, load the SCST kernel modules and apply the /etc/scst.conf configuration as follows:

systemctl restart scst

The installed systemd unit delegates these operations to the SCST init script. On systems without systemd, use the init script directly:

/etc/init.d/scst restart

After SCST has been loaded, configuration changes can be applied without unloading and reloading the SCST kernel modules:

scstadmin -config /etc/scst.conf

After the SCST configuration has been changed via scstadmin or by modifying the SCST sysfs attributes, the new configuration can be saved e.g. as follows:

scstadmin -write_config /etc/scst.conf.new

More information about the device handler and target driver sysfs attributes can be found in the scst/README document. More detailed instructions about iSCSI, QLogic FC, SRP and FCoE configuration can be found in the following documents:

  • iscsi-scst/README
  • qla2x00t/doc/qla2x00t-howto.html
  • srpt/README
  • fcst/README