存储实验:FC-SAN实验与光交配置(GUI&CLI)

15 篇文章 2 订阅
11 篇文章 0 订阅

目的

完成FC-SAN的存储实验

环境介绍

拓扑

在这里插入图片描述

环境规划

设备IP用户/密码备注
存储设备172.1.0.41yutianedu/Huawei@123作为存储提供LUN应用
VMware vSphere172.1.0.130fcsan@storage.com/ Huawei@123FCSAN的使用虚机和光交GUI配置跳板机均为vSphere的虚拟机
VMware_server2008(web的配置机器)172.117.0.0/16(自行规划)Administrator/Huawei@123用于连接光交,完成GUI配置
VMware_linux(业务主机)172.117.0.0/16(自行规划)root/redhat使用FC-SAN的业务主机,与光交互联,最终验证LUN是否在该主机可用
光交1172.1.0.71admin/password级联的光交,完成2台中1台配置即可
光交2172.1.0.72admin/password联的光交,完成2台中1台配置即可

在这里插入图片描述

环境解释

  1. 存储的A控P2和B控的P2连接在光交1;A控P3和B控的P3连接在光交2
  2. 光交1和2分别有一根线连到vsphere中的业务主机linux中,因此linux有两个fc_host
  3. 对光交配置alias、zone、zone_config,使得存储上能自动发现linux的wwn号
    • zone按照最小端口划分原则,ZONE1(服务器A,A_P2),ZONE2(服务器A,B_P2),ZONE3(服务器B,A_P3),ZONE4(服务器B,B_P3)
  4. 进行测试

实验流程

0. FC-SAN存储 WWN查看

下图为存储的WWN和接口连接情况

控制器-端口编号
A控-P220029c37f4814c0e
A控-P320039c37f4814c0e
B控-P220129c37f4814c0e
B控-P320139c37f4814c0e

在这里插入图片描述
在这里插入图片描述

1. FC-SAN业务主机(linux)配置

1.1 IP配置

ip配置用于测试时传输多路径软件,实际使用FC-SAN无需IP的参与
172.117.0.0/16与存放多路径软件和yum仓库所在主机网段互通,因此配置该ip

nmcli c d ens192
nmcli c modify ens192 ipv4.addresses 172.117.4.200/16 ipv4.gateway 172.117.0.254 ipv4.method manual autoconnect yes
nmcli c u ens192

在这里插入图片描述

1.2 查看wwn号

linux主机的光纤卡的wwpn查询方式:
rhel系,/sys/class/fc_host/hostXX/port_name,xx代表数字,每个hostxx文件夹都是一个单独接口

cat /sys/class/fc_host/hostxx/port_name

0x21000024ff41e856,0x21000024ff41e857

在这里插入图片描述

2. 光交配置

2.1 GUI

2.1.1 跳板机配置
2.1.1.1 配置IP

windows配置ip方式略
配置网段原因同1.1.1

在这里插入图片描述

2.1.1.2 安装jdk

实验环境的光交版本过老,使用的GUI配置界面为jdk6

在这里插入图片描述

2.1.1.3 浏览器登录光交IP

通过浏览器登录光交IP后,会自动加载jdk,并加载出一个配置界面

在这里插入图片描述
在这里插入图片描述

2.1.2 光交-Alias配置
2.1.2.0 进入zone配置模式,并清除之前的配置信息

在这里插入图片描述
在这里插入图片描述

2.1.2.1 配置alias

以下是所有连接在光交上的ssn信息
在这里插入图片描述

  • alias规划
设备名称Alias WWN
A_P220029c37f4814c0e
A_P320039c37f4814c0e
B_P220129c37f4814c0e
B_P320139c37f4814c0e
Server10x21000024ff41e856
Server20x21000024ff41e857

在这里插入图片描述

2.1.3 光交-Zone配置
  • zone规划
区域成员名称成员设备
A_P2_to_Server1A_P2, Server1
A_P3_to_Server2A_P3, Server2
B_P2_to_Server1B_P2, Server1
B_P3_to_Server2B_P3, Server2

在这里插入图片描述
在这里插入图片描述

在这里插入图片描述

2.1.4 光交-Zone-Cfg配置

将之前创建的zone都放入到zone_config中

在这里插入图片描述
在这里插入图片描述

