Notice
This document is for a development version of Ceph.
Manual ceph-iscsi Installation
Warning
The iSCSI gateway is deprecated. It is no longer maintained or supported,
and it may be removed from Ceph in a future release. Existing deployments
should migrate to direct RBD access from clients (librbd, QEMU,
Kubernetes CSI and similar) or to the NVMe-oF gateway.
Requirements
To complete the installation of ceph-iscsi, there are 4 steps:
Install common packages from your Linux distribution’s software repository
Install Git to fetch tcmu-runner and ceph-iscsi from their Git repositories
Ensure a compatible kernel is used
Install all the components of ceph-iscsi and start associated daemons:
tcmu-runner
rtslib-fb
configshell-fb
targetcli-fb
ceph-iscsi
1. Install Common Packages
The following packages will be used by ceph-iscsi and target tools. They must be installed from your Linux distribution’s software repository on each machine that will be a iSCSI gateway:
libnl3
libkmod
librbd1
ceph-common
pyparsing
python kmod
python pyudev
python gobject
python urwid
python pyparsing
python rados
python rbd
python netifaces
python cryptography
python distro
python requests
python flask
pyOpenSSL
2. Install Git
In order to install tcmu-runner and ceph-iscsi, you need to download them directly from their repository by using Git. On CentOS/RHEL execute:
sudo yum install git
On Debian/Ubuntu execute:
sudo apt install git
To know more about Git and how it works, please, visit https://git-scm.com
3. Ensure a compatible kernel is used
Ensure you use a supported kernel that contains the required Ceph iSCSI patches:
any Linux distribution with a kernel v4.16 or newer, or
Enterprise Linux (EL) 7.5 or later, in which ceph-iscsi support is backported
If you are already using a compatible kernel, you can go to next step. However, if you are NOT using a compatible kernel then check your distro’s documentation for specific instructions on how to build this kernel. The only Ceph iSCSI specific requirements are that the following build options must be enabled:
CONFIG_TARGET_CORE=m CONFIG_TCM_USER2=m CONFIG_ISCSI_TARGET=m
4. Install ceph-iscsi
Finally, install the remaining components and start their services.
tcmu-runner
Installation:
git clone https://github.com/open-iscsi/tcmu-runner cd tcmu-runnerRun the following command to install all the needed dependencies:
./extra/install_dep.shNow you can build the tcmu-runner. To do so, use the following build command:
cmake -Dwith-glfs=false -Dwith-qcow=false -DSUPPORT_SYSTEMD=ON -DCMAKE_INSTALL_PREFIX=/usr make installEnable and start the daemon:
systemctl daemon-reload systemctl enable tcmu-runner systemctl start tcmu-runner
rtslib-fb
Installation:
yum install python3-rtslibOn Debian and Ubuntu, install
python3-rtslib-fbwithapt.
configshell-fb
Installation:
yum install python3-configshellOn Debian and Ubuntu, install
python3-configshell-fbwithapt.
targetcli-fb
Installation:
yum install targetcli mkdir -p /etc/target mkdir -p /var/targetOn Debian and Ubuntu, install
targetcli-fbwithapt.Warning
The ceph-iscsi tools assume they are managing all targets on the system. If targets have been setup and are being managed by targetcli the target service must be disabled.
ceph-iscsi
Installation:
git clone https://github.com/ceph/ceph-iscsi.git cd ceph-iscsi python setup.py install --install-scripts=/usr/bin cp usr/lib/systemd/system/rbd-target-gw.service /lib/systemd/system cp usr/lib/systemd/system/rbd-target-api.service /lib/systemd/systemEnable and start the daemon:
systemctl daemon-reload systemctl enable rbd-target-gw systemctl start rbd-target-gw systemctl enable rbd-target-api systemctl start rbd-target-api
Installation is complete. Proceed to the setup section in the main ceph-iscsi CLI page.
Brought to you by the Ceph Foundation
The Ceph Documentation is a community resource funded and hosted by the non-profit Ceph Foundation. If you would like to support this and our other efforts, please consider joining now.