Simplifies iSCSI management of Ceph RBD images.
The lrbd utility centrally stores the configuration in Ceph objects and executes the necessary rbd and targetcli commands to apply the stored configuration.
The tool depends on targetcli which depends on python-rtslib. The original purpose is to support the rbd backstore and is the default option. If your distribution is lacking kernel support or updated packages for targetcli and python-rtslib, the iblock backstore can be used for many configurations.
For the impatient, follow the instructions for the simplest configuration of one initiator to one gateway to one image. A working Ceph installation is required.
# zypper in lrbd
# dnf install lrbd
# yum install lrbd
# ceph osd pool create swimming 256 256
# rbd -p swimming create raft --size 2048
# lrbd -e
# lrbd -I
# targetcli ls
# iscsiadm -m discovery -t st -p
gateway_address
# iscsiadm -m node -p
gateway_address--login
# multipath -ll
# iscsiadm -m node -p
gateway_address--logout
# iscsiadm -m node -o delete
# lrbd -C
# lrbd -u
# lrbd -W
See Wiki
The gateway is simply a Linux host that supports iSCSI. This host is providing iSCSI access to another host, a client or initiator, and is mapping Ceph RBD images locally. Any client that cannot use Ceph directly (lack of library support), but supports iSCSI can still use Ceph storage.
One gateway can support multiple iSCSI targets which is primarily the reason for the distinction.
For creating or editing the configuration, lrbd can run on any ceph client with proper credentials (e.g. ceph.client.admin.keyring). For applying the configuration, lrbd runs on the host intended to be a gateway.
Lrbd does not configure multipath on an initiator. See multipathd.