bclinux aarch64 openeuler 20.03 LTS SP1 部署 fastCFS

基于已配置好的4个节点部署ceph-0 ceph-1 ceph-2 ceph-3(早期ceph测试环境,名称就不修改了)

获取fcfs.sh

mkdir /etc/fcfs
cd /etc/fcfs
wget http://fastcfs.net/fastcfs/ops/fcfs.sh

配置/etc/fcfs/fcfs.settings

# 要安装的集群版本号(例如:5.0.0)
fastcfs_version=4.3.0# 要安装 fuseclient 客户端的IP列表,多个ip以英文逗号分隔
fuseclient_ips=172.17.163.105,172.17.112.206,172.17.227.100,172.17.67.157

conf目录

[root@ceph-0 fcfs]# cd /etc/fcfs/
[root@ceph-0 fcfs]# wget http://fastcfs.net/fastcfs/ops/fcfs-config-sample.tar.gz
--2023-11-21 10:37:55--  http://fastcfs.net/fastcfs/ops/fcfs-config-sample.tar.gz
Resolving fastcfs.net (fastcfs.net)... 39.106.8.170
Connecting to fastcfs.net (fastcfs.net)|39.106.8.170|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4569 (4.5K) [application/octet-stream]
Saving to: ‘fcfs-config-sample.tar.gz’

fcfs-config-sample.tar.gz                 100%[==================================================================================>]   4.46K  --.-KB/s    in 0s      

2023-11-21 10:37:55 (79.9 MB/s) - ‘fcfs-config-sample.tar.gz’ saved [4569/4569]

[root@ceph-0 fcfs]# tar -xvf fcfs-config-sample.tar.gz 
conf/
conf/fcfs/
conf/fcfs/fuse.conf
conf/auth/
conf/auth/server.conf
conf/auth/client.conf
conf/auth/session.conf
conf/auth/cluster.conf
conf/auth/keys/
conf/auth/keys/session_validate.key
conf/auth/auth.conf
conf/vote/
conf/vote/server.conf
conf/vote/client.conf
conf/vote/cluster.conf
conf/fdir/
conf/fdir/storage.conf
conf/fdir/server.conf
conf/fdir/client.conf
conf/fdir/cluster.conf
conf/fstore/
conf/fstore/storage.conf
conf/fstore/server.conf
conf/fstore/client.conf
conf/fstore/cluster.conf

cluster.conf

[root@ceph-0 fcfs]# vim conf/auth/cluster.conf 
[root@ceph-0 fcfs]# vim conf/fdir/cluster.conf 
[root@ceph-0 fcfs]# vim conf/fstore/cluster.conf 
[root@ceph-0 fcfs]# vim conf/vote/cluster.conf 

修改server信息

[server-1]
host = 172.17.163.105
[server-2]
host = 172.17.112.206
[server-3]
host = 172.17.227.100
[server-4]
host = 172.17.67.157

存储参数 store-path

[root@ceph-0 fcfs]# vim conf/fdir/storage.conf

[store-path-1]
# the path to store the file
# default value is the data path of storage engine
path = /opt/fastcfs/fdir/db

[root@ceph-0 fcfs]# vim conf/fstore/storage.conf

[store-path-1]
# the path to store the file
path = /opt/faststore/data

初始化lvm(每个节点均执行)

pv

[root@ceph-0 fcfs]# pvcreate /dev/vdb 
  Physical volume "/dev/vdb" successfully created.

vg

[root@ceph-0 fcfs]# vgcreate vg_fastcfs /dev/vdb
  Volume group "vg_fastcfs" successfully created

pv

[root@ceph-0 fcfs]# lvcreate -y -L 50G -n lv_fastcfs_fdir1 vg_fastcfs
  Wiping ceph_bluestore signature on /dev/vg_fastcfs/lv_fastcfs_fdir1.
  Logical volume "lv_fastcfs_fdir1" created.

[root@ceph-0 fcfs]# lvcreate -y -l 100%FREE -n lv_fastcfs_fstore1 vg_fastcfs
  Logical volume "lv_fastcfs_fstore1" created.

lvm最终状态

挂载存储目录(每个节点均执行)

创建数据目录

[root@ceph-0 fcfs]# mkdir -p /opt/fastcfs/fdir/db
[root@ceph-0 fcfs]# mkdir -p /opt/faststore/data

配置/etc/fstab

添加两行

