评论删除后,数据将无法恢复
FastCFS 是一款基于块存储的通用分布式文件系统,可以作为MySQL、PostgresSQL、Oracle等数据库和云平台的后端存储。
支持的操作系统
- Linux: Kernel version >= 3.10 (完全支持)
- MacOS or FreeBSD (仅支持服务端,不支持FUSE)
依赖
- libfuse (版本 3.9.4 或更高版本)
- libfastcommon (tag: V1.0.45)
- libserverframe (tag: V1.1.1)
- fastDIR (tag: V1.1.0)
- faststore (tag: V1.1.0)
- FastCFS (tag: V1.1.0)
安装
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
分布式文件系统 FastCFS 里程碑版本 V3.3 发布
经过一个半月的紧张研发和测试,FastCFS V3.3如期发布了。V3.3是一个里程碑版本,正常重启和kill -9强杀,系统的稳定性和数据一致性,均得到了充分测试和保障。V3.3主要改进为: 1. [fstore...
FastCFS V3.2.0 发布,全面支持 POSIX API
经过一个半月的研发和测试,FastCFS V3.2.0和大家见面了。这个版本主要改进: 1. 提供诸如 open/fopen、write/fwrite、read/fread、close/fclose、readv、writev 等全套POSIX API,应用程序可...
高性能分布式文件系统 FastCFS V3.1 发布
V3.1主要对核心组件FastDIR进行改进,实现了LRU淘汰算法,以有限内存支持海量文件。 分布式目录服务FastDIR的淘汰算法具有两大特性: 1. 按目录结构淘汰:先淘汰子节点,然后淘汰父节点; 2....
高性能分布式文件系统 FastCFS V3.0 发布
经过整整5个月的潜心研发,FastCFS v3.0终于发布了。FastCFS 3.0 主要改进:核心组件FastDIR通过插件方式实现数据存储引擎,采用binlog + 存储引擎插件,按需加载inode数据,单机以有限内存(...
高性能分布式文件系统 FastCFS V2.3.0 发布
FastCFS V2.3.0发布,主要改进如下: 1. auth server以主备方式支持多节点,避免单点; 2. leader/master选举/切换引入超时机制,选举时长可控; 3. 网络通信相关改进: 1)握手失败,serve...
FastCFS V2.2.0 发布,性能全面超越 Ceph!
历经大约一个月的研发,FastCFS V2.2.0 发布,主要改进如下: 1. [fstore] 使用libaio实现异步读,随机读性能提升明显; 2. [fstore] 支持预读机制,顺序读性能提升显著; 3. 修复了3个bug:...
高性能分布式文件系统 FastCFS V2.1.0 发布
FastCFS V2.1.0 发布,主要改进: 1. 程序启动时加载slice索引拆分为两个阶段,均改造成多线程方式,缩短服务就绪时间 2. 服务端程序和fuse客户端支持命令行参数: 1)fuse客户端配合对接K8s...
高性能分布式文件系统 FastCFS V2.0.1 发布
FastCFS V2.0.1发布,主要改进如下: 1. 确保顺序写盘,调用writev实现批量写; 2. 设置线程名称用于性能调优; 3. 将配置文件servers.conf合并到cluster.conf; 4. 修复4个bug: 1)解决磁盘...
FastCFS V1.2.1 发布,基于块存储的通用分布式文件系统
FastCFS V1.2.1 现已发布。FastCFS 是一款基于块存储的通用分布式文件系统,可以作为 MySQL、PostgresSQL、Oracle 等数据库和云平台的后端存储。 官方表示,V1.2.1 版本主要改进内容如下: ...
没有更多内容
加载失败,请刷新页面
没有更多内容

暂无问答
