redhat multipath多路径 DM

来源:互联网 发布:人工智能英文音标 编辑:程序博客网 时间:2024/05/20 19:33

 几个比较有用的命令
 
1.start/stop multipathd process "service multipathd start/stop"
2.display the multipath topology "multipath -ll" //非常有用的命令。
3.display the multipath debug info "multipath -v3"
4.Scan the HD "fdisk -l"
5.view the FC wwn " cat /sys/class/fc_host/host1/node_name "
下面是举例:
 multipath -ll

 

1、 查看是否安装# rpm –qa | grep device
device-mapper-1.02.07-4.0
device-mapper-multipath-0.4.5-16.1
device-mapper-1.02.07-4.0

2、 配置文件只有一个:/etc/multipath.conf 。

配置前,请用fdisk -l 确认已可正确识别盘柜的所有LUN

  redhat  多路径软件:device-mapper-multipath.

多路径配置文件:/etc/multipath.conf

编辑注释掉以下几行:

blacklist {

             devnode "*"

}

 

修改后如下

#blacklist {

 #            devnode "*"

#}

默认将所有设备加入黑名单。

3、.执行命令

modprobe dm-multipath  //加载多路径模块

lsmod |grep dm-multipath //查看是否加载多路径模块

/etc/init.d/multipathd restart // 重新启动多路径服务,监视路径,当路径损坏时进行路径切换。

chkconfig multipathd on //随机启动

multipath -v2 或 multipath -ll  //输出多路径的设备的路径。如果没有出现路径,可以使用multipath -F 刷新

multipaht -F   使更新之后的配置生效

备注:kpartx command:为设备中的分区生成设备映射器设备。这个命令对于DM-MP分区DOS是很有用的。device-mapper-multipath需要它。

multipath -k 进入互动模式,对于故障排除很有帮助

4、  Check multipath command.                              

# multipath –ll

 

 

II. Disable multipath(卸载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

0 0