当前天翼云一部分老的资源池无法通过专线直接方案存储,需要通过虚拟机代理访问,具体方案如下:
- 在部署前建议申请云主机,且云主机操作系统建议为Centos7.6。云主机的配置和流量关系如下:
带宽 云主机规格
<800Mb 2C4G
<2Gb 4C8G
<8Gb 8C16G
- HAProxy安装(建议云主机的操作系统为C6)
yum install -y haproxy
如果提示找不到haproxy,则可能需要配置yum源
在/etc/yum.repos.d/下面新建一个 epel.repo 文件,内容如下:
[epel]
name=CentOS-epel
baseurl=http://mirrors.sohu.com/fedora-epel/$releasever/$basearch
gpgcheck=0
安装完成后,设置haproxy开机自动启动
systemctl enable haproxy
- 修改/etc/haproxy/haproxy.conf
根据需要添加配置
S3标准对象存储的配置如下:
# S3
#-----------------------------------------------------------
listen s3_nodes *:xx
mode tcp
option tcplog
server cifs1 xx.xx.x.x:xx check
listen s3_nodes *:xx
mode tcp
option tcplog
server cifs1 xx.xx.x.x:xx check
cifs配置如下:
listen cifs1_nodes *:xx
mode tcp
option tcplog
server cifs1 xx.xx.xx.xx:xx check
listen cifs1_nodes *:xx
mode tcp
option tcplog
server cifs1 xx.xx.xx.xx:xx check
Nfs配置如下:
# nfs
#-----------------------------------------------------------
listen nfs_nodes *:xx
mode tcp
option tcplog
server nfs1 xx.xx.xx.xx:xx check
iscsi配置如下:
#----------------------------------------------------------
# iscsi data
#----------------------------------------------------------
listen iscsi_nodes1 *:xxxx
mode tcp
option tcplog
server iscsi_proxy1 xx.xx.x.x:xxxx check weight 1
listen iscsi_nodes2 *:xxxx
mode tcp
option tcplog
server iscsi_proxy2 xx.xx.x.x:xxxx check weight 1
- 重新加载haproxy配置
systemctl restart haproxy
5、设置haproxy服务自启动
sudo systemctl enable haproxy