RHEL5 Multi-Path configuration

Source: Internet
Author: User

1 Check if the package is installed

[Email protected] ~]# Rpm-qa|grep device-mapper

Device-mapper-libs-1.02.74-10.el6.x86_64

Device-mapper-event-libs-1.02.74-10.el6.x86_64

Device-mapper-multipath-0.4.9-56.el6.x86_64

Device-mapper-1.02.74-10.el6.x86_64

Device-mapper-event-1.02.74-10.el6.x86_64

Device-mapper-multipath-libs-0.4.9-56.el6.x86_64

2 Installing Multipath

[Email protected] ~]# Yum-yinstall multipath

3 Boot up

[Email protected] ~]# CHKCONFIGMULTIPATHD on

4 Editing the Multipath configuration file

Vi/etc/multipath.conf

# a Basicconfiguration file with some examples, for device mapper

# multipath.

# for a complete list of thedefault configuration values, see

#/usr/share/doc/device-mapper-multipath-0.4.9/multipath.conf.defaults

# for a list of configurationoptions with descriptions, see

#/usr/share/doc/device-mapper-multipath-0.4.9/multipath.conf.annotated

#

# Remember:after updatingmultipath.conf, you must run

#

# Service MULTIPATHD Reload

#

# for the changes-Takeeffect in MULTIPATHD

# By default, devices Withvendor = "IBM" and Product = "s/390.*" is

# # blacklisted. To enablemulitpathing on these devies, uncomment the

# # following lines.

#blacklist_exceptions {

# device {

# Vendor "IBM"

# product "s/390.*"

#      }

#}

# # Use user friendly names,instead of using wwids as names.

Defaults {

User_friendly_names Yes

}

##

# #: Example of HOWTO configure some standard options.

##

#

#defaults {

# Udev_dir/dev

# Polling_interval 10

# selector "Round-robin0"

# 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

#}

##

# # The Wwid line in thefollowing blacklist sections is shown as an example

# # of how to Blacklistdevices by Wwid. The 2 devnode lines arethe

# # compiled in Defaultblacklist. If you want to blacklist entire types

# of devices, such as ALLSCSI devices, you should use a devnode line.

# # However, if you want toblacklist specific devices, your should use

# # a Wwid line. Since there is no guarantee that a specificdevice would

# names on reboot (FROM/DEV/SDA To/dev/sdb for example)

# # Devnode Lines is notrecommended for blacklisting specific devices.

##

#blacklist {

# Wwid 26353900f02796769

# devnode "^ (ram|raw|loop|fd|md|dm-|sr|scd|st) [0-9]*"

# devnode "^hd[a-z]"

#}

#multipaths {

# multipath {

# Wwid 3600508b4000156d700012000000b0000

# alias Yellow

# Path_grouping_policy Multibus

# Path_checker Readsector0

# path_selector "Round-robin0"

# failback Manual

# Rr_weight Priorities

# no_path_retry 5

#      }

# multipath {

# Wwid 1dec_____321816758474

# alias Red

#      }

#}

#devices {

# device {

# Vendor "COMPAQ"

# product "HSV110 (C) COMPAQ"

# Path_grouping_policy Multibus

# getuid_callout "/lib/udev/scsi_id--whitelisted--device=/dev/%n"

# Path_checker Readsector0

# path_selector "Round-robin0"

# hardware_handler "0"

# failback 15

# Rr_weight Priorities

# no_path_retry Queue

#      }

# device {

# Vendor "COMPAQ"

# product "MSA1000"

# Path_grouping_policy Multibus

#      }

#}

Blacklist {

Devnode "^ (ram|raw|loop|fd|md|dm-|sr|sr|scd|st) [0-9]*"

Devnode "^hd[a-z]"

}

devices {

Device {

Vendor "Netapp"

Path_grouping_policymultibus

Features "1queue_if_no_path"

Path_checkerreadsector ()

failback Immediate

}

}

5 Starting the Service

[[email protected] ~]#/ETC/INIT.D/MULTIPATHD start

6 Delete existing unused paths

[Email protected] ~]# multipath–f

7 formatting paths, detecting paths, merging paths

[Email protected] ~]# Multipath-v2

8 Viewing multipath states

[Email protected] ~]# Multipath–ll

9 Rebooting the system

[email protected] ~]# reboot

10 Create a PV multi-block disk,

[[email protected] ~]# Pvcreate/dev/mapper/mpath{d,f,e,p,t,k,j,c,s,q}

11 adding multiple disks to Volbackup

[[Email protected]~]# vgcreatevolbackup/dev/mapper/mpath{d,f,e,p,t,k,j,c,s,q}

12 Creating the LV

[Email protected] ~]# lvcreate-l 1310780-n LogVol01 volbackup

13 Formatting of the LV

[[Email protected] ~] Mkfs.ext4/dev/volbackup/logvol01

14 Mounting

[Email protected] ~]# Mount/dev/volbackup/logvol01/backup

15faq15.1 module has not been loaded successfully

If the module does not load successfully use the following to initialize the DM, or restart the system

---use thefollowing commands to initialize and start DM for the first time:

# Modprobedm-multipath

# modprobe Dm-round-robin

# SERVICEMULTIPATHD Start

# MULTIPATH–V2

Introduction of 15.2 multipath principle

1, Device-mapper-multipath: that is multipath-tools. Mainly provide MULTIPATHD and multipath tools and multipath.conf and other configuration files. These tools create and configure multipath devices through the Ioctr interface of the device mapper (call the Device-mapper User space Library. The multipath device that is created is in/dev/mapper).

2, Device-mapper: Mainly includes two parts: kernel part and user part. The kernel is mainly composed of the device mapper core (Dm.ko) and some target driver (Md-multipath.ko). The core completes the mapping of the device, and target handles the I/O from the mappered device, based on the mapping relationship and its own characteristics. At the same time, in the core section, provides an interface, the user through the ioctr can communicate with the kernel, to guide the kernel-driven behavior, such as how to create mappered device, these divece properties and so on. The user space portion of the Linux device Mapper mainly includes the Device-mapper package. These include the Dmsetup tool and some libraries that help you create and configure mappered device. These libraries are primarily abstract and encapsulate interfaces to ioctr communication to facilitate the creation and configuration of mappered device. These libraries need to be called in the Multipath-tool program.

3, Dm-multipath.ko and Dm.ko:dm.ko are devicemapper drivers. It is the foundation of realizing Multipath. Dm-multipath is actually a target driver for DM.

4. SCSI_ID: Included in the Udev package, you can configure the program in multipath.conf to get the serial number of the SCSI device. By ordinal, you can tell that multiple paths correspond to the same device. This is the key to multi-path implementation. SCSI_ID is to query the identity of the SCSI device by sending the inquery command EVPD page80 or page83 to the device via the SG driver. However, some devices do not support EVPD's inquery commands, so they cannot be used to generate multipath devices. However, scsi_id can be rewritten to provide a virtual identifier for a device that cannot supply a SCSI device identity and output to standard output. When the Multipath program creates the Multipath device, it calls SCSI_ID and obtains the SCSI ID of the device from its standard output. When overwriting, the return value of the SCSI_ID program needs to be modified to 0. Because in the Multipath program, the straight is checked to determine if the SCSI ID has been successfully obtained.


This article is from the "Lose" blog, make sure to keep this source http://blove.blog.51cto.com/3116850/1632364

RHEL5 Multi-Path configuration

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.