Linux下配置多路径软件(openfiler模拟共享盘)

1.安装rpm
device-mapper-1.02.79-8.el6.x86_64.rpm
device-mapper-event-1.02.79-8.el6.x86_64.rpm
device-mapper-multipath-0.4.9-72.el6.x86_64.rpm


rpm -ivh device-mapper-multipath-libs-0.4.9-72.el6.x86_64.rpm
 rpm -ivh device-mapper-1.02.79-8.el6.x86_64.rpm
rpm -ivh device-mapper-event-1.02.79-8.el6.x86_64.rpm
 rpm -ivh device-mapper-multipath-libs-0.4.9-72.el6.x86_64.rpm
rpm -ivh device-mapper-multipath-0.4.9-72.el6.x86_64.rpm
2.设置开机启动,并检查安装包是否正常
[root@lmsin ~]# chkconfig multipathd on
[root@lmsin ~]# service multipathd start
Starting multipathd daemon:                                [  OK  ]
[root@lmsin ~]# lsmod | grep dm_multipath
dm_multipath           17724  0
dm_mod                 84209  18 dm_multipath,dm_mirror,dm_log


3.配置multipath使其正常工作,编辑/etc/multipath.conf,开放如下内容:
[root@lmsin ~]# find / -name multipath.conf
/usr/share/doc/device-mapper-multipath-0.4.9/multipath.conf
[root@lmsin ~]# cp /usr/share/doc/device-mapper-multipath-0.4.9/multipath.conf /etc/
vi /etc/multipath.conf

defaults {
        user_friendly_names yes
}
blacklist {
        devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st|sda)[0-9]*"
        devnode "^hd[a-z]"
}

4.完成之后执行如下命令发现多路径
multipath -v2  
[root@lmrac2 Packages]#  modprobe dm-multipath
[root@lmrac2 Packages]#  multipath -F
[root@lmrac2 Packages]# multipath dm-multipath
[root@lmrac2 Packages]# multipath dm-round-robin
[root@lmrac2 Packages]#  service multipathd restart
ok
Stopping multipathd daemon: [  OK  ]
Starting multipathd daemon: [  OK  ]
[root@lmrac2 Packages]# multipath -v2
[root@lmrac2 Packages]# multipath -ll


[root@lmrac1 ~]# ll /dev/mapper/*
crw-rw---- 1 root root 10, 58 Sep 19 12:14 /dev/mapper/control
lrwxrwxrwx 1 root root      7 Sep 19 12:14 /dev/mapper/mpatha -> ../dm-3
lrwxrwxrwx 1 root root      7 Sep 19 12:14 /dev/mapper/mpathb -> ../dm-2
lrwxrwxrwx 1 root root      7 Sep 19 12:14 /dev/mapper/mpathc -> ../dm-5
lrwxrwxrwx 1 root root      7 Sep 19 12:14 /dev/mapper/mpathd -> ../dm-4
lrwxrwxrwx 1 root root      7 Sep 19 12:14 /dev/mapper/mpathe -> ../dm-6

你可能感兴趣的:(openfiler,多路径)