In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail what multipath is like in linux. The content of the article is of high quality, so Xiaobian shares it with you as a reference. I hope you have a certain understanding of relevant knowledge after reading this article.
What is Multipath?
A normal computer host is a hard disk attached to a bus, here is a one-to-one relationship. And to the SAN environment composed of optical fiber, or IP SAN environment composed of iSCSI, because the host and storage are connected through optical fiber switches or multiple network cards and IP, in this case, it constitutes a many-to-many relationship. That is, there can be multiple paths from host to storage. IO from host to storage can be selected by multiple paths. Each host can travel several different paths to its corresponding storage. If it is used at the same time, how is the I/O traffic distributed? One of the paths is broken, how to deal with it? Also, from the operating system's point of view, each path, the operating system will think that it is an actual physical disk, but in fact it is only a different path to the same physical disk, which brings confusion to the user when it is used. Multipath software is designed to solve the above problems.
The main function of multipath is to cooperate with storage devices to achieve the following functions:
1. failover and recovery
2. Load Balancer of IO Traffic
3. Virtualization of disks
Because multipath software is required to work with storage, different vendors offer different versions based on different operating systems. And some vendors, software and hardware are not sold together, if you want to use multi-path software, you may need to buy a license from the vendor. For example, EMC's multi-path software based on Linux requires a separate license. Fortunately, RedHat and Suse 2.6 kernel comes with a free multi-path package, and can be used free of charge, but also a relatively common package, can support most storage vendors 'devices, even if some are not famous vendors, through a slight modification of the configuration file, but also can support and run very well.
II. Configure multipath
1. Configure yum source
2. Install multipath software
yum install device-mapper device-mapper-multipath
3. set
3.1 multipath settings
Then check the status of multipath by using the command: multipath -ll to see if the module was loaded successfully
[root@liujing ~]# multipath -ll View multipath status
Mar 10 19:18:28 | /etc/multipath.conf does not exist, blacklisting all devices.
Mar 10 19:18:28 | A sample multipath.conf file is located at
Mar 10 19:18:28 | /usr/share/doc/device-mapper-multipath-0.4.9/multipath.conf
Mar 10 19:18:28 | You can run /sbin/mpathconf to create or modify /etc/multipath.conf
Mar 10 19:18:28 |DM multipath kernel driver not loaded ---DM module not loaded
If the module does not load successfully, use the following commands to initialize DM, or restart the system
---Use the following commands to initialize and start DM for the first time:
modprobe dm-multipath
modprobe dm-round-robin
service multipathd start
multipath -v2
After initialization, check whether the load is successful by using multipath -ll command
[root@liujing ~]# multipath -ll
Mar 10 19:21:14 | /etc/multipath.conf does not exist, blacklisting all devices.
Mar 10 19:21:14 | A sample multipath.conf file is located at
Mar 10 19:21:14 | /usr/share/doc/device-mapper-multipath-0.4.9/multipath.conf
Mar 10 19:21:14 | You can run /sbin/mpathconf to create or modify /etc/multipath.conf
DM multipath kernel driver not loaded ---This prompt is missing indicating that the DM module has been loaded successfully.
As you can see from the above prompt, DM module is loaded successfully, but there is no multipath.conf configuration file under/etc/. The next step is how to configure multipath.conf file.
3.2. Configure multipath:
Create a Multipath configuration file via vi command, the path is/etc/multipath.conf , add multipath to the configuration file, the simplest configuration to work properly is as follows:
vi /etc/multipath.conf
blacklist {
devnode "^sda"
}
defaults {
user_friendly_names yes
path_grouping_policy multibus
failback immediate
no_path_retry fail
}
multipaths {
multipath {
wwid 360080e50002c4bbc00000c8159836588
alias mpath2
}
multipath {
wwid 360080e50002c4bbc00000c7f59836554
alias mpath3
}
multipath {
wwid 360080e50002c4bbc00000c55597945ee
alias mpath4
}
multipath {
wwid 360080e50002c4df200000c4359794ebc
alias mpath5
}
multipath {
wwid 360080e50002c4df200000c4759794ff2
alias mpath6
}
}
service multipathd restart
What kind of multipath in linux is shared here, I hope the above content can be of some help to everyone, you can learn more knowledge. If you think the article is good, you can share it so that more people can see it.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.