How To Install lvm2-lockd on Ubuntu 18.04

In this tutorial we learn how to install lvm2-lockd on Ubuntu 18.04. lvm2-lockd is LVM locking daemon

Introduction

In this tutorial we learn how to install lvm2-lockd on Ubuntu 18.04.

What is lvm2-lockd

lvm2-lockd is:

This is LVM2, the rewrite of The Linux Logical Volume Manager. LVM supports enterprise level volume management of disk and disk subsystems by grouping arbitrary disks into volume groups. The total capacity of volume groups can be allocated to logical volumes, which are accessed as regular block devices.

LVM commands use lvmlockd to coordinate access to shared storage.

There are three methods to install lvm2-lockd on Ubuntu 18.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 lvm2-lockd Using apt-get

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

sudo apt-get update

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

sudo apt-get -y install lvm2-lockd

Install lvm2-lockd Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install lvm2-lockd

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

sudo aptitude -y install lvm2-lockd

How To Uninstall lvm2-lockd on Ubuntu 18.04

To uninstall only the lvm2-lockd package we can use the following command:

sudo apt-get remove lvm2-lockd

Uninstall lvm2-lockd And Its Dependencies

To uninstall lvm2-lockd and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:

sudo apt-get -y autoremove lvm2-lockd

Remove lvm2-lockd Configurations and Data

To remove lvm2-lockd configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge lvm2-lockd

Remove lvm2-lockd configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge lvm2-lockd

References

Summary

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