首页 > 代码库 > linux多路径使用

linux多路径使用

1.编辑配置文件/etc/multipath.conf

multipaths {        multipath {                wwid "36005076300800000000000001a"                                alias disk1        }                multipath {                wwid "36005076300800000000000001b"                                alias disk2        }        multipath {                wwid "36005076300800000000000001c"                                alias disk3        }        multipath {                wwid "36005076300800000000000001d"                                alias disk4        }}

2.启动multipathd服务,及设置其自动启动

service multipathd restartchkconfig --level 345 multipathd onchkconfig --list | grep multipathd

3.查看设置

multipath -ll

4.重启机器后,查看软连接

[root@rac1 mpath]# lltotal 0lrwxrwxrwx 1 root root 7 Dec 13 09:39 disk1 -> ../dm-0lrwxrwxrwx 1 root root 7 Dec 13 09:39 disk2 -> ../dm-1lrwxrwxrwx 1 root root 7 Dec 13 09:39 disk3 -> ../dm-3lrwxrwxrwx 1 root root 7 Dec 13 09:39 disk4 -> ../dm-2

 

linux多路径使用