redhat6.2多路冗余multipath

简介:

                            Redhat6 多路冗余multipath

拓扑


                         ++++++++++++++

                         +     Server   +

                         ++++++++++++++

        eth0: 192.168.122.10/24      |     eth1: 172.16.1.1/24

                                           ___________________|____________________

                                     |                                                            

                                                                                          ++++++++++++                   ++++++++++++

             +    virbr0           +             virbr1        

               ++++++++++++                   ++++++++++++

             |_______________________________________|

                                                                      |

              eth0: 192.168.122.20/24   |     eth1:172.16.1.2/24

                               ++++++++++++

                               +  ISCSI Storage

                                +   /dev/sdb1

                                ++++++++++++        



配置 ISCSI Storage

# yum install scsi-target-utils

# vim /etc/tgt/targets.conf

<targetiqn.2013-08.com.uplooking:server.target1>

  backing-store /dev/vg001/lv001

  initiator-address 192.168.122.10

  initiator-address 172.16.1.1

</target>



# service tgtd restart



配置 Server

# yum install iscsi-initiator-utils

# service iscsi start

# iscsiadm -m discovery -t sendtargets -p192.168.122.20:3260

# iscsiadm -m discovery -t sendtargets -p172.16.1.2:3260

# iscsiadm -m node -Tiqn.2013-08.com.uplooking:server.target1 -l



虽然login设备一次,但是fdisk查看可以看到新增了2个设备sdbsdc,而sdbsdc又是同一个ISCSI设备

# fdisk -l

Disk /dev/sda: 21.4 GB, 21474836480 bytes

255 heads, 63 sectors/track, 2610 cylinders

Units = cylinders of 16065 * 512 = 8225280bytes

Device           Boot                    Start              End               Blocks            IdSystem

/dev/sda1 *                         1                   13                  104391           83Linux

/dev/sda2                             14                  2610              20860402+    8eLinux LVM



Disk /dev/sdb: 21.4 GB, 21474836480 bytes

255 heads, 63 sectors/track, 2610 cylinders

Units = cylinders of 16065 * 512 = 8225280bytes


Disk /dev/sdc: 21.4 GB, 21474836480 bytes

255 heads, 63 sectors/track, 2610 cylinders

Units = cylinders of 16065 * 512 = 8225280bytes




# yum install device-mapper-multipath


# mpathconf

multipath is enabled

find_multipaths is disabled

user_friendly_names is enabled

dm_multipath module is not loaded

multipathd is chkconfiged off



# mpathconf --help

usage: /sbin/mpathconf <command>


Commands:

Enable: --enable

Disable: --disable

Set user_friendly_names (Default n):--user_friendly_names <y|n>

Set find_multipaths (Default n):--find_multipaths <y|n>

Load the dm-multipath modules on enable(Default y): --with_module <y|n>

start/stop/reload multipathd (Default n):--with_multipathd <y|n>

chkconfig on/off multipathd (Default y):--with_chkconfig <y|n>


# mpathconf --user_friendly_names y--find_multipaths y --with_multipathd y --with_chkconfig y


# mpathconf

multipath is enabled

find_multipaths is enabled

user_friendly_names is enabled

dm_multipath module is not loaded

multipathd is chkconfiged off



# service multipathd start

Starting multipathd daemon:                                [  OK  ]

# mpathconf

multipath is enabled

find_multipaths is enabled

user_friendly_names is enabled

dm_multipath module is loaded

multipathd is chkconfiged off



# ll /dev/mapper/mpatha

lrwxrwxrwx. 1 root root 7 Aug 27 14:54/dev/mapper/mpatha -> ../dm-6


# multipath -ll

mpatha (1IET     00010001) dm-6 IET,VIRTUAL-DISK

size=2.0G features='0' hwhandler='0' wp=rw

|-+- policy='round-robin 0' prio=1status=active

| `- 2:0:0:1 sdb 8:16  active ready running

`-+- policy='round-robin 0' prio=1status=enabled

 `-3:0:0:1 sdc 8:32  active ready running



# dmsetup table

mpatha: 0 4194304 multipath 0 0 2 1round-robin 0 1 1 8:16 1 round-robin 0 1 1 8:32 1                      




      本文转自潘阔 51CTO博客,原文链接:http://blog.51cto.com/pankuo/1393684,如需转载请自行联系原作者




相关文章
|
存储 Linux
Linux 配置 multipath 多路径
通常 Linux 主机挂载存储盘时,每次重启后对应的 /dev/sd* 都会变,而且不好辨识! 这时可以通过 multipath 多路径来绑定磁盘!
|
1月前
|
存储 缓存 Linux
BTRFS- Multiple Device Support(多重设备支持)
BTRFS- Multiple Device Support(多重设备支持)
17 2
Win系统 - 压缩包part1与part2之间的关系
Win系统 - 压缩包part1与part2之间的关系
422 0
|
存储 应用服务中间件 开发工具
部署iscsi和multipath
对接存储需要使用iscsi和multipath
|
存储 Linux 负载均衡