1. Install multipath yum -y install device-mapper-multipath
systemctl enable multipathd.service
vi /etc/multipath.conf
blacklist {
devnode "^sda"
}
defaults {
user_friendly_names yes
path_grouping_policy multibus
failback immediate
no_path_retry fail
}
systemctl start multipathd.service
multipath -ll will output mpath*** size*** and other information (Note: If the output is empty, you can restart and take a look. If it does not work after restarting, it may be that the vmware configuration does not add the disk.EnableUUID=TRUE option, or the machine only has sda disk.)
The lsblk command outputs an additional mpath* partition on disks other than the sda disk.
2. Solution to error when formatting disk in multi-path environment
错误描述:/dev/*** is apparently in use by the system; will not make a filesystem here!
Solution: vi /etc/multipath.conf Add the device path that needs to be formatted in the blacklist item, and then reload the multipathd service.
3. Example