FastDFS迁移步骤

FastDFS迁移步骤

1.在新的机器上安装FastDFS

2.将新的storage接到老的tracker机器上,用来同步数据(/usr/local/fastdfs/bin/fdfs_storaged)

数据同步完成后,需要将新的storage连接到新的tracker中

1.停止storage进程

2.修改storage配置文件

vi /etc/fdfs/storage.conf

将tracker_server的IP设置成新服务器IP192.168.xxx.xxx

tracker_server=192.168.xxx.xxx:22122

3.调整storage的文件列表(/file/storage/fastdfs/data/)

storage server需要调整的文件列表:

data/.data_init_flag(将sync_src_server配置项留空,其它配置项不变)

data/sync/<span id="MathJax-Span-2" class="noError">{ip_addr}_<span class="MJX_Assistive_MathML">{ip_addr}_{port}.mark:此类文件,需要将文件名中的IP地址调整过来

4.启动进程 5.监控进程状态(状态为ACTIVE表示正常)

/usr/local/fastdfs/bin/fdfs_monitor /etc/fdfs/storage.conf

 

storage状态列表:

# FDFS_STORAGE_STATUS:INIT :初始化,尚未得到同步已有数据的源服务器

# FDFS_STORAGE_STATUS:WAIT_SYNC :等待同步,已得到同步已有数据的源服务器

# FDFS_STORAGE_STATUS:SYNCING :同步中

# FDFS_STORAGE_STATUS:DELETED :已删除,该服务器从本组中摘除

# FDFS_STORAGE_STATUS:OFFLINE :离线

# FDFS_STORAGE_STATUS:ONLINE :在线,尚不能提供服务

# FDFS_STORAGE_STATUS:ACTIVE :在线,可以提供服务

 

来源:https://www.cnblogs.com/aresxin/p/4952600.html

 

posted @ 2023-03-28 09:32  逆风飞翔的博客  阅读(80)  评论(0)    收藏  举报