How To Install tcmu-runner on Ubuntu 20.04
Introduction
In this tutorial we learn how to install tcmu-runner
on Ubuntu 20.04.
What is tcmu-runner
tcmu-runner is:
LIO is the SCSI target in the Linux kernel. It is entirely kernel code, and allows exported SCSI logical units (LUNs) to be backed by regular files or block devices. But, if one want to get fancier with the capabilities of the device one is emulating, the kernel is not necessarily the right place. While there are userspace libraries for compression, encryption, and clustered storage solutions like Ceph or Gluster, these are not accessible from the kernel.
The TCMU userspace-passthrough backstore allows a userspace process to handle requests to a LUN. But since the kernel-user interface that TCMU provides must be fast and flexible, it is complex enough that one would like to avoid each userspace handler having to write boilerplate code.
tcmu-runner handles the messy details of the TCMU interface – UIO, netlink, pthreads, and DBus – and exports a more friendly C plugin module API. Modules using this API are called “TCMU handlers”. Handler authors can write code just to handle the SCSI commands as desired, and can also link with whatever userspace libraries they like.
This is the daemon package
Package: tcmu-runner Architecture: amd64 Version: 1.5.2-5build1 Priority: optional Section: universe/admin Source: tcmu Origin: Ubuntu Maintainer: Ubuntu Developers [email protected] Original-Maintainer: Freexian Packaging Team [email protected] Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 329 Pre-Depends: init-system-helpers (>= 1.54~) Depends: libc6 (>= 2.17), libglib2.0-0 (>= 2.37.3), libkmod2 (>= 5~), librbd1 (>= 12.1.4), libtcmu2 (>= 1.5.2), zlib1g (>= 1:1.1.4) Filename: pool/universe/t/tcmu/tcmu-runner_1.5.2-5build1_amd64.deb Size: 89576 MD5sum: e22e817cfdab5b81786e31d3cdde42a5 SHA1: 689ce06113af574871cd5b63b4d1348e07b61b9f SHA256: 2ecdf72ea864b34f9c2eeef3e38ea0b61b45cf2c18bf7536a9c462c3d6e49091 Homepage: https://github.com/open-iscsi/tcmu-runner Description-en: Daemon that handles the userspace side of the LIO TCM-User backstore LIO is the SCSI target in the Linux kernel. It is entirely kernel code, and allows exported SCSI logical units (LUNs) to be backed by regular files or block devices. But, if one want to get fancier with the capabilities of the device one is emulating, the kernel is not necessarily the right place. While there are userspace libraries for compression, encryption, and clustered storage solutions like Ceph or Gluster, these are not accessible from the kernel.
The TCMU userspace-passthrough backstore allows a userspace process to handle requests to a LUN. But since the kernel-user interface that TCMU provides must be fast and flexible, it is complex enough that one would like to avoid each userspace handler having to write boilerplate code.
tcmu-runner handles the messy details of the TCMU interface – UIO, netlink, pthreads, and DBus – and exports a more friendly C plugin module API. Modules using this API are called “TCMU handlers”. Handler authors can write code just to handle the SCSI commands as desired, and can also link with whatever userspace libraries they like.
This is the daemon package
There are three methods to install tcmu-runner
on Ubuntu 20.04. We can use apt-get
, apt
and aptitude
. In the following sections we will describe each method. You can choose one of them.
Install tcmu-runner Using apt-get
Update apt database with apt-get
using the following command.
sudo apt-get update
After updating apt database, We can install tcmu-runner
using apt-get
by running the following command:
sudo apt-get -y install tcmu-runner
Install tcmu-runner Using apt
Update apt database with apt
using the following command.
sudo apt update
After updating apt database, We can install tcmu-runner
using apt
by running the following command:
sudo apt -y install tcmu-runner
Install tcmu-runner Using aptitude
If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude
using the following command.
sudo aptitude update
After updating apt database, We can install tcmu-runner
using aptitude
by running the following command:
sudo aptitude -y install tcmu-runner
How To Uninstall tcmu-runner on Ubuntu 20.04
To uninstall only the tcmu-runner
package we can use the following command:
sudo apt-get remove tcmu-runner
Uninstall tcmu-runner And Its Dependencies
To uninstall tcmu-runner
and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:
sudo apt-get -y autoremove tcmu-runner
Remove tcmu-runner Configurations and Data
To remove tcmu-runner
configuration and data from Ubuntu 20.04 we can use the following command:
sudo apt-get -y purge tcmu-runner
Remove tcmu-runner configuration, data, and all of its dependencies
We can use the following command to remove tcmu-runner
configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge tcmu-runner
References
Summary
In this tutorial we learn how to install tcmu-runner
package on Ubuntu 20.04 using different package management tools: apt
, apt-get
and aptitude
.