The procedure to configure DM-Multipath from an iSCSI initiator to an iSCSI target is presented, which assumes the following:
- The iSCSI target package is installed on the server.
- Targets and LUNs are configured on the iSCSI server.
- The iSCSI initiator package is installed on the client.
- The DM-Multipath package is installed on the client.
- The targets have been discovered by the client.
- An iSCSI session is active between the target and the initiator.
- The initiator has redundant network connections to the target.
Before enabling DM-Multipath on the client, there is no /etc/multipath.conf
configuration file:
# ls /etc/multipath.conf
You can manually create this file or enable DM-Multipath with the mpathconf
utility:
# mpathconf --enable
This command copies multipath.conf from the /usr/share/doc/device-mapper-multipath-[version]
directory to the /etc directory.
Run the following command to enable DM-Multipath. Notice that the configuration file now exists:
# mpathconf --enable # ls /etc/multipath.conf /etc/multipath.conf
Before starting the multipathd daemon, there are no mpathN devices in /dev/mapper
:
# ls /dev/mapper/mpatha ls: cannot access /dev/mapper/mpatha: No such file or directory
After starting the multipathd daemon, the mpathN device is created in /dev/mapper: # systemctl
start multipathd
# ls /dev/mapper/mpatha /dev/mapper/mpatha
Use the /dev/mapper/mpatha
name when creating a partition, when creating an LVM physical volume, and when making and mounting a file system. If one of the network interfaces fails on the initiator, I/O continues through the remaining active interface.