存储实验:基于华为存储实现存储双活(HyperMetro特性)

2024-08-29 08:12

本文主要是介绍存储实验:基于华为存储实现存储双活(HyperMetro特性),希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

目录

  • 什么是存储双活
    • 仲裁机制
  • 实验
    • 需求
    • 实验拓扑
    • 实验环境
    • 实验步骤
      • 1. 双活存储存储初始化(OceanStor v3 模拟器)
        • 1.1开机,设置密码
        • 1.2登录DM,修改设备名、系统时间和导入License
        • 1.3 设置接口IP
      • 2. 仲裁服务器配置(Centos7)
        • 2.1 配置网络
        • 2.2 上传仲裁软件,解压安装
        • 2.3 添加仲裁服务器IP,查看
      • 3. 双活存储配置
        • 3.1 两台存储创建硬盘域和存储池
        • 3.2 配置远端设备(mm_user/mm_user@storage)
        • 3.3 主端存储创建lun(5G)
        • 3.4 创建双活域,添加仲裁,以及鉴权
        • 3.5 创建双活pair
        • 3.6 业务主机配置,多路径
        • 3.7 业务主机发起连接
        • 3.8 存储加启动器(双活双方都要添加)
        • 3.9 业务主机验证双活lun的情况
        • 3.10 业务主机搭建业务测试

什么是存储双活

华为HyperMetro特性又称双活特性(以下统称双活特性),双活特性中的两个数据中心互为备份,且都处于运行状态。当一个数据中心发生设备故障,甚至数据中心整体故障时,业务自动切换到另一个数据中心,解决了传统灾备业务无法自动切换的问题。提供给用户高级别的数据可靠性以及业务连续性的同时,提高存储系统的资源利用率。
在这里插入图片描述

在这里插入图片描述

仲裁机制

数据仲裁原理
当两个数据中心之间的链路故障或其中一个数据中心故障时,两个数据中心之间无法实时同步,此时只能由双活Pair或双活一致性组中的一端继续提供服务。为了保证数据一致性,双活通过仲裁机制决定数据中心的服务优先级。

HyperMetro提供了两种仲裁模式:

  1. 静态优先级模式
    应用在未配置仲裁服务器的场景。
  2. 仲裁服务器模式(推荐)
    应用在配置了仲裁服务器的场景。

实验

需求

通过OceanStor v3,完成存储双活实验,实现任意一台存储故障而业务不断。

实验拓扑

在这里插入图片描述

实验环境

设备设备作用端口IP网段作用
Centos8业务主机ens192172.117.4.100/16管理平面
Centos8业务主机ens224172.118.4.100/16存储业务平面
-----
Storage01双活存储01Web172.1.0.73:8088存储的web访问网址
Storage01双活存储01H0172.118.73.201/16存储业务平面
Storage01双活存储01H1172.118.73.202/16存储业务平面
Storage01双活存储01H2172.119.73.201/16存储复制平面(存储双活链路)
Storage01双活存储01H3172.120.73.201/16存储仲裁平面
-----
Storage02双活存储02Web172.1.0.74:8088存储的web访问网址
Storage02双活存储02H0172.118.74.201/16存储业务平面
Storage02双活存储02H1172.118.74.202/16存储业务平面
Storage02双活存储02H2172.119.74.201/16存储复制平面(存储双活链路)
Storage02双活存储02H3172.120.74.201/16存储仲裁平面
-----
QSServer仲裁服务器ens192172.117.75.250/16管理平面
QSServer仲裁服务器ens224172.120.75.251/16存储仲裁平面(连接Storage01)
QSServer仲裁服务器ens256172.120.75.252/16存储仲裁平面(连接Storage02)

实验步骤

1. 双活存储存储初始化(OceanStor v3 模拟器)

在这里插入图片描述

1.1开机,设置密码
  1. 开启存储模拟器,使用默认账号和密码登录,等待初始化完成
    在这里插入图片描述
    在这里插入图片描述

  2. 输入重设的密码
    在这里插入图片描述
    在这里插入图片描述

1.2登录DM,修改设备名、系统时间和导入License

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

修改系统时间是因为这个模拟器的license只到2020年3月

在这里插入图片描述

1.3 设置接口IP

