How To Install mdadm on CentOS 7

In this tutorial we learn how to install mdadm on CentOS 7. mdadm is The mdadm program controls Linux md devices (software RAID arrays)

Introduction

In this tutorial we learn how to install mdadm on CentOS 7.

What is mdadm

The mdadm program is used to create, manage, and monitor Linux MD (software RAID) devices. As such, it provides similar functionality to the raidtools package. However, mdadm is a single program, and it can perform almost all functions without a configuration file, though a configuration file can be used to help with some common tasks.

We can use yum or dnf to install mdadm on CentOS 7. In this tutorial we discuss both methods but you only need to choose one of method to install mdadm.

Install mdadm on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

After updating yum database, We can install mdadm using yum by running the following command:

sudo yum -y install mdadm

Install mdadm on CentOS 7 Using dnf

If you don’t have dnf installed you can install DNF on CentOS 7 first. Update yum database with dnf using the following command.

sudo dnf makecache

After updating yum database, We can install mdadm using dnf by running the following command:

sudo dnf -y install mdadm

How To Uninstall mdadm on CentOS 7

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

sudo dnf remove mdadm

References

Summary

In this tutorial we learn how to install mdadm on CentOS 7 using yum and dnf.