#
##EMC多路径安装配置流程
#实验环境:Linux4.5连接EMC CX4-120存储
(1) 安装EMC多路径rpm包:
# rpm -ivh EMCpower.LINUX-5.3.1.02.00-007.rhel.i386.rpm
(2) 开始安装,并输入注册码:
#emcpreg -install
(3) 启动powermt:
/etc/init.d/PowerPath start
(4) 验证是否成功:
powermt display dev=all
(5) 检查/dev/发现步骤(4)生成的设备。
至此完成配置。
【注:也可使用Linux自带的多路径包,见下文】
#
##Linux下多路径软件multipath安装流程
#实验环境:Linux5.5下连接IBM DS8700存储
>>STEP 1: 查看是否已安装multipath包,使用multipath前需先安装相应版本的包:
# rpm -qa |grep device
device-mapper-1.02.17-3.el4
device-mapper-1.01.01-1.RHEL4
device-mapper-multipath-0.4.5-42.el4
>>STEP 2:编辑多路径配置文件 /etc/multipath.conf,rhel6等没有,则执行mpathconf --enable生成:
注释掉以下几行,即取消默认的所有设备为黑名单,如:
# Blacklist all devices by default. Remove this to enable multipathing
# on the default devices.
#devnode_blacklist {
# devnode "*"
#}
如果上述蓝色字体部分没有被注销,多路径软件无法正常使用,在/dev/mapper/下找不到相应存储。
>>STEP 3:加载并设置多路径模块
# modprobe dm_multipath
# service multipathd restart
# modprobe dm_multipath //加载多路径模块
# lsmod |grep multipath //查看多路径模块是否已加载
# chkconfig multipathd on //设为开机启动
# multipath –F //使配置生效
# multipath –ll //输出多路径的设备路径
# service multipathd restart
至此多路径配好的设备已经可以使用了,此时在/dev/mapper/*下可以看到配置好的块设备:
[root@crmgj2 mapper]# ll
total 0
crw------- 1 root root 10, 63 Apr 11 23:57 control
brw-rw---- 1 root disk 253, 17 Apr 12 10:41 mpath10
brw-rw---- 1 root disk 253, 30 Apr 12 10:41 mpath10p1
……
brw-rw---- 1 root disk 253, 18 Apr 12 10:41 mpath11
brw-rw---- 1 root disk 253, 27 Apr 12 10:41 mpath11p1
>>STEP 4:为设备wwid加别名
在我们通过multipath –ll命令查看设备时,会看到如下内容
#multipath -ll
mpath2 (3600507630bffc16d0000000000003705) dm-9 IBM,2107900
[size=150G][features=1 queue_if_no_path][hwhandler=0][rw]
\_ round-robin 0 [prio=2][active]
\_ 3:0:0:1 sdc 8:32 [active][ready]
\_ 4:0:0:1 sdo 8:224 [active][ready]
……
mpath12 (3600507630bffc16d0000000000004205) dm-19 IBM,2107900
[size=1.0G][features=1 queue_if_no_path][hwhandler=0][rw]
\_ round-robin 0 [prio=2][active]
\_ 3:0:0:11 sdm 8:192 [active][ready]
\_ 4:0:0:11 sdy 65:128 [active][ready]
采用系统自己命名的设备名(蓝色字体部分)不便于阅读,我们需要把它改成便于阅读的内容使之观其名知其意,如asm01。
此时就需要修改multipath的配置文件/etc/multipath.conf,在文件中添加别名,如:
# Here a LUN from IBM storage with wwid 3600507630efffe32000000000000120a
# is given an alias of "IBM-1750" and will appear as "IBM-1750
#(3600507630efffe32000000000000120a)", when "multipath -l(l)" is invoked.
#
#
#multipaths {
# multipath {
# wwid 3600507630efffe32000000000000120a
# alias IBM-1750
# }
#}
multipaths {
multipath {
wwid 3600507630bffc16d0000000000003205
alias ocr01
}
……
multipath {
wwid 3600507630bffc16d0000000000003e05
alias asm07
}
}
此时通过multipath –ll命令即可看到更改过的别名。在/dev/mapper/*中也可以看到修改过别名的设备在该路径下出现,作为设备名方便系统维护使用。
#
##卸载Linux自带multipath流程
#
1. Take a copy of /etc/multipath.conf
cp /etc/multipath.conf /etc/multipath.conf_20080710
2. root user: Edit /etc/multipath.conf file and commentout all the entries in the file as root user
3. root user: Make sure the below entry in the multipath.conf file
blocklist {
devnode “*”
}
4. Take out the output of below command
sudo multipath -ll > /tmp/mpio_nodename.lst
5. disbale multipath process by using following command as root user.
# dmsetup ls — displays all the device mapper
# /etc/init.d/multipathd stop
# /sbin/chkconfig multipathd off
# /sbin/dmsetup remove_all
# /sbin/rpm -e `rpm -qa | grep multipath`
6. Reboot the server
E.O.F
2012-04-14
mpathconf --enable
kpartx -a /dev/mapper/sdarch
cat /var/lib/multipath/bindings
mpath0 36005076040a255081d2023a31354c5f4
mpath1 3600507630086078d7000000000000004
mpath2 3600507630086078d7000000000000005
mpath3 3600507630086078d7000000000000006
multipath -F 清除已有multipath记录
multipath -v2 重新扫描生成块设备
##EMC多路径安装配置流程
#实验环境:Linux4.5连接EMC CX4-120存储
(1) 安装EMC多路径rpm包:
# rpm -ivh EMCpower.LINUX-5.3.1.02.00-007.rhel.i386.rpm
(2) 开始安装,并输入注册码:
#emcpreg -install
(3) 启动powermt:
/etc/init.d/PowerPath start
(4) 验证是否成功:
powermt display dev=all
(5) 检查/dev/发现步骤(4)生成的设备。
至此完成配置。
【注:也可使用Linux自带的多路径包,见下文】
#
##Linux下多路径软件multipath安装流程
#实验环境:Linux5.5下连接IBM DS8700存储
>>STEP 1: 查看是否已安装multipath包,使用multipath前需先安装相应版本的包:
# rpm -qa |grep device
device-mapper-1.02.17-3.el4
device-mapper-1.01.01-1.RHEL4
device-mapper-multipath-0.4.5-42.el4
>>STEP 2:编辑多路径配置文件 /etc/multipath.conf,rhel6等没有,则执行mpathconf --enable生成:
注释掉以下几行,即取消默认的所有设备为黑名单,如:
# Blacklist all devices by default. Remove this to enable multipathing
# on the default devices.
#devnode_blacklist {
# devnode "*"
#}
如果上述蓝色字体部分没有被注销,多路径软件无法正常使用,在/dev/mapper/下找不到相应存储。
>>STEP 3:加载并设置多路径模块
# modprobe dm_multipath
# service multipathd restart
# modprobe dm_multipath //加载多路径模块
# lsmod |grep multipath //查看多路径模块是否已加载
# chkconfig multipathd on //设为开机启动
# multipath –F //使配置生效
# multipath –ll //输出多路径的设备路径
# service multipathd restart
至此多路径配好的设备已经可以使用了,此时在/dev/mapper/*下可以看到配置好的块设备:
[root@crmgj2 mapper]# ll
total 0
crw------- 1 root root 10, 63 Apr 11 23:57 control
brw-rw---- 1 root disk 253, 17 Apr 12 10:41 mpath10
brw-rw---- 1 root disk 253, 30 Apr 12 10:41 mpath10p1
……
brw-rw---- 1 root disk 253, 18 Apr 12 10:41 mpath11
brw-rw---- 1 root disk 253, 27 Apr 12 10:41 mpath11p1
>>STEP 4:为设备wwid加别名
在我们通过multipath –ll命令查看设备时,会看到如下内容
#multipath -ll
mpath2 (3600507630bffc16d0000000000003705) dm-9 IBM,2107900
[size=150G][features=1 queue_if_no_path][hwhandler=0][rw]
\_ round-robin 0 [prio=2][active]
\_ 3:0:0:1 sdc 8:32 [active][ready]
\_ 4:0:0:1 sdo 8:224 [active][ready]
……
mpath12 (3600507630bffc16d0000000000004205) dm-19 IBM,2107900
[size=1.0G][features=1 queue_if_no_path][hwhandler=0][rw]
\_ round-robin 0 [prio=2][active]
\_ 3:0:0:11 sdm 8:192 [active][ready]
\_ 4:0:0:11 sdy 65:128 [active][ready]
采用系统自己命名的设备名(蓝色字体部分)不便于阅读,我们需要把它改成便于阅读的内容使之观其名知其意,如asm01。
此时就需要修改multipath的配置文件/etc/multipath.conf,在文件中添加别名,如:
# Here a LUN from IBM storage with wwid 3600507630efffe32000000000000120a
# is given an alias of "IBM-1750" and will appear as "IBM-1750
#(3600507630efffe32000000000000120a)", when "multipath -l(l)" is invoked.
#
#
#multipaths {
# multipath {
# wwid 3600507630efffe32000000000000120a
# alias IBM-1750
# }
#}
multipaths {
multipath {
wwid 3600507630bffc16d0000000000003205
alias ocr01
}
……
multipath {
wwid 3600507630bffc16d0000000000003e05
alias asm07
}
}
此时通过multipath –ll命令即可看到更改过的别名。在/dev/mapper/*中也可以看到修改过别名的设备在该路径下出现,作为设备名方便系统维护使用。
#
##卸载Linux自带multipath流程
#
1. Take a copy of /etc/multipath.conf
cp /etc/multipath.conf /etc/multipath.conf_20080710
2. root user: Edit /etc/multipath.conf file and commentout all the entries in the file as root user
3. root user: Make sure the below entry in the multipath.conf file
blocklist {
devnode “*”
}
4. Take out the output of below command
sudo multipath -ll > /tmp/mpio_nodename.lst
5. disbale multipath process by using following command as root user.
# dmsetup ls — displays all the device mapper
# /etc/init.d/multipathd stop
# /sbin/chkconfig multipathd off
# /sbin/dmsetup remove_all
# /sbin/rpm -e `rpm -qa | grep multipath`
6. Reboot the server
E.O.F
2012-04-14
mpathconf --enable
kpartx -a /dev/mapper/sdarch
cat /var/lib/multipath/bindings
mpath0 36005076040a255081d2023a31354c5f4
mpath1 3600507630086078d7000000000000004
mpath2 3600507630086078d7000000000000005
mpath3 3600507630086078d7000000000000006
multipath -F 清除已有multipath记录
multipath -v2 重新扫描生成块设备