两台存储的设备的H0和H1口配置成存储业务口:172.118.73.201/16、172.118.73.202/16和172.118.74.201/16、172.118.74.202/16
H2口配置为存储复制链路口:172.119.73.201/16和172.119.74.201/16
H3口配置为存储仲裁接口:172.120.73.201/16和172.120.74.201/16

截图不全截,仅演示
在这里插入图片描述

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

2. 仲裁服务器配置(Centos7)

2.1 配置网络

在这里插入图片描述
ens192作为管理网络网卡,配置172.117.x.x
ens224和ens256是仲裁网络网卡,配置172.120.x.x

[root@localhost ~]#  nmcli con modify ens192 ipv4.addresses 172.117.75.250/16 ipv4.gateway 172.117.0.254 ipv4.method manual autoconnect yes
[root@localhost ~]# nmcli con modify ens224 ipv4.addresses 172.120.75.251/16 ipv4.method manual autoconnect yes
[root@localhost ~]# nmcli con modify ens256 ipv4.addresses 172.120.75.252/16 ipv4.method manual autoconnect yes# 修改时间,用于对接存储模拟器
[root@localhost ~]# date -s "20200101 10:03"
Wed Jan  1 10:03:00 CST 2020
2.2 上传仲裁软件,解压安装

在这里插入图片描述

#解压
[root@localhost ~]# unzip OceanStor_5300V3_5500V3_5600V3_5800V3_6800V3_V300R006C50SPC100_QuorumServer.zip[root@localhost ~]# cd package/
[root@localhost package]# ls
packages  qs_version.ini  quorum_server.sh  tools# 安装仲裁服务器
[root@localhost package]# sh quorum_server.sh  -install
Verify the QuorumServer existence.
The QuorumServer is not installed.
The current user is the root user. A quorum server administrator account needs to be provided. Continue to install?
<Y|N>:Y 
Enter an adminstrator account for the quorum server:[default: quorumsvr]: 
Created new account: quorumsvr.
usermod: no changes
Changing password for user quorumsvr.
New password: 
Retype new password: 
passwd: all authentication tokens updated successfully.
Installing the quorum server.
Preparing...                          ################################# [100%]
Updating / installing...1:QuorumServer-V300R006C50SPC100-li################################# [100%]
[Notice] No old configuration need to resume.
QuorumServer install success completed.
2.3 添加仲裁服务器IP,查看
[root@localhost package]# qsadmin
start main!
Waiting for connecting to server...
admin:/>helpquit      : Logout.exit      : Logout.add       : add [white_list|server_ip], for more information, please type 'add help'.delete    : delete [white_list|server_ip|cert_crl], for more information, please type 'delete help'.show      : show [white_list|server_ip|tls_cert|server_info|ca_cert|cipher_info], for more information, please type 'show help'.change    : change [white_list|cipher], for more information, please type 'change help'.export    : export [tls_cert], for more information, please type 'export help'.import    : import [tls_cert|cert_crl], for more information, please type 'import help'.admin:/>add server_ip ip=172.120.75.251 #配置本机的ens224Command executed succesfully.admin:/>add server_ip ip=172.120.75.252 #配置本机的ens256Command executed succesfully.admin:/>show server_ipIndex     Server IP                                    Server Port-----     ---------------                              ---------------1         172.120.75.251                               300022         172.120.75.252                               30002Index     Local IP            Local Port          Remote IP           Remote Port         State      -----     ---------------     ---------------     ---------------     ---------------     ---------- 

3. 双活存储配置

3.1 两台存储创建硬盘域和存储池

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

3.2 配置远端设备(mm_user/mm_user@storage)

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

3.3 主端存储创建lun(5G)

在这里插入图片描述

3.4 创建双活域,添加仲裁,以及鉴权

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

在这里插入图片描述

3.5 创建双活pair

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

3.6 业务主机配置,多路径

略,详情步骤可以见我之前的笔记