2.1.5 光交-保存并启用配置

在这里插入图片描述

在这里插入图片描述

2.2 CLI

2.2.0 ssh登录

因为光交版本过老,所以不支持ssh的新密钥,需要添加-legacy兼容老版本密钥

ssh -legacy admin@172.1.0.71
Warning: Permanently added '172.1.0.71' (RSA) to the list of known hosts.
admin@172.1.0.71's password:
X11 forwarding request failed on channel 0

查看信息: switchshow

switchshow
switchName:     FC_01
switchType:     71.2
switchState:    Online
switchMode:     Native
switchRole:     Subordinate
switchDomain:   2
switchId:       fffc02
switchWwn:      10:00:00:27:f8:89:xx:xx
zoning:         OFF
switchBeacon:   OFF

Index Port Address Media Speed       State   Proto
==================================================
   0   0   020000   id    N8       Online      FC  F-Port  20:03:9c:37:f4:81:4c:0e
   1   1   020100   id    N8       Online      FC  F-Port  20:13:9c:37:f4:81:4c:0e
   2   2   020200   id    N8       Online      FC  F-Port  21:00:00:24:ff:41:e8:57
   3   3   020300   id    N8       Online      FC  E-Port  10:00:50:eb:1a:48:xx:xx "FC_01" (upstream)
   4   4   020400   id    N8       No_Light    FC
   5   5   020500   id    N8       No_Light    FC
   6   6   020600   --    N8       No_Module   FC
   7   7   020700   --    N8       No_Module   FC
   8   8   020800   --    N8       No_Module   FC  (No POD License) Disabled
   9   9   020900   --    N8       No_Module   FC  (No POD License) Disabled
  10  10   020a00   --    N8       No_Module   FC  (No POD License) Disabled
  11  11   020b00   --    N8       No_Module   FC  (No POD License) Disabled
  12  12   020c00   --    N8       No_Module   FC  (No POD License) Disabled
  13  13   020d00   --    N8       No_Module   FC  (No POD License) Disabled
  14  14   020e00   --    N8       No_Module   FC  (No POD License) Disabled
  15  15   020f00   --    N8       No_Module   FC  (No POD License) Disabled
  16  16   021000   --    N8       No_Module   FC  (No POD License) Disabled
  17  17   021100   --    N8       No_Module   FC  (No POD License) Disabled
  18  18   021200   --    N8       No_Module   FC  (No POD License) Disabled
  19  19   021300   --    N8       No_Module   FC  (No POD License) Disabled
  20  20   021400   --    N8       No_Module   FC  (No POD License) Disabled
  21  21   021500   --    N8       No_Module   FC  (No POD License) Disabled
  22  22   021600   --    N8       No_Module   FC  (No POD License) Disabled
  23  23   021700   --    N8       No_Module   FC  (No POD License) Disabled
2.2.1 alias配置

新建alias:alicreate “alias名”, “WWN号”

alicreate "A_P2","20029c37f4814c0e"
alicreate "A_P3","20039c37f4814c0e"
alicreate "B_P2","20129c37f4814c0e"
alicreate "B_P3","20139c37f4814c0e"
alicreate "Server1","0x21000024ff41e856"
alicreate "Server2","0x21000024ff41e857"
2.2.2 zone配置

新建zone:zonecreate “zone名”, “端口号; 端口号”
用alias加入:zonecreate “zone名”, “alias名1; alias名2”
查看zone: zoneshow

FC_01:admin> help zonecreate 

zonecreate "A_P2_to_Server1","A_P2; Server1"
zonecreate "A_P3_to_Server2","A_P3; Server2"
zonecreate "B_P2_to_Server1","B_P2; Server1"
zonecreate "B_P3_to_Server2","B_P3; Server2"

FC_01:admin> zoneshow
Defined configuration:
 cfg:   tassel_zc
                A_P2_to_Server1; A_P3_to_Server2; B_P2_to_Server1;
                B_P3_to_Server2
 zone:  A_P2_to_Server1
                A_P2; Server1
 zone:  A_P3_to_Server2
                A_P3; Server2
 zone:  B_P2_to_Server1
                B_P2; Server1
 zone:  B_P3_to_Server2
                B_P3; Server2
 alias: A_P2    20:02:9c:37:f4:81:4c:0e
 alias: A_P3    20:03:9c:37:f4:81:4c:0e
 alias: B_P2    20:12:9c:37:f4:81:4c:0e
 alias: B_P3    20:13:9c:37:f4:81:4c:0e
 alias: Server1 21:00:00:24:ff:41:e8:56
 alias: Server2 21:00:00:24:ff:41:e8:57

