rbd-target-api command not found

In this troubleshooting guide we learn how to fix rbd-target-api command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

rbd-target-api: command not found

or when using sudo you get the following error message

sudo: rbd-target-api: command not found

Solutions to rbd-target-api: command not found

How To Fix rbd-target-api: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu rbd-target-api is provided by ceph-iscsi package.

ceph-iscsi is:

It includes the rbd-target-api daemon which is responsible for restoring the state of LIO following a gateway reboot/outage and exporting a REST API to configure the system using tools like gwcli. It replaces the existing ’target’ service.

There is also a second daemon rbd-target-gw which exports a REST API to gather statistics.

It also includes the CLI tool gwcli which can be used to configure and manage the Ceph iSCSI gateway, which replaces the existing targetcli CLI tool. This CLI tool utilizes the rbd-target-api server daemon to configure multiple gateways concurrently.

To fix this problem, we can install more using the command below.

sudo apt-get -y install ceph-iscsi

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install ceph-iscsi.

sudo apt -y install ceph-iscsi

Or if you have aptitude installed you can use the following command.

sudo aptitude install ceph-iscsi

Summary

In this tutorial we learn how to fix rbd-target-api command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.