Azure云上SAP-SBD设备配置


概述

在Azure上配置Pacemaker 集群,有两种方案。

  • 第一种是使用Azure fence agent,在机器故障时调用Azure API来重启机器。
  • 第二种是引入一台iSCSI目标服务器来作为SBD设备,来提供Fecing服务,提高故障转移效率。

本次部署,我们使用第二种方案,在机器SBDEVICE01上配置SBD设备,共享为NFS集群ASCS/ERS集群,HANA集群的Pacemaker提供Fecing服务。

安装iSCSI服务器

更新 SLES

sbd01:~ # sudo zypper update

删除冲突包

鉴于targetcli在SLES 12 SP3上的已知问题,我们需要把下面的几个包卸载掉。删除时,如果提示某个包不存在可以忽略:

sbd01:~ # sudo zypper remove lio-utils python-rtslib python-configshell targetcli
Continue? [y/n/...? shows all options] (y): y
(1/2) Removing yast2-iscsi-lio-server-3.2.1-1.23.noarch ..................[done]
(2/2) Removing lio-utils-4.1-15.14.2.x86_64 ..............................[done]

安装iSCSI目标服务器

sbd01:~ # sudo zypper install targetcli-fb dbus-1-python

启用iSCSI目标服务

sbd01:~ # sudo systemctl enable targetcli
Created symlink from /etc/systemd/system/remote-fs.target.wants/targetcli.service to /usr/lib/systemd/system/targetcli.service.
sbd01:~ # sudo systemctl start targetcli
sbd01:~ #

在iSCSI服务器上创建iSCSI设备

每个集群需要一块独立的ISCSI设备,当前系统中有3个集群,所以在第一章的资源部署时,已经为SBDEVICE01这台机器增加了3块数据盘。

集群的SBD设备规划见下表:

集群数据盘设备名称backstores名称结点1机器名结点1机器名
NFSsdcvnfs01nfs01nfs02
ASCSsddvascs01ascs01ascs02
HANAsdevhana01hana01hana02

查询已挂载数据盘列表

sdc,sdd,sde就是我们创建机器时挂载的3块数据盘。

sbd01:~ # sudo ls -al /dev/disk/azure/scsi1/ | grep sd[c-e]
lrwxrwxrwx 1 root root 12 Apr 27 06:16 lun0 -> ../../../sdc
lrwxrwxrwx 1 root root 12 Apr 27 07:27 lun1 -> ../../../sde
lrwxrwxrwx 1 root root 12 Apr 27 07:27 lun2 -> ../../../sdd

查询磁盘Id

sbd01:~ # sudo ls -l /dev/disk/by-id/scsi-* | grep .*3600.*sd[c-e]
lrwxrwxrwx 1 root root 9 Apr 27 07:27 /dev/disk/by-id/scsi-3600224801e868547ba0a1066e30383dc -> ../../sdd
lrwxrwxrwx 1 root root 9 Apr 27 06:16 /dev/disk/by-id/scsi-3600224809d33b3e91f1755c3ce91079b -> ../../sdc
lrwxrwxrwx 1 root root 9 Apr 27 07:27 /dev/disk/by-id/scsi-360022480cfffa84b3bf3f2e7ed4e5264 -> ../../sde

为SAP集群创建backstore

NFS集群

sbd01:~ # sudo targetcli backstores/block create vnfs01 /dev/disk/by-id/scsi-3600224809d33b3e91f1755c3ce91079b
Created block storage object vnfs01 using /dev/disk/by-id/scsi-3600224809d33b3e91f1755c3ce91079b.
sbd01:~ # sudo targetcli iscsi/ create iqn.2006-04.vnfs01.local:vnfs01
Created target iqn.2006-04.vnfs01.local:vnfs01.
Created TPG 1.
Global pref auto_add_default_portal=true
Created default portal listening on all IPs (0.0.0.0), port 3260.
sbd01:~ # sudo targetcli iscsi/iqn.2006-04.vnfs01.local:vnfs01/tpg1/luns/ create /backstores/block/vnfs01
Created LUN 0.
sbd01:~ # sudo targetcli iscsi/iqn.2006-04.vnfs01.local:vnfs01/tpg1/acls/ create iqn.2006-04.nfs01.local:nfs01
Created Node ACL for iqn.2006-04.nfs01.local:nfs01
Created mapped LUN 0.
sbd01:~ # sudo targetcli iscsi/iqn.2006-04.vnfs01.local:vnfs01/tpg1/acls/ create iqn.2006-04.nfs02.local:nfs02
Created Node ACL for iqn.2006-04.nfs02.local:nfs02
Created mapped LUN 0.

