Rate This Document
Findability
Accuracy
Completeness
Readability

Deploying the Mgmtd Service

This section describes how to deploy Mgmtd on the Meta node.

  1. 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
  2. Modify the mgmtd_main_app.toml configuration file.
    1. Open /opt/3fs/etc/mgmtd_main_app.toml.
      vim /opt/3fs/etc/mgmtd_main_app.toml 
    2. 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.
    3. Press Esc to exit the insert mode. Type :wq! and press Enter to save the file and exit.
  3. Modify the mgmtd_main_launcher.toml configuration file.
    1. Open /opt/3fs/etc/mgmtd_main_launcher.toml.
      vim /opt/3fs/etc/mgmtd_main_launcher.toml
    2. Press i to enter the insert mode and modify the configuration file as follows.
      ... 
      cluster_id = "stage" 
      ...
      [fdb] 
      clusterFile = '/opt/3fs/etc/fdb.cluster' 
      ...
    3. Press Esc to exit the insert mode. Type :wq! and press Enter to save the file and exit.
  4. Modify the mgmtd_main.toml configuration file.
    1. Open /opt/3fs/etc/mgmtd_main.toml.
      vim /opt/3fs/etc/mgmtd_main.toml
    2. 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
      ...
    3. Press Esc to exit the insert mode. Type :wq! and press Enter to save the file and exit.
  5. 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
  6. Start the service.
    systemctl start mgmtd_main
  7. Check the service status.
    systemctl status mgmtd_main

  8. 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:* 
    # ...
  9. 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