电子发烧友App

硬声App

0
  • 聊天消息
  • 系统消息
  • 评论与回复
登录后你可以
  • 下载海量资料
  • 学习在线课程
  • 观看技术视频
  • 写文章/发帖/加入社区
创作中心

完善资料让更多小伙伴认识你,还能领取20积分哦,立即完善>

3天内不再提示
电子发烧友网>电子资料下载>电子资料>FastCFS基于块存储的通用分布式文件系统

FastCFS基于块存储的通用分布式文件系统

2022-06-17 | zip | 0.66 MB | 次下载 | 免费

资料介绍

授权协议 AGPL-3.0
开发语言 C/C++
操作系统 跨平台
软件类型 开源软件
所属分类 大数据数据存储

软件简介

FastCFS 是一款基于块存储的通用分布式文件系统,可以作为MySQL、PostgresSQL、Oracle等数据库和云平台的后端存储。

支持的操作系统

  • Linux: Kernel version >= 3.10 (完全支持)
  • MacOS or FreeBSD (仅支持服务端,不支持FUSE)

依赖

安装

libfuse可以采用脚本libfuse_setup.sh一键编译和安装。

libfastcommon、libserverframe、fastDIR、faststore和FastCFS 五个安装包可采用 fastcfs.sh 脚本统一安装配置,也可以按照5.1 - 5.6部分独立安装配置。

统一安装方式

git clone https://github.com/happyfish100/FastCFS.git; cd FastCFS/

通过执行fastcfs.sh脚本,可自动从github仓库拉取或更新五个仓库代码,按照依赖顺序进行编译、安装,并能根据配置文件模版自动生成集群相关配置文件。

fastcfs.sh 命令参数说明:

  • pull -- 从github拉取或更新代码库(拉取到本地build目录)
  • makeinstall -- 顺序编译、安装代码库(make && make install)
  • init -- 初始化集群目录、配置文件(已存在不会重新生成)
  • clean -- 清除已编译程序文件(相当于make clean)

一键搭建(包括部署和运行)demo环境(需要root身份执行):

./helloWorld.sh --prefix=/usr/local/fastcfs-test

或执行如下命令(需要root身份执行):

./libfuse_setup.sh
./fastcfs.sh pull
./fastcfs.sh makeinstall
IP=$(ifconfig -a | grep -w inet | grep -v 127.0.0.1 | awk '{print $2}' | tr -d 'addr:' | head -n 1)
./fastcfs.sh init \
	--dir-path=/usr/local/fastcfs-test/fastdir \
	--dir-server-count=1 \
	--dir-host=$IP  \
	--dir-cluster-port=11011 \
	--dir-service-port=21011 \
	--dir-bind-addr=  \
	--store-path=/usr/local/fastcfs-test/faststore \
	--store-server-count=1 \
	--store-host=$IP  \
	--store-cluster-port=31011 \
	--store-service-port=41011 \
	--store-replica-port=51011 \
	--store-bind-addr= \
	--fuse-path=/usr/local/fastcfs-test/fuse \
	--fuse-mount-point=/usr/local/fastcfs-test/fuse/fuse1

注:--fuse-mount-point为mount到本地的路径,通过这个mount point对FastCFS进行文件存取访问。

FCFS_SHELL_PATH=$(pwd)/build/shell
$FCFS_SHELL_PATH/fastdir-cluster.sh restart
$FCFS_SHELL_PATH/faststore-cluster.sh restart
$FCFS_SHELL_PATH/fuse.sh restart

上述操作完成后,通过命令 df -h 可以看到FastCFS挂载的文件目录。

libfastcommon

git clone https://github.com/happyfish100/libfastcommon.git; cd libfastcommon/
git checkout master
./make.sh clean && ./make.sh && ./make.sh install

默认安装目录:

/usr/lib64
/usr/lib
/usr/include/fastcommon

libserverframe

git clone https://github.com/happyfish100/libserverframe.git; cd libserverframe/
./make.sh clean && ./make.sh && ./make.sh install

fastDIR

git clone https://github.com/happyfish100/fastDIR.git; cd fastDIR/
./make.sh clean && ./make.sh && ./make.sh install

faststore

git clone https://github.com/happyfish100/faststore.git; cd faststore/
./make.sh clean && ./make.sh && ./make.sh install
mkdir /etc/fstore/
cp conf/server.conf conf/client.conf conf/servers.conf conf/cluster.conf conf/storage.conf /etc/fstore/

libfuse