ASCS集群

sbd01:~ # sudo targetcli backstores/block create vascs01 /dev/disk/by-id/scsi-3600224801e868547ba0a1066e30383dc
Created block storage object vascs01 using /dev/disk/by-id/scsi-3600224801e868547ba0a1066e30383dc.
sbd01:~ # sudo targetcli iscsi/ create iqn.2006-04.vascs01.local:vascs01
Created target iqn.2006-04.vascs01.local:vascs01.
Created TPG 1.
Global pref auto_add_default_portal=true
Created default portal listening on all IPs (0.0.0.0), port 3260.
sbd01:~ # sudo targetcli iscsi/iqn.2006-04.vascs01.local:vascs01/tpg1/luns/ create /backstores/block/vascs01
Created LUN 0.
sbd01:~ # sudo targetcli iscsi/iqn.2006-04.vascs01.local:vascs01/tpg1/acls/ create iqn.2006-04.ascs01.local:ascs01
Created Node ACL for iqn.2006-04.ascs01.local:ascs01
Created mapped LUN 0.
sbd01:~ # sudo targetcli iscsi/iqn.2006-04.vascs01.local:vascs01/tpg1/acls/ create iqn.2006-04.ascs02.local:ascs02
Created Node ACL for iqn.2006-04.ascs02.local:ascs02
Created mapped LUN 0.

HANA集群

sbd01:~ # sudo targetcli backstores/block create vhana01 /dev/disk/by-id/scsi-360022480cfffa84b3bf3f2e7ed4e5264
Created block storage object vhana01 using /dev/disk/by-id/scsi-360022480cfffa84b3bf3f2e7ed4e5264.
sbd01:~ # sudo targetcli iscsi/ create iqn.2006-04.vhana01.local:vhana01
Created target iqn.2006-04.vhana01.local:vhana01.
Created TPG 1.
Global pref auto_add_default_portal=true
Created default portal listening on all IPs (0.0.0.0), port 3260.
sbd01:~ # sudo targetcli iscsi/iqn.2006-04.vhana01.local:vhana01/tpg1/luns/ create /backstores/block/vhana01
Created LUN 0.
sbd01:~ # sudo targetcli iscsi/iqn.2006-04.vhana01.local:vhana01/tpg1/acls/ create iqn.2006-04.hana01.local:hana01
Created Node ACL for iqn.2006-04.hana01.local:hana01
Created mapped LUN 0.
sbd01:~ # sudo targetcli iscsi/iqn.2006-04.vhana01.local:vhana01/tpg1/acls/ create iqn.2006-04.hana02.local:hana02
Created Node ACL for iqn.2006-04.hana02.local:hana02
Created mapped LUN 0.

保存targetcli配置

sbd01:~ # sudo targetcli saveconfig
Last 10 configs saved in /etc/target/backup.
Configuration saved to /etc/target/saveconfig.json

引用通告

本文所有配置步骤引用自:《Setting up Pacemaker on SUSE Linux Enterprise Server in Azure》

×用微信扫描并分享
本文链接: https://www.pstips.net/sap-on-azure-setup-sbd.html
请尊重原作者和编辑的辛勤劳动,欢迎转载,并注明出处!

关于 Mooser Lee

我是一个Powershell的爱好者,创建了PowerShell中文博客,热衷于Powershell技术的搜集和分享。本站部分内容来源于互联网,不足之处敬请谅解,并欢迎您批评指正。

发表评论

电子邮件地址不会被公开。 必填项已用*标注