RH436 UNIT 4 MULTIPATHING

Introduction

Unit Goal

        Describe multipathing

        Configure dm-multipath

Unit Sections

        What is Multipathing?

        Configuring Multipathing

        Testing Multipathing

Hands-On Activities

        Configure Multipathing

        Testing Multipathing

Unit Test

        Configuring Multipathing

What is Multipathing?

        所谓多路径是实现在服务器与磁盘阵列之间配置多条物理连接。多路径的优点有二,其一是在一条路径瘫痪时不会影响连通性,另外可以改善对存储的读写性能。

        如下图,服务器有两个HBA,都是独立连接到光纤交换机,每一条连接都连接着磁盘阵列上独立的控制器上。

        Red Hat Enterprise Linux 6 支持使用dm-multipath,这种方式是使用kernel磁盘映射生成一个虚拟的磁盘设备。通过multipathd的进程和multipath命令进行管理。

        必要的binaries,daemons,and kernel modules可以再device-mapper-multipath 包中找到。

        安装device-mapper-multipath软件包,配置并启动后,会创建/dev/mapper,多路径的SYMLINK会被创建在其中,名称可以为mpatchN[pM],或者使用WWID,管理员也可以自定义多路径设备的名称。

Important

        多路径只是提供接入的冗余,防护连接出现断开。如果存储本身出现问题,即使配置多路径还是无法访问存储。

        通过配置文件创建不同的路径连接存储,这些Path会被整合到不同的组中,当一个组为fails状态的时候会跳到另外一个组保证可以正常访问存储。

What is multipathing?

1. Multipathing can provide..    A,B

a. Redundancy in storage access

b. Increased performance

c. Storage redundancy

d. RAID

2. The package that provides multipathing capabilities is called..   C

a. dm-multipath

b. dm-multipathd

c. divice-mapper-multipath

d. multipathd

3. Devices nodes for multipathed storage are normally created under..   C

a. /dev/

b. /dev/multipath/

c. /dev/mapper/

d. /dev/dm-multipath

Configuring Multipathing

        配置多路径之前先确保device-mapper-multipath package已安装。

        配置两个网卡作为多路径的访问路径。

eth1      Link encap:Ethernet  HWaddr 00:0C:29:B3:DE:A4            inet addr:172.16.1.4  Bcast:172.16.1.255  Mask:255.255.255.0          inet6 addr: fe80::20c:29ff:feb3:dea4/64 Scope:Link          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1          RX packets:28 errors:0 dropped:0 overruns:0 frame:0          TX packets:16 errors:0 dropped:0 overruns:0 carrier:0          collisions:0 txqueuelen:1000          RX bytes:1756 (1.7 KiB)  TX bytes:1000 (1000.0 b)

eth2      Link encap:Ethernet  HWaddr 00:0C:29:B3:DE:AE            inet addr:172.16.2.4  Bcast:172.16.2.255  Mask:255.255.255.0          inet6 addr: fe80::20c:29ff:feb3:deae/64 Scope:Link          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1          RX packets:13 errors:0 dropped:0 overruns:0 frame:0          TX packets:24 errors:0 dropped:0 overruns:0 carrier:0          collisions:0 txqueuelen:1000          RX bytes:780 (780.0 b)  TX bytes:1440 (1.4 KiB)

        安装完device-mapper-multipath 软件包之后开始配置multipath的配置文件,最简单的方式是使用mpathconf工具进行配置。

        如果已经/etc/multipath.conf已经存在,那么可以直接使用mpathconf进行配置,如果不存在,可以再/usr/share/doc/device-mapper-multipath-*下面找到multipath.conf的模板。也可以通过mpathconf命令创建默认模板。

        创建默认配置,启动和激活multipathd进程,可以使用以下命令。

mpathconf –enable –with_multipathd y –with_chkconfig y

–enable        Removes any line that blacklists all device nodes from the /etc/multipath.conf blacklist section.

我诚恳地希望能够获得你的原谅。只是你懂得的,对于有一些委屈,

RH436 UNIT 4 MULTIPATHING

相关文章:

你感兴趣的文章:

标签云: