leofs-adm Command LineΒΆ

leofs-adm makes administrative operations of LeoFS very easy.

Shell Description
General Commands
leofs-adm status [<node>]
  • Retrieve status of every node (default)
  • Retrieve status of the specified node
leofs-adm whereis <file-path>
  • Retrieve an assigned object by the file-path
LeoFS Storage Cluster Operation
leofs-adm detach <storage-node>
  • Remove the storage node in the LeoFS storage cluster
  • Current status: running | stop
leofs-adm suspend <storage-node>
  • Suspend a storage node for maintenance
  • This command does NOT detach the node from the storage cluster
  • While suspending, it rejects any requests
  • Current status: running
leofs-adm resume <storage-node>
  • Resume a storage node for finished maintenance
  • Current status: suspended | restarted
leofs-adm start
  • Start LeoFS after distributing the RING from LeoFS Manager to LeoFS Storage and LeoFS Gateway
leofs-adm rebalance
  • Commit detached and attached nodes to join the cluster
  • Rebalance objects in the cluster based on the updated cluster topology
LeoFS Storage MQ Operation [1.2.0-]
leofs-adm mq-stats <storage-node>
  • See the statuses of message queues used in LeoFS Storage
leofs-adm mq-suspend <storage-node> <mq-id>
  • Suspend a process consuming a message queue
  • Active message queues only can be suspended
  • While suspending, no messages are consumed
leofs-adm mq-resume <storage-node> <mq-id>
  • Resume a process consuming a message queue
Recover Commands
leofs-adm recover-file <file-path>
  • Recover an inconsistent object specified by the file-path
leofs-adm recover-node <storage-node>
  • Recover all inconsistent objects in the specified node
leofs-adm recover-ring <storage-node>
  • Recover rings of the specified node
leofs-adm recover-cluster <cluster-id>
  • v1.0.0- Recover all inconsistent objects in the specified cluster
Data Compaction Commands
leofs-adm compact-start <storage-node> (all|<num-of-targets>) [<num-of-compaction-proc>]
  • Remove unnecessary objects from the node
  • num-of-targets: It controls the number of containers in parallel
  • num-of-compaction-procs: It controls the number of procs to execute the compaction in parallel
leofs-adm compact-suspend <storage-node>
  • Suspend the compaction
leofs-adm compact-resume <storage-node>
  • Resume the compaction
leofs-adm compact-status <storage-node>
  • See the current compaction status
  • Compaction’s status: idle, running, suspend
leofs-adm diagnose-start <storage-node>
  • v1.1.5- Diagnose data of a target storage node
Disk Usage
leofs-adm du <storage-node>
  • See the current disk usages
leofs-adm du detail <storage-node>
  • See the current disk usages in the details
LeoFS Gateway Operation
leofs-adm purge-cache <file-path>
  • Remove the cache from each LeoFS gateway
leofs-adm remove-gateway <gateway-node>
  • Remove the LeoFS Gateway node, which is already stopped
LeoFS Manager Maintenance
leofs-adm backup-mnesia <backup-filepath>
  • Copy LeoFS’s Manager data to the filepath
leofs-adm restore-mnesia <backup-filepath>
  • Restore LeoFS’s Manager data from the backup file
leofs-adm update-managers <manager-master> <manager-slave>
  • Update LeoFS Manager nodes
  • Destribute the new LeoFS Manager nodes to LeoFS Storage and Gateway
leofs-adm dump-ring (<manager-node>|<storage-node>|<gateway-node>)
  • Dump the ring data to the local disk
S3-API Commands - User
leofs-adm create-user <user-id> <password>
  • Register the new user
  • Generate an S3 key pair (AccessKeyID and SecretAccessKey)
leofs-adm delete-user <user-id>
  • Remove the user
leofs-adm get-users
  • Retrieve the list of users
leofs-adm update-user-role
  • Update the user’s role
  • Currently, we are supporting two kinds of roles
  • 1: General user, 9: Administrator
S3-API Commands - Endpoint
leofs-adm add-endpoint <endpoint>
  • Register a new S3 Endpoint
  • LeoFS’ domains are ruled by this rule
leofs-adm delete-endpoint <endpoint>
  • Remove the endpoint
leofs-adm get-endpoints
  • Retrieve the list of endpoints
S3-API Commands - Bucket
leofs-adm add-bucket <bucket> <access-key-id>
  • Create the new bucket
leofs-adm delete-bucket <bucket> <access-key-id>
  • Remove the bucket and all files stored in the bucket
leofs-adm get-buckets
  • Retrieve the list of the buckets registered
leofs-adm get-bucket <access-key-id>
  • Retrieve the list of the buckets owned by the specified user
leofs-adm chown-bucket <bucket> <access-key-id>
  • v0.16.5- Change the owner of the bucket
leofs-adm update-acl <bucket> <access-key-id> (private | public-read | public-read-write)
  • v0.16.0- Update the ACL (Access Control List) for the bucket
  • Available ACL list:
    • private (default) : No one except the owner has access rights
    • public-read : All users have READ access
    • public-read-write : All users have READ and WRITE access
Multi Data Center Operation
leofs-adm join-cluster <manager-master> <manager-slave> 1.0.0- Begin to communicate between the local cluster and the remote cluster
leofs-adm remove-cluster <manager-master> <manager-slave> 1.0.0- Terminate to communicate between the local cluster and the remote cluster
leofs-adm cluster-status 1.0.0- See the current state of cluster(s)