1. Install the FASTDFS on the new machine
2. Connect the new storage to the old tracker machine to synchronize the data (/usr/local/fastdfs/bin/fdfs_storaged)
After data synchronization is complete, you need to connect the new storage to the new tracker
1. Stop the storage process
2. Modify the storage configuration file
Vi/etc/fdfs/storage.conf
Set Tracker_server IP to a new server ip192.168.xxx.xxx
tracker_server=192.168.xxx.xxx:22122
3. Adjust the storage file list (/file/storage/fastdfs/data/)
Storage server needs to adjust the list of files:
Data/.data_init_flag (Leave the Sync_src_server configuration item blank, other configuration items will not change)
Data/sync/${ip_addr}_${port}.mark: This type of file, you need to adjust the IP address in the file name.
4. Start the process 5. Monitor the status of the process (status is active for normal)
/usr/local/fastdfs/bin/fdfs_monitor/etc/fdfs/storage.conf
Storage Status list:
# Fdfs_storage_status:init: Initialization, not yet available source server for synchronizing existing data
# Fdfs_storage_status:wait_sync: Waiting for synchronization, the source server has been synchronized with the existing data
# fdfs_storage_status:syncing: In sync
# fdfs_storage_status:deleted: Deleted, the server is removed from this group
# Fdfs_storage_status:offline: Offline
# Fdfs_storage_status:online: Online, no service available
# fdfs_storage_status:active: Online, can provide service
Fastdfs Migration Steps