当前位置:网站首页>fastDFS入门
fastDFS入门
2022-07-01 18:48:00 【傻瓜搬砖人】
分布式文件系统
文件系统的全部,分散存储在多台主机上,形成一个完整的文件系统。
分布式文件系统基本结构
管理机 可以存储数据 也可以不存储数据
fastDFS 概述
c语言编写的一款开源分布式文件系统
fastDFS特点
1.应用层级的文件系统
2.不能挂载,就是 不能 mount 操作
fastDFS三个角色以及它们之间的关系
角色:
1. 追踪器 - tracker
2. 存储节点 - storage
3. 客户端 - client
关系:
1. client 和 storage 主动连接Tracker
2. storage 主动向 tracker 报告 状态信息
磁盘剩余情况、文件同步状况、文件上传下载次数
3.Storage 会启动 一个单独线程 对 Tracker 的连接和定时报告
3. 一个组包含的storage 不是通过配置文件设定,通过tracker 获取的
fastDFS扩容
1.横向扩容
增加容量
增加group组
2. 纵向扩容
数据备份
当前租的最大容量(存储节点中容量最小的那个)
所有存储节点组名必须相同
fastDFS 安装
- 安装
# 基础库包
# libfastcommon-1.36.zip
./make.sh
sudo ./make.sh install
# fastDFS
# fastdfs-5.10.tar.gz
./make.sh
sudo ./make.sh install
- 测试是否安装成功
fdfs_test
fastDF配置
# 1. 默认配置文件位置
# /etc/fdfs
#2. Tracker(追踪器)
# 修改配置文件
bind_addr=192.168.82.253 #当前主机ip
port=22122 # 绑定的端口
base_path=/home/root/fastDFS/tracker # log目录
# 启动Tracker 服务
fdfs_trackerd /etc/fdfs/tracker.conf
sudo fdfs_trackerd /etc/fdfs/tracker.conf restart
sudo fdfs_trackerd /etc/fdfs/tracker.conf stop
#3.stroage(存储节点)
# 修改配置文件
group_name=group1 # 存储节点所属的组
bind_addr=192.168.82.253 # 存储节点绑定的ip
port=23000 # 绑定的端口
base_path=/home/root/fastDFS/storage # 存储目录的个数
store_path0=/home/root/fastDFS/storage # 配置具体的存储目录
tracker_server=192.168.82.252:22122 # 连接tracker 的时候使用的ip和端口
# 启动storage 服务
fdfs_storaged /etc/fdfs/storage.conf
sudo fdfs_storaged /ect/fdfs/storage.conf restart
sudo fdfs_storaged /etc/fdfs/storage.conf stop
#4. Client
base_path=/home/root/fastDFS/client # log 日志目录
tracker_server=192.168.82.253:22122 # 连接tracker 时候需要ip和端口信
# 检测当前fdfs 环境是否通
fdfs_monitor /etc/fdfs/client.conf # 出现 active 表示正常
边栏推荐
猜你喜欢
How to correctly use vertx to operate redis (3.9.4 with source code analysis)
SQL getting started plan-1-select
Modsim basic use (Modbus simulator)
[research materials] iResearch tide Watching: seven major trends in the clothing industry - Download attached
【AI服务器搭建】CUDA环境
JVM memory model
全国职业院校技能大赛网络安全“splunk“详细配置
Process steps of vibrating wire acquisition module for measuring vibrating wire sensor
对象的创建
Shell advanced
随机推荐
[untitled]
Botu V16 obtains the system time and converts it into a string
A quietly rising domestic software, low-key and powerful!
Image acquisition and playback of coaxpress high speed camera based on pxie interface
Wechat applet realizes keyword highlighting
JS proxy
全国职业院校技能大赛网络安全“splunk“详细配置
[research data] observation on the differences of health preservation concepts among people in 2022 - Download attached
Mysql查询结果去除换行
Interesting! Database is also serverless!
Bind this of the current scope for callback functions in other cases such as timers and delayers
Example explanation: move graph explorer to jupyterlab
Regular expression =regex=regular expression
Process steps of vibrating wire acquisition module for measuring vibrating wire sensor
Easycvr accesses the equipment through the national standard gb28181 protocol. What is the reason for the automatic streaming of the equipment?
Basic use of MySQL
Wechat applet navigator has a shadow after clicking. Remove the shadow effect of navigator
【let var const】
Redis installation and startup in Windows environment (background startup)
qobject_cast用法