How To Install mdadm on CentOS 8
Introduction
In this tutorial we learn how to install mdadm
on CentOS 8.
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 8. In this tutorial we discuss both methods but you only need to choose one of method to install mdadm.
Install mdadm on CentOS 8 Using dnf
Update yum database with dnf
using the following command.
sudo dnf makecache --refresh
The output should look something like this:
CentOS Linux 8 - AppStream 43 kB/s | 4.3 kB 00:00
CentOS Linux 8 - BaseOS 65 kB/s | 3.9 kB 00:00
CentOS Linux 8 - ContinuousRelease 43 kB/s | 3.0 kB 00:00
CentOS Linux 8 - Extras 23 kB/s | 1.5 kB 00:00
CentOS Linux 8 - FastTrack 40 kB/s | 3.0 kB 00:00
CentOS Linux 8 - HighAvailability 36 kB/s | 3.9 kB 00:00
CentOS Linux 8 - Plus 24 kB/s | 1.5 kB 00:00
CentOS Linux 8 - PowerTools 50 kB/s | 4.3 kB 00:00
Extra Packages for Enterprise Linux Modular 8 - x86_64 13 kB/s | 9.2 kB 00:00
Extra Packages for Enterprise Linux 8 - x86_64 24 kB/s | 8.5 kB 00:00
Metadata cache created.
After updating yum database, We can install mdadm
using dnf
by running the following command:
sudo dnf -y install mdadm
Install mdadm on CentOS 8 Using yum
Update yum database with yum
using the following command.
sudo yum makecache --refresh
The output should look something like this:
CentOS Linux 8 - AppStream 43 kB/s | 4.3 kB 00:00
CentOS Linux 8 - BaseOS 65 kB/s | 3.9 kB 00:00
CentOS Linux 8 - ContinuousRelease 43 kB/s | 3.0 kB 00:00
CentOS Linux 8 - Extras 23 kB/s | 1.5 kB 00:00
CentOS Linux 8 - FastTrack 40 kB/s | 3.0 kB 00:00
CentOS Linux 8 - HighAvailability 36 kB/s | 3.9 kB 00:00
CentOS Linux 8 - Plus 24 kB/s | 1.5 kB 00:00
CentOS Linux 8 - PowerTools 50 kB/s | 4.3 kB 00:00
Extra Packages for Enterprise Linux Modular 8 - x86_64 13 kB/s | 9.2 kB 00:00
Extra Packages for Enterprise Linux 8 - x86_64 24 kB/s | 8.5 kB 00:00
Metadata cache created.
After updating yum database, We can install mdadm
using yum
by running the following command:
sudo yum -y install mdadm
How To Uninstall mdadm on CentOS 8
To uninstall only the mdadm
package we can use the following command:
sudo dnf remove mdadm
mdadm Package Contents on CentOS 8
/etc/cron.d/raid-check
/etc/libreport/events.d/mdadm_event.conf
/etc/sysconfig/raid-check
/usr/lib/.build-id
/usr/lib/.build-id/b2
/usr/lib/.build-id/b2/566a27717a1cca9c16a8017f3f13fefe50757d
/usr/lib/.build-id/bf
/usr/lib/.build-id/bf/39c88136df3d99d8887f93b6d67bf29554e3a7
/usr/lib/mdadm/mdadm_env.sh
/usr/lib/systemd/system-shutdown/mdadm.shutdown
/usr/lib/systemd/system/[email protected]
/usr/lib/systemd/system/[email protected]
/usr/lib/systemd/system/[email protected]
/usr/lib/systemd/system/mdcheck_continue.service
/usr/lib/systemd/system/mdcheck_continue.timer
/usr/lib/systemd/system/mdcheck_start.service
/usr/lib/systemd/system/mdcheck_start.timer
/usr/lib/systemd/system/[email protected]
/usr/lib/systemd/system/mdmonitor-oneshot.service
/usr/lib/systemd/system/mdmonitor-oneshot.timer
/usr/lib/systemd/system/mdmonitor.service
/usr/lib/tmpfiles.d/mdadm.conf
/usr/lib/udev/rules.d/01-md-raid-creating.rules
/usr/lib/udev/rules.d/63-md-raid-arrays.rules
/usr/lib/udev/rules.d/64-md-raid-assembly.rules
/usr/lib/udev/rules.d/65-md-incremental.rules
/usr/lib/udev/rules.d/69-md-clustered-confirm-device.rules
/usr/sbin/mdadm
/usr/sbin/mdmon
/usr/sbin/raid-check
/usr/share/doc/mdadm
/usr/share/doc/mdadm/COPYING
/usr/share/doc/mdadm/ChangeLog
/usr/share/doc/mdadm/TODO
/usr/share/doc/mdadm/mdadm.conf-example
/usr/share/doc/mdadm/mdcheck
/usr/share/doc/mdadm/mdcheck.0077
/usr/share/doc/mdadm/syslog-events
/usr/share/man/man4/md.4.gz
/usr/share/man/man5/mdadm.conf.5.gz
/usr/share/man/man8/mdadm.8.gz
/usr/share/man/man8/mdmon.8.gz
/usr/share/mdadm/mdcheck
/var/run/mdadm
References
Summary
In this tutorial we learn how to install mdadm
on CentOS 8 using yum and dnf.