Effective configuration:
 cfg:   tassel_zc
 zone:  A_P2_to_Server1
                20:02:9c:37:f4:81:4c:0e
                21:00:00:24:ff:41:e8:56
 zone:  A_P3_to_Server2
                20:03:9c:37:f4:81:4c:0e
                21:00:00:24:ff:41:e8:57
 zone:  B_P2_to_Server1
                20:12:9c:37:f4:81:4c:0e
                21:00:00:24:ff:41:e8:56
 zone:  B_P3_to_Server2
                20:13:9c:37:f4:81:4c:0e
                21:00:00:24:ff:41:e8:57

2.2.3 zone_cfg配置

创建zonecfg:cfgcreate “zonecfg名” “zone名”
向已有配置文件中增加zone : cfgadd “配置文件名”, “zone名”
查看cfg: cfgshow
启动配置文件:cfgenable “配置文件名”
保存配置:cfgsave

cfgcreate "tassel_zc", "A_P2_to_Server1; A_P3_to_Server2; B_P2_to_Server1;  B_P3_to_Server2;" 

FC_01:admin> cfgshow
FC_01:admin> cfgsave
FC_01:admin> cfgenable "tassel_zc"

3. 测试

存储的LUN创建与映射配置过程略,如果需要可以查看我之前的笔记:
存储实验:Linux挂载iscsi硬盘与华为OceanStor创建LUN全流程

当光交配置正确并应用配置后,可以直接在存储上看到业务主机linux的wwn号
在这里插入图片描述

  1. 业务主机重新扫盘
scsi-rescan

在这里插入图片描述

在这里插入图片描述

  1. 业务主机安装多路径
[root@localhost ~]# unzip OceanStor_UltraPath_31.3.0_CentOS.zip
[root@localhost ~]# cd CentOS/
[root@localhost CentOS]# ls
doc  install.sh  packages  Tools  unattend_install.conf
[root@localhost CentOS]# sh install.sh
complete iscsi checking.
complete FC checking.
Verify the UltraPath existence.
The UltraPath is not installed.
Modify system configuration.[file:/etc/iscsi/iscsid.conf,item:node.startup ,value:  automatic]
Modify system configuration.[file:/etc/iscsi/iscsid.conf,item:node.session.timeo.replacement_timeout ,value:  1]
Modify system configuration.[file:/etc/modprobe.d/nxupmodules.conf,module:qla2xxx,item:qlport_down_retry,value:5]
Modify system configuration.[file:/etc/modprobe.d/nxupmodules.conf,module:lpfc,item:lpfc_nodev_tmo,value:5]
Modify system configuration.[file:/etc/systemd/system.conf,item:DefaultTimeoutStartSec,value:600s]
If the operating system is installed on a local drive of the server, you are advised
to choose boot from local; if the operating system is installed on a SAN storage
system, you must choose boot from san. Please choose the boot type of your system:
<1>--boot-from-Local
<2>--boot-from-SAN
please input your select:1
Verifying...                          ########################################
Preparing...                          ########################################
Updating / installing...
UltraPath-31.03.031-2                 ########################################
User configuration is saved successfully.
The boot service is installed successfully.
The running service is installed successfully.
************************************Attention************************************
* UltraPath would modify some parameters of HBA cards for better performace. If *
* UltraPath is installed for the first time, you may need to update the initrd  *
* image before system reboot to make the modification take effect.              *
*********************************************************************************
*********************************************************************************
* UltraPath will use the system hostname for alarm generation and automatic host*
* registration. Make sure that the system hostname is correctly configured..    *
*********************************************************************************
The installation is complete. Whether to restart the system now?
<Y|N>:y
Connection to 172.117.4.200 closed by remote host.

在这里插入图片描述

当出现sdb时,即成功,up-2作为sdb被用于业务主机,可以正常分区格式化(过程略)

试验结束

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值