How To Install libtcmu2 on Ubuntu 20.04

In this tutorial we learn how to install libtcmu2 on Ubuntu 20.04. libtcmu2 is Library that handles the userspace side of the LIO TCM-User backstore Library that handles the userspace side of the LIO TCM-User backstore

Introduction

In this tutorial we learn how to install libtcmu2 on Ubuntu 20.04.

What is libtcmu2

libtcmu2 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 library package

Package: libtcmu2 Architecture: amd64 Version: 1.5.2-5build1 Priority: optional Section: universe/libs 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: 137 Depends: libc6 (>= 2.14), libglib2.0-0 (>= 2.37.3), libnl-3-200 (>= 3.2.27), libnl-genl-3-200 (>= 3.2.21) Filename: pool/universe/t/tcmu/libtcmu2_1.5.2-5build1_amd64.deb Size: 38252 MD5sum: 79c207403d97def3f9240316eca1bdb1 SHA1: 9441c079caf087f15ea9c54ec14b9e8836b0636a SHA256: 6de959c4aed3428bad946a21afdc0fb9dbe6cb63e0da04686994254bea4c4295 Homepage: https://github.com/open-iscsi/tcmu-runner Description-en: Library 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 library package

There are three methods to install libtcmu2 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 libtcmu2 Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install libtcmu2 using apt-get by running the following command:

sudo apt-get -y install libtcmu2

Install libtcmu2 Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install libtcmu2 using apt by running the following command:

sudo apt -y install libtcmu2

Install libtcmu2 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 libtcmu2 using aptitude by running the following command:

sudo aptitude -y install libtcmu2

How To Uninstall libtcmu2 on Ubuntu 20.04

To uninstall only the libtcmu2 package we can use the following command:

sudo apt-get remove libtcmu2

Uninstall libtcmu2 And Its Dependencies

To uninstall libtcmu2 and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:

sudo apt-get -y autoremove libtcmu2

Remove libtcmu2 Configurations and Data

To remove libtcmu2 configuration and data from Ubuntu 20.04 we can use the following command:

sudo apt-get -y purge libtcmu2

Remove libtcmu2 configuration, data, and all of its dependencies

We can use the following command to remove libtcmu2 configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge libtcmu2

References

Summary

In this tutorial we learn how to install libtcmu2 package on Ubuntu 20.04 using different package management tools: apt, apt-get and aptitude.