In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces "how to implement Linux MultiPath multipath software". In daily operation, I believe many people have doubts about how to implement Linux MultiPath multipath software. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts about "how to implement Linux MultiPath multipath software". Next, please follow the editor to study!
How Multipath works
When multipath starts, it gets the UUID (universally unique identify) of all the block devices in the proc/partitions through the system command scsi_id-eg-s / block/sdX, and then forms a Group of all the block devices with the same UUID, and produces a corresponding separate device in / dev/mapper. When the device is generated, it can be partitioned using fdisk or parted, the partition can be registered with the kpartx command, and then the file system and mount can be created with the system command.
Generally, the device-mapper software package will be installed at the same time during the series installation process. Use the linux built-in command rpm to check whether the secondary package has been installed. Install the following rpm package using the command rpm-ivh:
Device-mapper-*
Device-mapper-multipath-*
Device-mapper-1*
Start multipath and configure multipath
Start multipathing and create a default template through the mpathconf command. To create a default configuration and start and activate the multipathd process, you can use the following command:
Mpathconf-enable-with_multipathd y
It is recommended to restart the multipathing software after the configuration is complete:
/ etc/init.d/multipathd restart
Note: after startup, multipath.conf files are generated under / etc/, and bindings and wwid are generated under / etc/multipath. Wwid records the unique ID,Bindings of all mounted disks in the system. The mapping disk corresponding to ID is generally bound to generate files such as mpathx under / dev/mapper.
Remarks-
If not, you can follow Deploying Oracle RAC 11g R2 Database on Red Hat EnterpriseLinux 6.
To do this as follows:
1. As the root user, install the device-mapper-multipath package using the yum package
Manager.
# yum-y install device-mapper-multipath
2. Copy the multipath.conf file found within / usr/share/doc/device-mapper-multipath-0.4.9/ to / etc/
# cp / usr/share/doc/device-mapper-multipath-0.4.9/multipath.conf / etc/
3. Capture the scsi id of the local disk (s) on the system.
# scsi_id-whitelisted-replace-whitespace-device=/dev/sda
3600508b1001030353434363646301200
4. Uncomment and modify the blacklist section within the / etc/multipath.conf file to include
The scsi id of the local disk on the system. Once complete, save the changes made to
The multipath.conf file.
Blacklist {
Wwid 3600508b1001030353434363646301200
Devnode "^ (ram | raw | loop | fd | md | dm- | sr | scd | st) [0-9] *"
Devnode "^ hd [a murz]"
}
5. Start the multipath daemon.
# service multipathd start
Starting multipathd daemon: [OK]
6. Enable the multipath daemon to ensure it is started upon boot time.
# chkconfig multipathd on
7. Identify the dm- device, size, and WWID of each device mapper volume for Oracle
OCR and voting disks, data disks and recovery disks. In this example, volume mpathb
Is identified via the following command:
# multipath-ll
Figure Multipath Device (mpathb)
8. Uncomment the defaults section found within the / etc/multipath.conf file.
Defaults {
Udev_dir / dev
Polling_interval 10
Path_selector "round-robin 0"
Path_grouping_policy multibus
Getuid_callout "/ lib/udev/scsi_id-- whitelisted-- device=/dev/%n"
Prio alua
Path_checker readsector0
Rr_min_io 100
Max_fds 8192
Rr_weight priorities
Failback immediate
No_path_retry fail
User_friendly_names yes
}
NOTE: The standard options can be customized to better fit your storage array's
Capabilities. Check with your storage vendor for details.
9. Un-comment the multipath section found within the / etc/multipath.conf file and create an alias for each device mapper volume in order to enable persistent naming of those volumes. Once complete, save the changes made to the multipath.conf file. The output should resemble the example below. For reference, refer the Oracle data volumes created for the reference environment as displayed in Table 2.4.3: Oracle OCR,Voting Disk, & Data File Sizes.
/ etc/multipath.conf
Multipaths {
Multipath {
Wwid 3600c0ff000d7e7a854a0f65101000000
Alias db1
}
Multipath {
Wwid 3600c0ff000dabfe562a0f65101000000
Alias db2
}
Multipath {
Wwid 3600c0ff000d7e7a874a0f65101000000
Alias fra
}
Multipath {
Wwid 3600c0ff000dabfe585a0f65101000000
Alias redo
}
Multipath {
Wwid 3600c0ff000dabfe596a0f65101000000
Alias ocrvote1
}
Multipath {
Wwid 3600c0ff000dabfe5a2a0f65101000000
Alias ocrvote2
}
Multipath {
Wwid 3600c0ff000dabfe5b4a0f65101000000
Alias ocrvote3
}
}
10.Restart the device mapper multipath daemon.
# service multipathd restart
Ok
Stopping multipathd daemon: [OK]
Starting multipathd daemon: [OK]
11.Verify the device mapper paths and aliases are displayed properly. Below is an example of one device mapper device labeled fra.
# multipath-ll
Fra (3600c0ff000d7e7a89e85ac5101000000) dm-10 HP,MSA2324fc
Size=186G features='1 queue_if_no_path' hwhandler='0' wp=rw
| |-+-policy='round-robin 0' prio=130 status=active |
| |-3 sdd 0 sdd 8:48 active ready running |
| |-3 sdh 012 active ready running
| |-4 sdt 0 sdt 0 sdt 65:48 active ready running |
| | `- 4 sdx 0 active ready running 1 3-65 15 12 |
`- +-policy='round-robin 0' prio=10 status=enabled
| |-3 sdl 0RV 2RU 3 sdl 8Rd 176 active ready running |
| |-3, sdp, 0, 3, 3, 3, 8, and 240 active ready running |
| |-4 sdab 0RV 2RU 3 sdab 65Rd 176 active ready running |
`- 4VOV 0VOR 3RU 3 sdaf 65RU 240active ready running
-
Configuration file
By default, DM-Multipath provides configuration values for most multipathing uses. In addition, DM-Multipath supports most common DM-Multipath-enabled storage arrays. For default configuration values and supported devices, please refer to / usr/share/doc/device-mapper-multipath-0.4.9/multipath.conf.defaults. You can edit / etc/multipath.conf to override the default configuration of DM-Multipath. "if necessary, you can also default to storage arrays that are not supported by the profile."
The multipath profile can be divided into the following sections:
Blacklist
A list of specific devices that are not considered multipath.
Blacklist_exceptions
Lists multipath devices that are not on the blacklist according to the parameters in the blacklist section.
Defaults
General default settings for DM-Multipath.
Multipaths
Property settings for each independent multipath device. These values override the values specified in the defaults and devices sections of the configuration file.
Devices
Settings for each storage controller. These values override the values specified in the defaults section of the configuration file. "if you want to use a storage array that is not supported by default, you may need to create a devices subsection for your array."
When the system determines the properties of a multipath device, it first checks the multipath settings, then the settings for each device, and then the multipath system default settings.
After the above configuration is completed, start the multipathd process. After the process starts, you will automatically scan the device. You can see the generated devices such as mapth5 in the / dev/mapper directory.
1. Use the command multipath to check whether the path status is normal
[root@dbserv1 mapper] # multipath-d-l
two。 After using the system fdisk command to partition, use the command kpartx l / dev/mapper/mpath5 to view the partition information
3. If it is not found, you can use the kpartx d / dev/mapper/mpath5 command to register the partition
4. If you use ASM disk management, the next step is to configure partition permissions and aliases through udev so that Oracle can see these partitions during the ASM configuration process. The specific configuration process for udev will be explained in the next article.
5. Of course, you can also use Oracle ASMLib to configure ASM disks, which is a little more troublesome than udev, but it also has the corresponding advantage, that is, the extra space in ASM can be recognized by the OS file system through configuration.
6. If you do not use Rac, in a single-node environment, use mke2fs-j / dev/mapper/mapth5p1 to create a file system on the corresponding partition
7. You can mount the file system using the command of mount.
Multipath basic maintenance command
1. Start and stop multipath:
/ etc/init.d/multipathd stop/start/reatart
two。 View the current multipath link status and disk status:
Multipath-ll
3. Delete multipath devices:
Multipath-F
4. Rescan the device:
Multipath-v3
5. When you add new devices to DM-Multipath, they are located in two different locations in the / dev directory:
/ dev/mapper/mpathn
/ dev/dm-n
The devices in / dev/mapper are generated during boot. These devices can be used to access multipath devices, such as when generating logical volumes
All devices in / dev/dm-n format can only be used internally, please do not use them
At this point, the study on "how to implement Linux MultiPath multipath software" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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.