/dev/mapper/vg_fastcfs-lv_fastcfs_fdir1 /opt/fastcfs/fdir/db xfs defaults 0 0
/dev/mapper/vg_fastcfs-lv_fastcfs_fstore1 /opt/faststore/data xfs defaults 0 0

xfs格式化

[root@ceph-0 fcfs]# mkfs.xfs /dev/mapper/vg_fastcfs-lv_fastcfs_fdir1
meta-data=/dev/mapper/vg_fastcfs-lv_fastcfs_fdir1 isize=512    agcount=4, agsize=3276800 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=1        finobt=1, sparse=1, rmapbt=0
         =                       reflink=1
data     =                       bsize=4096   blocks=13107200, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0, ftype=1
log      =internal log           bsize=4096   blocks=6400, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
Discarding blocks...Done.
[root@ceph-0 fcfs]# mkfs.xfs /dev/mapper/vg_fastcfs-lv_fastcfs_fstore1
meta-data=/dev/mapper/vg_fastcfs-lv_fastcfs_fstore1 isize=512    agcount=4, agsize=3276544 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=1        finobt=1, sparse=1, rmapbt=0
         =                       reflink=1
data     =                       bsize=4096   blocks=13106176, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0, ftype=1
log      =internal log           bsize=4096   blocks=6399, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
Discarding blocks...Done.

挂载

mount -a

其他三台初始化

pvcreate /dev/vdb 
vgcreate vg_fastcfs /dev/vdb
lvcreate -y -L 50G -n lv_fastcfs_fdir1 vg_fastcfs
lvcreate -y -l 100%FREE -n lv_fastcfs_fstore1 vg_fastcfs
mkdir -p /opt/fastcfs/fdir/db
mkdir -p /opt/faststore/dataecho "/dev/mapper/vg_fastcfs-lv_fastcfs_fdir1 /opt/fastcfs/fdir/db xfs defaults 0 0" >> /etc/fstab
echo "/dev/mapper/vg_fastcfs-lv_fastcfs_fstore1 /opt/faststore/data xfs defaults 0 0" >> /etc/fstab
mkfs.xfs /dev/mapper/vg_fastcfs-lv_fastcfs_fdir1
mkfs.xfs /dev/mapper/vg_fastcfs-lv_fastcfs_fstore1
mount -a

适配BigCloud(即:bclinux)

修改脚本,差异如下[root@ceph-0 fcfs]# diff -Npr fcfs.sh fcfs.sh.bak
 

