Deploying the Mgmtd Service
This section describes how to deploy Mgmtd on the Meta node.
- Obtain the binary file and configuration file from the compilation server.
mkdir -p /var/log/3fs mkdir -p /opt/3fs/{bin,etc} rsync -avz meta:/home/3fs/build/bin/mgmtd_main /opt/3fs/bin rsync -avz meta:/home/3fs/configs/{mgmtd_main.toml,mgmtd_main_launcher.toml,mgmtd_main_app.toml} /opt/3fs/etc rsync -avz meta:/home/3fs/deploy/systemd/mgmtd_main.service /usr/lib/systemd/system - Modify the mgmtd_main_app.toml configuration file.
- Open /opt/3fs/etc/mgmtd_main_app.toml.
vim /opt/3fs/etc/mgmtd_main_app.toml
- Press i to enter the insert mode and modify the configuration file as follows.
allow_empty_node_id = true node_id = 1 # Change the node ID to 1.
- Press Esc to exit the insert mode. Type :wq! and press Enter to save the file and exit.
- Open /opt/3fs/etc/mgmtd_main_app.toml.
- Modify the mgmtd_main_launcher.toml configuration file.
- Open /opt/3fs/etc/mgmtd_main_launcher.toml.
vim /opt/3fs/etc/mgmtd_main_launcher.toml
- Press i to enter the insert mode and modify the configuration file as follows.
... cluster_id = "stage" ... [fdb] clusterFile = '/opt/3fs/etc/fdb.cluster' ...
- Press Esc to exit the insert mode. Type :wq! and press Enter to save the file and exit.
- Open /opt/3fs/etc/mgmtd_main_launcher.toml.
- Modify the mgmtd_main.toml configuration file.
- Open /opt/3fs/etc/mgmtd_main.toml.
vim /opt/3fs/etc/mgmtd_main.toml
- Press i to enter the insert mode and modify the configuration file as follows.
... [server.base.groups.listener] filter_list = ['enp1s0f0np0'] # Enter the RDMA NIC name. ... [server.base.groups.listener] filter_list = ['enp1s0f0np0'] # Enter the RDMA NIC name. ... [common.monitor.reporters.monitor_collector] remote_ip = "192.168.65.10:10000" # IP address and port of the monitor_collector node ...
- Press Esc to exit the insert mode. Type :wq! and press Enter to save the file and exit.
- Open /opt/3fs/etc/mgmtd_main.toml.
- Initialize the cluster.
/opt/3fs/bin/admin_cli -cfg /opt/3fs/etc/admin_cli.toml "init-cluster --mgmtd /opt/3fs/etc/mgmtd_main.toml 1 1048576 16"
Command output:
# Init filesystem, root directory layout: chain table ChainTableId(1), chunksize 1048576, stripesize 16 # Init config for MGMTD version 1
- Start the service.
systemctl start mgmtd_main
- Check the service status.
systemctl status mgmtd_main

- Check the port status.
ss -tuln
Command output:
# Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port Process # ... # tcp LISTEN 0 4096 192.168.65.10:8000 0.0.0.0:* # tcp LISTEN 0 4096 192.168.65.10:9000 0.0.0.0:* # ...
- List nodes in the cluster.
/opt/3fs/bin/admin_cli -cfg /opt/3fs/etc/admin_cli.toml "list-nodes"
Command output:
# Id Type Status Hostname Pid Tags LastHeartbeatTime ConfigVersion ReleaseVersion # 1 MGMTD PRIMARY_MGMTD meta 2281735 [] N/A 1(UPTODATE) 250228-dev-1-999999-923bdd7c
Parent topic: Installing Components and Deploying the Meta Node