3.7 业务主机发起连接
[root@localhost ~]# iscsiadm -m discovery -t st -p 172.118.73.201
172.118.73.201:3260,8196 iqn.2014-08.com.example::2100030203040506::22003:172.118.73.201
[root@localhost ~]# iscsiadm -m discovery -t st -p 172.118.73.202
172.118.73.202:3260,8197 iqn.2014-08.com.example::2100030203040506::22004:172.118.73.202
[root@localhost ~]# iscsiadm -m discovery -t st -p 172.118.74.202
172.118.74.202:3260,8197 iqn.2014-08.com.example::2100040203040506::22004:172.118.74.202
[root@localhost ~]# iscsiadm -m discovery -t st -p 172.118.74.201
172.118.74.201:3260,8196 iqn.2014-08.com.example::2100040203040506::22003:172.118.74.201
[root@localhost ~]# iscsiadm -m node -l
Logging in to [iface: default, target: iqn.2014-08.com.example::2100030203040506::22003:172.118.73.201, portal: 172.118.73.201,3260]
Logging in to [iface: default, target: iqn.2014-08.com.example::2100030203040506::22004:172.118.73.202, portal: 172.118.73.202,3260]
Logging in to [iface: default, target: iqn.2014-08.com.example::2100040203040506::22004:172.118.74.202, portal: 172.118.74.202,3260]
Logging in to [iface: default, target: iqn.2014-08.com.example::2100040203040506::22003:172.118.74.201, portal: 172.118.74.201,3260]
Login to [iface: default, target: iqn.2014-08.com.example::2100030203040506::22003:172.118.73.201, portal: 172.118.73.201,3260] successful.
Login to [iface: default, target: iqn.2014-08.com.example::2100030203040506::22004:172.118.73.202, portal: 172.118.73.202,3260] successful.
Login to [iface: default, target: iqn.2014-08.com.example::2100040203040506::22004:172.118.74.202, portal: 172.118.74.202,3260] successful.
Login to [iface: default, target: iqn.2014-08.com.example::2100040203040506::22003:172.118.74.201, portal: 172.118.74.201,3260] successful.
3.8 存储加启动器(双活双方都要添加)

略,详情步骤可以见我之前的笔记

3.9 业务主机验证双活lun的情况
[root@localhost ~]# hot_add[root@localhost ~]# lsblk
NAME        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda           8:0    0   20G  0 disk
├─sda1        8:1    0  600M  0 part /boot/efi
├─sda2        8:2    0    1G  0 part /boot
└─sda3        8:3    0 18.4G  0 part├─cl-root 253:0    0 16.4G  0 lvm  /└─cl-swap 253:1    0    2G  0 lvm  [SWAP]
sdb           8:16   0    5G  0 disk
up-0        252:0    0    5G  0 disk
up-1        252:1    0    5G  0 disk
up-2        252:2    0    5G  0 disk[root@localhost ~]# upadminUltraPath CLI #0 >show vlun type=all
----------------------------------------------------------------------------------------------------------------------------------------------------------Vlun ID  Disk    Name                Lun WWN               Status  Capacity  Ctrl(Own/Work)  Array Name  Dev Lun ID  No. of Paths(Available/Total)0     sdb   LUN001.r  60302031000405060007f3d700000000  Normal   5.00GB       0A/0A       Storage02       0                    2/20     sdb    LUN001   60302031000405060007f3d700000000  Normal   5.00GB       0A/0A       Storage01       0                    2/2
----------------------------------------------------------------------------------------------------------------------------------------------------------UltraPath CLI #1 >show vlun id=0 type=all
=======================================================VLUN#0 Information
=======================================================
Disk                     : sdb
Manual IO Suspension     : Off
Aggregation Type         : Hyper Metro
Aggregation Specific AttributionWorkingMode            : read write within primary arrayPrimary Array SN       : ST000000002018120003
Aggregation Member#0 InfomationName              : LUN001.rStatus            : NormalCapacity          : 5.00GBAggregation Specific Attribution : N/ALUN WWN           : 60302031000405060007f3d700000000Array Name        : Storage02Array SN          : ST000000002018120003Driver            : Vendor-specific(DEFAULT)Product Name      : XSG1Vendor Name       : HUAWEIOwning Controller : 0AWorking Controller: 0ANum of Paths      : 2Controller 0APath 2 [35:0:0:1] (up-2)  : NormalPath 3 [36:0:0:1] (up-3)  : Normal
Aggregation Member#1 InfomationName              : LUN001Status            : NormalCapacity          : 5.00GBAggregation Specific Attribution : N/ALUN WWN           : 60302031000405060007f3d700000000Array Name        : Storage01Array SN          : ST000000002018120002Driver            : Vendor-specific(DEFAULT)Product Name      : XSG1Vendor Name       : HUAWEIOwning Controller : 0AWorking Controller: 0ANum of Paths      : 2Controller 0APath 0 [33:0:0:1] (up-0)  : NormalPath 1 [34:0:0:1] (up-1)  : Normal
-------------------------------------------------------
3.10 业务主机搭建业务测试

