Linux_Multipath配置

Linux_Multipath配置

分步阅读

Multipath简称为多路径访问,主要功能就是和存储设备一起配合实现三大功能: 1. 故障的切换和恢复 2. IO流量的负载均衡 3. 磁盘的虚拟化

工具/原料

  • CentOS6.9

  • 存储设备

方法/步骤

  1. 1

    查看磁盘是否映射成功

    [root@Server3 ~]# fdisk -l

    映射成功,两块磁盘

    Linux_Multipath配置

  2. 2

    Multipath安装   yum -y install device-mapper-mul*

  3. service multipathd restart

  4. chkconfig multipathd on

  5. 执行mpathconf –enable 在/etc下生成配置文件

    [root@Server3 ~]# mpathconf --enable

    Linux_Multipath配置

  6. 3

    查看multipath.conf配置文件中的语句是否注释掉

    [root@Server3 ~]# vim /etc/multipath.conf

    Linux_Multipath配置

    Linux_Multipath配置

  7. 4

    启动multipathd服务

    [root@Server3 ~]# service multipathd start

    Starting multipathd daemon:                                [  OK  ]

    [root@Server3 ~]# multipath -ll

    mpathb (360003ff54bbdf1838209b1807716e5db) dm-0 MSFT,Virtual HD

    size=9.8G features='0' hwhandler='0' wp=rw

    |-+- policy='round-robin 0' prio=1 status=active

    | `- 3:0:0:0 sdb 8:16 active ready running

    `-+- policy='round-robin 0' prio=1 status=enabled

      `- 2:0:0:0 sdc 8:32 active ready running

    Linux_Multipath配置

  8. 5

    再来一次 mkfs.ext4 /dev/mapper/1tb /back

    [root@Server3 ~]# fdisk -l

    发现聚会后的磁盘

    Linux_Multipath配置

  9. 6

    确保multipath daemon开机自动启动

    [root@redhat1 ~]# chkconfig --list multipathd

    [root@redhat1 ~]# chkconfig multipathd on

    [root@redhat1 ~]# chkconfig --list multipathd

  10.  

    multipath -ll

    注意!有些做完了,重启以后发现磁盘没有了;那因为你没有设置为开机自动启动
  11. 7

    Linux_Multipath的配置,全部完成;

    END

注意事项

  • Multipath配置,希望大家要搞懂原理

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值