*** fcfs.sh    2023-11-21 13:45:20.742219402 +0800
--- fcfs.sh.bak    2023-11-21 13:41:49.109731058 +0800
*************** declare -ir MIN_VERSION_OF_Anolis=7
*** 22,28 ****declare -ir MIN_VERSION_OF_Amazon=2declare -ir MIN_VERSION_OF_openEuler=20declare -ir MIN_VERSION_OF_UOS=20
! YUM_OS_ARRAY=(Red Rocky Oracle Fedora CentOS AlmaLinux Alibaba Anolis Amazon BigCloud openEuler Kylin UOS)APT_OS_ARRAY=(Ubuntu Debian Deepin)fcfs_settings_file="fcfs.settings"
--- 22,28 ----declare -ir MIN_VERSION_OF_Amazon=2declare -ir MIN_VERSION_OF_openEuler=20declare -ir MIN_VERSION_OF_UOS=20
! YUM_OS_ARRAY=(Red Rocky Oracle Fedora CentOS AlmaLinux Alibaba Anolis Amazon openEuler Kylin UOS)APT_OS_ARRAY=(Ubuntu Debian Deepin)fcfs_settings_file="fcfs.settings"
*************** check_remote_osname() {
*** 850,856 ****elseos_major_version=8fi
!     elif [ $osname = 'BigCloud' ] || [ $osname = 'openEuler' ] || [ $osname = 'Kylin' ] || [ $osname = 'UOS' ]; thenos_major_version=8fielse
--- 850,856 ----elseos_major_version=8fi
!     elif [ $osname = 'openEuler' ] || [ $osname = 'Kylin' ] || [ $osname = 'UOS' ]; thenos_major_version=8fielse

执行安装

bash fcfs.sh install

配置文件分发

bash fcfs.sh config

分发的配置文件清单

[root@ceph-1 ~]# find /etc/fastcfs/
/etc/fastcfs/
/etc/fastcfs/fdir
/etc/fastcfs/fdir/cluster.conf
/etc/fastcfs/fdir/client.conf
/etc/fastcfs/fdir/server.conf
/etc/fastcfs/fdir/storage.conf
/etc/fastcfs/auth
/etc/fastcfs/auth/cluster.conf
/etc/fastcfs/auth/client.conf
/etc/fastcfs/auth/server.conf
/etc/fastcfs/auth/auth.conf
/etc/fastcfs/auth/session.conf
/etc/fastcfs/auth/keys
/etc/fastcfs/auth/keys/session_validate.key
/etc/fastcfs/vote
/etc/fastcfs/vote/cluster.conf
/etc/fastcfs/vote/client.conf
/etc/fastcfs/vote/server.conf
/etc/fastcfs/fcfs
/etc/fastcfs/fcfs/papi.conf
/etc/fastcfs/fcfs/fuse.conf
/etc/fastcfs/fstore
/etc/fastcfs/fstore/cluster.conf
/etc/fastcfs/fstore/client.conf
/etc/fastcfs/fstore/server.conf
/etc/fastcfs/fstore/storage.conf
/etc/fastcfs/fstore/dbstore.conf

启动集群

bash fcfs.sh start

查看集群日志

bash fcfs.sh tail fdir

故障:ERROR  connect to fdir server Connection refused

[2023-11-21 14:21:26] ERROR - file: connection_pool.c, line: 140, connect to fdir server 172.17.112.206:11011 fail, errno: 111, error info: Connection refused
[2023-11-21 14:21:26] ERROR - file: connection_pool.c, line: 140, connect to fdir server 172.17.227.100:11011 fail, errno: 111, error info: Connection refused
[2023-11-21 14:21:26] ERROR - file: connection_pool.c, line: 140, connect to fdir server 172.17.67.157:11011 fail, errno: 111, error info: Connection refused
[2023-11-21 14:21:27] ERROR - file: connection_pool.c, line: 140, connect to fdir server 172.17.67.157:11011 fail, errno: 111, error info: Connection refused
 

过一会儿就好了

查看状态

查看fastDIR状态

fdir_cluster_stat

查看挂载目录空间情况

df -h /opt/fastcfs/fuse/

====

其他节点未同步,直接升级到5.0.0

故障:fstore cluster ip配置未同步

fcfs.sh config 执行后,

除了 ceph-0节点,其他节点fstore/cluster.conf host地址均不对!

正确的地址

手动修改 ceph-1 2 3节点 /etc/fastcfs/fstore/cluster.conf

重启

cd /etc/fcfs; ./fcfs.sh restart

基本上OK了(还不会用)

简单dd进去一个1G文件,所有节点fuse目录已经同步了

[root@ceph-0 fcfs]# ssh ceph-0 df -h /opt/fastcfs/fuse/
Filesystem      Size  Used Avail Use% Mounted on
/dev/fuse        45G  1.0G   44G   3% /opt/fastcfs/fuse
[root@ceph-0 fcfs]# ssh ceph-1 df -h /opt/fastcfs/fuse/
Filesystem      Size  Used Avail Use% Mounted on
/dev/fuse        45G  1.0G   44G   3% /opt/fastcfs/fuse
[root@ceph-0 fcfs]# ssh ceph-2 df -h /opt/fastcfs/fuse/
Filesystem      Size  Used Avail Use% Mounted on
/dev/fuse        45G  1.0G   44G   3% /opt/fastcfs/fuse
[root@ceph-0 fcfs]# ssh ceph-3 df -h /opt/fastcfs/fuse/
Filesystem      Size  Used Avail Use% Mounted on
/dev/fuse        45G  1.0G   44G   3% /opt/fastcfs/fuse

客户端

rpm -ivh http://www.fastken.com/yumrepo/el8/noarch/FastOSrepo-1.0.1-1.el8.noarch.rpm
yum install -y FastCFS-fused-5.0.0

配置cluster.conf

[root@ceph-client fastcfs]# vim /etc/fastcfs/fstore/cluster.conf 

vim /etc/fastcfs/auth/cluster.conf 

vim /etc/fastcfs/fdir/cluster.conf 

[server-1]
host = 172.17.163.105
[server-2]
host = 172.17.112.206
[server-3]
host = 172.17.227.100
[server-4]
host = 172.17.67.157

systemctl daemon-reload

systemctl start fastcfs

vdbench压测

fastcfs.conf

hd=default,vdbench=/root/vdbench,user=root,shell=ssh
hd=hd1,system=ceph-0
fsd=fsd1,anchor=/opt/fastcfs/fuse,depth=2,width=10,files=40,size=4M,shared=yes
fwd=format,threads=24,xfersize=1m
fwd=default,xfersize=1m,fileio=sequential,fileselect=sequential,operation=write,threads=24
fwd=fwd1,fsd=fsd1,host=hd1
rd=rd1,fwd=fwd*,fwdrate=max,format=restart,elapsed=600,interval=1

压测

cd /root/vdbench
./vdbench -f fastcfs.conf

中途卡了一会儿?

对比之前做的ceph集群,峰值更大,但是有停顿!

客户端消耗了大部分CPU资源(未在ceph-client上执行- -#,测试方案不严谨)

告一段落。

独立一个客户端ceph-client云主机测试

1884/8=235.5 虚拟网卡满了?比本地测试峰值要低

附:离线安装参考

参考

docs/fcfs-ops-tool-zh_CN.md · happyfish100/FastCFS - Gitee.com

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/158031.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Linux 零拷贝splice函数

Linux splice 函数简介 splice 是 Linux 系统中用于在两个文件描述符之间移动数据的系统调用。它的主要作用是在两个文件描述符之间传输数据&#xff0c;而无需在用户空间进行数据拷贝。也是零拷贝操作. 函数原型 #include <fcntl.h> ssize_t splice(int fd_in, loff_…

Python 2.7 在 Debian 服务器上获取 URL 时的 SSL 验证失败问题与解决方案

在使用Python的requests库从Debian稳定服务器上获取简单URL时&#xff0c;遇到了SSL证书错误。 根据用户的问题描述&#xff0c;您遇到了SSL证书验证失败的问题。 要解决这个问题&#xff0c;您可以采取以下步骤&#xff1a; 1. 升级到Python 2.7的最新版本&#xff1a; 首…

重排和重绘

浏览器的渲染过程 1.解析HTML&#xff0c;生成DOM树 2.解析CSS&#xff0c;生成CSS规则树(CSSOM) 3.合并DOM和CSSOM&#xff0c;生成渲染树&#xff08;Render-Tree&#xff09; 4.计算渲染树的布局&#xff08;Layout&#xff09; 5.将布局渲染到屏幕上(paint) 什么是重…

关于sklearn的:还可能是网络的问题???

前提&#xff1a;安装sklearn需要 numpy、scipy等库&#xff08;这个自行搜索&#xff09; 昨天安装numpy、scipy很快&#xff0c;一会就好了&#xff0c;然后安装sklearn一直报错&#xff0c;还以为是版本问题。 今天大早上起来&#xff0c;再次安装&#xff0c;顺利成功&…

Doris安装要求

软硬件需求 1&#xff09;Linux 操作系统要求 2&#xff09;软件需求 3&#xff09;开发测试环境 4&#xff09;生产环境 5&#xff09;注意事项 &#xff08;1&#xff09;FE 的磁盘空间主要用于存储元数据&#xff0c;包括日志和 image。通常从几百 MB 到几个GB 不等。 &a…

minio安装使用-linux

下载地址&#xff1a;MinIO | Code and downloads to create high performance object storage 选择 minio server 可以直接下载二进制文件。 将下载的文件传输到服务器的指定文件夹下&#xff0c;如 /opt/minio。 然后在&#xff0c;命令行启动minio&#xff1a; /opt/mini…

C#入门(8):抽象类介绍

在C#中&#xff0c;抽象类&#xff08;Abstract Class&#xff09;是一种特殊的类&#xff0c;它不能被实例化。相反&#xff0c;它通常作为基类&#xff0c;供其他类继承。抽象类可以包含抽象成员&#xff08;抽象方法、抽象属性、抽象事件或抽象索引器&#xff09;&#xff0…

QT在线安装指南

方案 https://mirrors.tuna.tsinghua.edu.cn/qt/official_releases/online_installers/Index of /qt/official_releases/online_installers/ | 清华大学开源软件镜像站&#xff0c;致力于为国内和校内用户提供高质量的开源软件镜像、Linux 镜像源服务&#xff0c;帮助用户更方…

【SA8295P 源码分析】132 - GMSL2 协议分析 之 GPIO/SPI/I2C/UART 等通迅控制协议带宽消耗计算

【SA8295P 源码分析】132 - GMSL2 协议分析 之 GPIO/SPI/I2C/UART 等通迅控制协议带宽消耗计算 一、GPIO 透传带宽消耗计算二、SPI 通迅带宽消耗计算三、I2C 通迅带宽消耗计算四、UART 通迅带宽消耗计算系列文章汇总见:《【SA8295P 源码分析】00 - 系列文章链接汇总》 本文链接…

路由的控制与转发原理

场景1&#xff1a;路由器收到数据包后&#xff0c;会根据数据包的目标IP地址&#xff0c;计算出目标网段&#xff0c;再确定终端设备的具体位置。这个过程中&#xff0c;还需要计算出接口&#xff0c;或数据包下一跳的地址。最终会生成一条路由&#xff0c;即路径&#xff0c;存…

C++笔记-八股

目录 inline关键字内联1. 引入inline关键字的原因2. inline仅是对编译器的建议3. inline函数的定义放在头文件中4. inline与#define的区别 inline关键字内联 1. 引入inline关键字的原因 在c/c中&#xff0c;为了解决一些频繁调用的小函数大量消耗栈空间&#xff08;栈内存&am…

Speech | openSMILE语音特征提取工具

官方地址&#xff1a;openSMILE 3.0 - audEERING 使用指导&#xff1a;openSMILE — openSMILE Documentation (audeering.github.io) openSMILE 简介 openSMILE是一款以命令行形式运行的工具&#xff0c;通过配置config文件来提取音频特征。主要应用于语音识别、情感计算、音…

黔院长 | 中医上所说的虚实到底是什么?

虚实是中医上经常出现的词语&#xff0c;例如脾虚、肾虚等也都是我们经常听到的症状。各种病症的发生都有虚实的不同&#xff0c;那什么是虚实呢&#xff1f;在《黄帝内经》当中就有相关的叙述&#xff1a; 所谓虚实&#xff0c;是正气与邪气相比较而言的。什么是正什么是邪&am…

文章解读与仿真程序复现思路——中国电机工程学报EI\CSCD\北大核心《计及电动汽车需求响应的高速公路服务区光储充鲁棒优化配置》

这个标题涉及到一个关于高速公路服务区的优化配置问题&#xff0c;其中考虑了电动汽车需求响应和光储充的因素。让我们逐步解读这个标题&#xff1a; 高速公路服务区&#xff1a; 涉及到高速公路上的服务区&#xff0c;这是供驾驶员休息、加油、用餐等的地方。 电动汽车需求响…

【工具与中间件】Linux-Docker-Redis

文章目录 0. 前言1. Linux 下 安装 Docker1.1 Docker 基本概念1.2 Linux 安装 Docker1.2.1 安装1.2.2 Hello World 1.3 Docker 常用命令1.3.1 系统启动/暂停/卸载 docker1.3.2 docker 容器的增/删/停/查看状态1.3.3 小结 1.4 Docker 可视化工具推荐 2. Docker 下 安装 Redis2.1…

上海亚商投顾:北证50指数大涨 机器人概念股掀涨停潮

上海亚商投顾前言&#xff1a;无惧大盘涨跌&#xff0c;解密龙虎榜资金&#xff0c;跟踪一线游资和机构资金动向&#xff0c;识别短期热点和强势个股。 一.市场情绪 三大指数昨日震荡反弹&#xff0c;黄白二线有所分化&#xff0c;题材热点轮动表现。北证50指数大涨超3%&#…

11 redis中分布式锁的实现

单机锁代码 import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicReference; import java.util.concurrent.locks.Condition; import java.util.concurrent.locks.Lock; import java.util.con…

前端国内镜像环境安装网址

git https://registry.npmmirror.com/binary.html?pathgit-for-windows/ 2.42.0 node 中文官方地址: http://nodejs.cn/download/ 阿里云镜像地址为: https://npm.taobao.org/mirrors/node/v14.6.0/

el-table 表格表头、单元格、滚动条样式修改

.2023.11.21今天我学习了如何对el-table表格样式进行修改&#xff0c;如图&#xff1a; 运用的两个样式主要是 1.header-cell-class-name&#xff08;设置表头&#xff09; 2.class-name&#xff08;设置行单元格&#xff09; 代码如下&#xff1a; <el-table :data&quo…

主播产品话术

以电子产品为例 一、产品特点 1.高效性能:这款产品采用了最先进的技术&#xff0c;确保高效运行&#xff0c;让你的工作更加流畅。 2.便捷操作:设计简洁&#xff0c;操作方便&#xff0c;即使是不熟悉电子产品的人也能轻松上手。 3.时尚外观:多种颜色可选&#xff0c;满足你…