模拟http业务测试,前置yum安装、磁盘分区格式化不演示

在这里插入图片描述

关闭Storage01 存储模拟器,模拟故障
在这里插入图片描述
在这里插入图片描述

在这里插入图片描述

试验结束。

这篇关于存储实验:基于华为存储实现存储双活(HyperMetro特性)的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/1117320

相关文章

openCV中KNN算法的实现

《openCV中KNN算法的实现》KNN算法是一种简单且常用的分类算法,本文主要介绍了openCV中KNN算法的实现,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的... 目录KNN算法流程使用OpenCV实现KNNOpenCV 是一个开源的跨平台计算机视觉库,它提供了各

OpenCV图像形态学的实现

《OpenCV图像形态学的实现》本文主要介绍了OpenCV图像形态学的实现,包括腐蚀、膨胀、开运算、闭运算、梯度运算、顶帽运算和黑帽运算,文中通过示例代码介绍的非常详细,需要的朋友们下面随着小编来一起... 目录一、图像形态学简介二、腐蚀(Erosion)1. 原理2. OpenCV 实现三、膨胀China编程(

通过Spring层面进行事务回滚的实现

《通过Spring层面进行事务回滚的实现》本文主要介绍了通过Spring层面进行事务回滚的实现,包括声明式事务和编程式事务,具有一定的参考价值,感兴趣的可以了解一下... 目录声明式事务回滚:1. 基础注解配置2. 指定回滚异常类型3. ​不回滚特殊场景编程式事务回滚:1. ​使用 TransactionT

Android实现打开本地pdf文件的两种方式

《Android实现打开本地pdf文件的两种方式》在现代应用中,PDF格式因其跨平台、稳定性好、展示内容一致等特点,在Android平台上,如何高效地打开本地PDF文件,不仅关系到用户体验,也直接影响... 目录一、项目概述二、相关知识2.1 PDF文件基本概述2.2 android 文件访问与存储权限2.

使用Python实现全能手机虚拟键盘的示例代码

《使用Python实现全能手机虚拟键盘的示例代码》在数字化办公时代,你是否遇到过这样的场景:会议室投影电脑突然键盘失灵、躺在沙发上想远程控制书房电脑、或者需要给长辈远程协助操作?今天我要分享的Pyth... 目录一、项目概述:不止于键盘的远程控制方案1.1 创新价值1.2 技术栈全景二、需求实现步骤一、需求

Spring Shell 命令行实现交互式Shell应用开发

《SpringShell命令行实现交互式Shell应用开发》本文主要介绍了SpringShell命令行实现交互式Shell应用开发,能够帮助开发者快速构建功能丰富的命令行应用程序,具有一定的参考价... 目录引言一、Spring Shell概述二、创建命令类三、命令参数处理四、命令分组与帮助系统五、自定义S

SpringBatch数据写入实现

《SpringBatch数据写入实现》SpringBatch通过ItemWriter接口及其丰富的实现,提供了强大的数据写入能力,本文主要介绍了SpringBatch数据写入实现,具有一定的参考价值,... 目录python引言一、ItemWriter核心概念二、数据库写入实现三、文件写入实现四、多目标写入

Android Studio 配置国内镜像源的实现步骤

《AndroidStudio配置国内镜像源的实现步骤》本文主要介绍了AndroidStudio配置国内镜像源的实现步骤,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,... 目录一、修改 hosts,解决 SDK 下载失败的问题二、修改 gradle 地址,解决 gradle

SpringSecurity JWT基于令牌的无状态认证实现

《SpringSecurityJWT基于令牌的无状态认证实现》SpringSecurity中实现基于JWT的无状态认证是一种常见的做法,本文就来介绍一下SpringSecurityJWT基于令牌的无... 目录引言一、JWT基本原理与结构二、Spring Security JWT依赖配置三、JWT令牌生成与

SpringBoot实现微信小程序支付功能

《SpringBoot实现微信小程序支付功能》小程序支付功能已成为众多应用的核心需求之一,本文主要介绍了SpringBoot实现微信小程序支付功能,文中通过示例代码介绍的非常详细,对大家的学习或者工作... 目录一、引言二、准备工作(一)微信支付商户平台配置(二)Spring Boot项目搭建(三)配置文件