美文网首页城市故事想法成长励志
IPSAN(四)IPSAN多路径设置(服务端)

IPSAN(四)IPSAN多路径设置(服务端)

作者: zhangxiaohao | 来源:发表于2019-06-11 05:44 被阅读0次
    前言

    单点故障在生产环境中是不被允许,容灾性无从谈起。所以ipsan需要多链路共享。

    环境说明
    名称 ip地址1 ip地址2
    服务器 192.168.22.241/24 192.168.23.241/24
    客户端 192.168.22.251/24 192.168.23.251/24

    说明:
    ipsan服务器配置磁盘共享,将本机的/dev/sdb1共享。
    客户端可能通过访问192.168.22.241:3260 、 192.168.23.241:3260 这两个地址访问共享磁盘。
    共享设备iqn名称:iqn.2019-06.com.test:storage
    客户端iqn名称:iqn.2019-06.com.test:client1

    准备环境:

    1.配置网络

    • 服务器网络(双网卡)
    nmcli con add con-name eth0 ifname ens33 type 802-3-ethernet ipv4.method manual ipv4.add 192.168.22.241/24
    nmcli con add con-name eth1 ifname ens37 type 802-3-ethernet ipv4.method manual ipv4 add 192.168.23.241/24
    systemctl restart network
    
    • 客户端网络设置(双网卡)
    nmcli con add con-name eth0 ifname ens33 type 802-3-ethernet ipv4.method manual ipv4.add 192.168.22.251/24
    nmcli con add con-name eth1 ifname ens37 type 802-3-ethernet ipv4.method manual ipv4 add 192.168.23.251/24
    systemctl restart network
    

    注:如果没有网络设置软件,用yum -y install net-tool安装

    • 交换机
      可以设置在一个交换机上两路网段链结。
      可以设置双交换机。
    1. ipsan服务器设置共享
    fdisk /dev/sdb #设置分区
    > n
    > p
    > 1
    > w
    
    1. 安装服务端
    yum -y install targetcli
    systemctl enable target;systemctl start target
    systemctl status target
    

    5.通过targetcli配置共享

    targetcli
    /> /backstores/block create block1 /dev/sdb1
    />/iscsi create iqn.2019-06.com.test:storage#设置IQN共享名称
    />/iscsi/iqn.2019-06.com.test:storage/tpg1/acls create iqn.2019-06.com.test:client1#设置访问IQN共享的设备名称
    />/iscsi/iqn.2019-06.com.test:storage/tpg1/luns create  blockstores/block/block1#设置关联
    #设置IPSAN客户端访问地址及端口
    />/iscsi/iqn.2019-06.com.test:storage/tpg1/portals   delete 0.0.0.0:3260
    />/iscsi/iqn.2019-06.com.test:storage/tpg1/portals create 192.168.22.241 3260
    />/iscsi/iqn.2019-06.com.test:storage/tpg1/portals create 192.168.23.241 3260
    

    相关文章

      网友评论

        本文标题:IPSAN(四)IPSAN多路径设置(服务端)

        本文链接:https://www.haomeiwen.com/subject/tpyqxctx.html