As I investigated, rbd support actually disabled in scsi-target-utils package. You can see it if you install it's SRPM and look at SPEC file of this package.
Here are 7-8 lines of this file:
# Disable rbd on epel7 b/c deps are not present
%{!?rhel:%global with_rbd 1}
Also there is an additional dependency for this backstore in scsi-target-utils. You will need to install ceph-devel package (could be fetched from ceph repos).
So, to install scsi-target-utils with rbd support you need to do actions below:
- Add official ceph repository
- Add epel repository
- Install build environment
- Download and install scsi-target-utils SRPM
- Set global flag with_rbd in SRPM's spec file
- Build SRPM
- Install dependent packages for scsi-target-utils
- Install built scsi-target-utils and scsi-target-utils-rbd packages
Or in Bash language:
cd /tmp
sudo yum install -y epel-release
sudo rpm --import 'https://download.ceph.com/keys/release.asc'
sudo yum install -y http://download.ceph.com/rpm/rhel7/noarch/ceph-release-1-1.el7.noarch.rpm
sudo yum install -y yum-utils rpm-build redhat-rpm-config make gcc
yumdownloader --source scsi-target-utils
rpm -i scsi-target-utils*.src.rpm
cd ~/rpmbuild
sed -ie 's/%{!?rhel:%global with_rbd 1}/%global with_rbd 1/' SPECS/scsi-target-utils.spec
sudo yum install -y libxslt docbook-style-xsl libaio-devel systemd-devel libibverbs-devel librdmacm-devel ceph-devel glusterfs-api-devel
rpmbuild -ba SPECS/scsi-target-utils.spec
sudo yum install -y ./RPMS/x86_64/scsi-target-utils-1.*.rpm ./RPMS/x86_64/scsi-target-utils-rbd-1.*.rpm
After installation was finished start tgtd daemon and check for available components:
$ sudo systemctl enable tgtd.service
$ sudo systemctl start tgtd.service
$ sudo tgtadm --lld iscsi --mode system --op show
System:
State: ready
debug: off
LLDs:
iscsi: ready
iser: error
Backing stores:
rbd (bsoflags sync:direct)
sheepdog
bsg
sg
null
ssc
smc (bsoflags sync:direct)
mmc (bsoflags sync:direct)
rdwr (bsoflags sync:direct)
aio
Device types:
disk
cd/dvd
osd
controller
changer
tape
passthrough
iSNS:
iSNS=Off
iSNSServerIP=
iSNSServerPort=3205
iSNSAccessControl=Off