当前位置:网站首页>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 表示正常
边栏推荐
- Transaction isolation level gap lock deadlock
- PowerDesigner design name and comment replacement
- HLS4ML报错The board_part definition was not found for tul.com.tw:pynq-z2:part0:1.0.
- 一文读懂C语言中的结构体
- 墨天轮沙龙 | 清华乔嘉林:Apache IoTDB,源于清华,建设开源生态之路
- torch. nn. functional. Interpolate function
- Is Dao safe? Build finance encountered a malicious governance takeover and was looted!
- Simplified pinduoduo product data
- 【AI服务器搭建】CUDA环境
- MySQL reports an error can't create table 'demo01 tb_ Student‘ (errno: 150)*
猜你喜欢

How to configure webrtc video streaming format for easygbs, a new version of national standard gb28181 video platform?

STC 32位8051单片机开发实例教程 三 程序编译设置与下载

Hls4ml reports an error the board_ part definition was not found for tul. com. tw:pynq-z2:part0:1.0.

AAAI2020: Real-time Scene Text Detection with Differentiable Binarization

【AI服务器搭建】CUDA环境

Technology T3 domestic platform! Successfully equipped with "Yihui domestic real-time system sylixos"

开发那些事儿:EasyCVR平台添加播放地址鉴权功能

Detailed configuration of network security "Splunk" in national vocational college skills competition

STC 32位8051单片机开发实例教程 二 I/O工作模式及其配置

Interview questions shared in today's group
随机推荐
torch. nn. functional. Interpolate function
Wechat applet navigator has a shadow after clicking. Remove the shadow effect of navigator
list分割成满足和不满足条件的集合(partitioningBy)
Mo Tianlun salon | Tsinghua qiaojialin: Apache iotdb, originated from Tsinghua, builds an open source ecological road
Hls4ml/vivado HLS error reporting solution
Uni app product classification
mysql 报错 Can‘t create table ‘demo01.tb_Student‘ (errno: 150)*
Graduation season | Huawei experts teach the interview secret: how to get a high paying offer from a large factory?
开发那些事儿:EasyCVR平台添加播放地址鉴权功能
产品模块化设计的前世今生
Class loading mechanism
Collect Tiktok video
Interview question 1
Source code series of authentic children -inheritablethreadlocal (line by line source code takes you to analyze the author's ideas)
Use of common built-in classes of JS
Servlet knowledge points
MySQL signale une erreur can 't create table' demo01. TB Étudiant '(errno: 150)
DS Transunet:用于医学图像分割的双Swin-Transformer U-Net
毕业季 | 华为专家亲授面试秘诀:如何拿到大厂高薪offer?
How can a programmer grow rapidly