构建libfuse需要先安装meson和ninja。安装meson和ninja需要python3.5及以上版本。

python安装

包名:python3 python3-pip

Ubuntu下安装命令:

apt install python3 python3-pip -y

CentOS下安装命令:

yum install python3 python3-pip -y

meson 和 ninja 安装

pip3 install meson
pip3 install ninja

gcc安装

Ubuntu下安装命令:

apt install gcc g++ -y

CentOS下安装命令:

yum install gcc gcc-c++ -y

libfuse安装

git clone https://github.com/libfuse/libfuse.git
cd libfuse/
git checkout fuse-3.10.1
mkdir build/; cd build/
meson ..
meson configure -D prefix=/usr
meson configure -D examples=false
ninja && ninja install
sed -i 's/#user_allow_other/user_allow_other/g' /etc/fuse.conf

FastCFS

git clone https://github.com/happyfish100/FastCFS.git; cd FastCFS/
./make.sh clean && ./make.sh && ./make.sh install
mkdir /etc/fcfs/
cp conf/fuse.conf /etc/fcfs/

配置

为了更好地控制FastCFS的性能,我们通过各种设置参数为FastCFS提供了高度可配置和可调节的行为。

FastCFS的配置由多个子文件组成,其中一个是入口文件,其他文件用于引用。目录/etc/fstore 是FastCFS配置文件的默认存放位置,但是在单个服务器上安装多个FastCFS实例时,必须为每个实例指定不同的位置。

FastCFS有以下几个配置文件:

  • server.conf - 服务器全局参数配置
  • cluster.conf - 集群参数配置
  • servers.conf - 服务器组参数配置
  • storage.conf - 存储参数配置
  • client.conf - 客户端使用的配置文件,需引用cluster.conf
 

下载该资料的人也在下载 下载该资料的人还在阅读
更多 >

评论

查看更多

下载排行

本周

  1. 1山景DSP芯片AP8248A2数据手册
  2. 1.06 MB  |  532次下载  |  免费
  3. 2RK3399完整板原理图(支持平板,盒子VR)
  4. 3.28 MB  |  339次下载  |  免费
  5. 3TC358743XBG评估板参考手册
  6. 1.36 MB  |  330次下载  |  免费
  7. 4DFM软件使用教程
  8. 0.84 MB  |  295次下载  |  免费
  9. 5元宇宙深度解析—未来的未来-风口还是泡沫
  10. 6.40 MB  |  227次下载  |  免费
  11. 6迪文DGUS开发指南
  12. 31.67 MB  |  194次下载  |  免费
  13. 7元宇宙底层硬件系列报告
  14. 13.42 MB  |  182次下载  |  免费
  15. 8FP5207XR-G1中文应用手册
  16. 1.09 MB  |  178次下载  |  免费

本月

  1. 1OrCAD10.5下载OrCAD10.5中文版软件
  2. 0.00 MB  |  234315次下载  |  免费
  3. 2555集成电路应用800例(新编版)
  4. 0.00 MB  |  33566次下载  |  免费
  5. 3接口电路图大全
  6. 未知  |  30323次下载  |  免费
  7. 4开关电源设计实例指南
  8. 未知  |  21549次下载  |  免费
  9. 5电气工程师手册免费下载(新编第二版pdf电子书)
  10. 0.00 MB  |  15349次下载  |  免费
  11. 6数字电路基础pdf(下载)
  12. 未知  |  13750次下载  |  免费
  13. 7电子制作实例集锦 下载
  14. 未知  |  8113次下载  |  免费
  15. 8《LED驱动电路设计》 温德尔著
  16. 0.00 MB  |  6656次下载  |  免费

总榜

  1. 1matlab软件下载入口
  2. 未知  |  935054次下载  |  免费
  3. 2protel99se软件下载(可英文版转中文版)
  4. 78.1 MB  |  537798次下载  |  免费
  5. 3MATLAB 7.1 下载 (含软件介绍)
  6. 未知  |  420027次下载  |  免费
  7. 4OrCAD10.5下载OrCAD10.5中文版软件
  8. 0.00 MB  |  234315次下载  |  免费
  9. 5Altium DXP2002下载入口
  10. 未知  |  233046次下载  |  免费
  11. 6电路仿真软件multisim 10.0免费下载
  12. 340992  |  191187次下载  |  免费
  13. 7十天学会AVR单片机与C语言视频教程 下载
  14. 158M  |  183279次下载  |  免费
  15. 8proe5.0野火版下载(中文版免费下载)
  16. 未知  |  138040次下载  |  免费