系统相关
首页 > 系统相关> > centos7.3 multipath安装使用

centos7.3 multipath安装使用

作者:互联网

安装

yum install device-mapper-multipath

设置开机启动

systemctl enable multipathd.service

添加配置文件

需要multipath正常工作只需要如下配置即可,如果想要了解详细的配置,请参考Multipath

# vi /etc/multipath.conf
blacklist {
    devnode "^sda"
}
defaults {
    user_friendly_names yes
    path_grouping_policy multibus
    failback immediate
    no_path_retry fail
}

启动服务

systemctl start multipathd.service

查看服务

# multipath -ll
mpatha (360000000000000000e00000000010001) dm-2 IET     ,VIRTUAL-DISK
size=30G features='0' hwhandler='0' wp=rw
`-+- policy='service-time 0' prio=1 status=active
  |- 3:0:0:1 sdd 8:48 active ready running
  `- 4:0:0:1 sde 8:64 active ready running

此时,执行lsblk命令就可以看到多路径磁盘mpatha了:

# lsblk
NAME            MAJ:MIN RM  SIZE RO TYPE  MOUNTPOINT
sda               8:0    0   20G  0 disk
├─sda1            8:1    0  500M  0 part  /boot
└─sda2            8:2    0 19.5G  0 part
  ├─centos-root 253:0    0 17.5G  0 lvm   /
  └─centos-swap 253:1    0    2G  0 lvm   [SWAP]
sdb               8:16   0   30G  0 disk
sdc               8:32   0   30G  0 disk
sdd               8:48   0   30G  0 disk
└─mpatha        253:2    0   30G  0 mpath
sde               8:64   0   30G  0 disk
└─mpatha        253:2    0   30G  0 mpath
sr0              11:0    1  603M  0 rom

接下来,就可以对mpatha做分区、格式化和创建逻辑卷等各种磁盘操作了,此处不表。

标签:multipath,service,mpatha,disk,253,centos7.3,安装,30G
来源: https://www.cnblogs.com/longchang/p/11777503.html