
mdmpd Command in Linux
The mdmpd daemon is an essential command-line utility that lets us manage and monitor MD (Multiple Device) multipath devices in Linux. It is designed for systems that use multiple paths to storage devices, ensuring high availability and fault tolerance by keeping track of the status of these devices.
mdmpd is a part of the device-mapper framework and works with the device-mapper-multipath (DM-Multipath) utility to maintain the health of multipath setups.
Table of Contents
Here is a comprehensive guide to the options available with the mdmpd command −
- What is mdmpd Command in Linux?
- How to Install mdmpd Command in Linux?
- How to Configure mdmpd Command in Linux?
- How to Start and Enable mdmpd Command in Linux?
- How to Manage mdmpd Command in Linux?
- How to View Logs in Linux?
- Troubleshooting mdmpd Command in Linux
What is mdmpd Command in Linux?
mdmpd stands for Multiple Device Mapper Path Daemon and is responsible for overseeing and managing MD multipath devices in Linux systems. It continuously monitors the paths to storage devices and ensures the system stays operational, even if one or more paths fail. This is especially important in environments where data redundancy, high availability, and performance optimization are crucial, such as in enterprise storage systems or large data centers.
Key Features of mdmpd
Multipath devices use multiple physical paths to connect to a storage device. If one path fails, the system automatically switches to another path. This prevents disruptions in data access. The mdmpd daemon ensures this failover process happens smoothly. Here are some important features of the Linux mdmpd command −
- Monitoring Path Failures: mdmpd keeps track of the paths in multipath devices. If any path fails, the daemon activates the failover system to make sure the storage can still be accessed through the working paths.
- Path Recovery: When a failed path comes back online, mdmpd detects it and makes it available again. This helps the system return to its best state once the path is working properly.
- Notification of Path Changes: mdmpd can alert administrators about changes in the paths, which helps with system maintenance and taking action before problems arise.
- High Availability and Redundancy: By ensuring there are working backup paths, mdmpd helps keep the system available and prevents downtime or data loss due to hardware failures.
How to Install mdmpd Command in Linux?
The mdmpd daemon is typically installed with the device-mapper-multipath package on most Linux systems. If it's not already installed, you can easily add it using your package manager. For example, Ubuntu/Debian users can use the following command to install mdmpd −
sudo apt install multipath-tools

The same package can be obtained on the Red Hat/CentOS-based systems by executing the following command −
sudo yum install device-mapper-multipath
After installation, we can use mdpmd on Linux systems.
How to Configure mdmpd Command in Linux?
After installing the mdmpd daemon, you can set it up to monitor and manage your multipath devices. Configuration is done through the /etc/multipath.conf file, where you specify different settings for multipath I/O and path management.
For example, the following code demonstrates the basic configuration for the mdmpd daemon in the /etc/multipath.conf file −
# /etc/multipath.conf defaults { user_friendly_names yes path_checker tur path_grouping_policy multibus failback manual } devices { device { vendor "HP" product "P2000" path_selector "round-robin 0" path_grouping_policy "multibus" } }
This code sets up multipath I/O for devices, using user-friendly names, the tur method for path checking, and a multibus policy for path grouping. It specifies manual failback and defines settings for an HP P2000 device, with round-robin path selection and multibus grouping.
How to Start and Enable mdmpd Command in Linux?
After configuration, we can start and enable mdmpd on Linux by executing the following commands −
sudo systemctl start mdmpd sudo systemctl enable mdmpd
How to Manage mdmpd Command in Linux?
After the daemon starts, it will continuously monitor the multipath devices and their paths. However, you can also control the daemon manually using different commands. For example, you can execute the following command to check whether the daemon is active, inactive, or experiencing issues −
sudo systemctl status mdmpd
Similarly, you can stop or restart the daemon manually for maintenance −
sudo systemctl stop mdmpd sudo systemctl restart mdmpd
How to View Logs in Linux?
You can use the journalctl command to view the logs. These logs show information about the path monitoring, failover events, and recovery processes −
sudo journalctl -u mdmpd
Troubleshooting mdmpd Command in Linux
If mdmpd isn't working appropriately, try one of the following steps to troubleshoot −
- Check Multipath Status − Use the multipath -ll command to see the status of your multipath devices and their paths.
- Verify Configuration − Make sure the /etc/multipath.conf file is set up correctly. Look for any typo mistakes or wrong settings that might cause the daemon to not work properly.
- Check Logs − Use journalctl to check logs for any error messages related to the mdmpd daemon. These messages might help identify issues with path monitoring or failover.
- Hardware Check − If the daemon reports path failures, inspect the physical hardware, such as cables, controllers, or storage devices, for any problems.
- Restart the Daemon − If the daemon isn't responding as expected, try restarting it to fix any minor issues.
Conclusion
The mdmpd daemon helps manage and monitor MD multipath devices in Linux systems. It constantly monitors the paths to ensure high availability and redundancy, preventing downtime and data loss, especially in environments that require continuous access to storage devices. Its features, such as path failure detection, path recovery, and failover management, help maintain system performance even when some paths fail.
After installing mdmpd, we can configure it to monitor and manage multipath devices. This helps ensure a reliable and fault-tolerant storage setup. In this article, we explained how to use the mdmpd command in Linux.