Command-line Interface
The zebclient
binary provides several administrative commands through its command-line interface.
Most commands require a functioning ZebClient configuration. By default, the configuration is picked up from environment variables in the process environment. The environment variables can also be loaded from a file specified with command-line option --env-file
.
Agent variables use the ZM
prefix and the DRPC server variables use ZB
.
Multiple configurations for more than one ZebClient instance can coexist in the same environment or environment file. These configurations are distinguished by a subprefix or "configuration name". For example, an environment file containing configurations for one agent and two DRPC servers might use variable prefixes ZM_AGENT
, ZB_SERVER0
, and ZB_SERVER1
. All commands that require a functioning configuration accept the configuration name (e.g., AGENT
, or SERVER0
) as the first argument on the command-line in order to find the correct configuration.
Generic Commands
The following commands are available both on agent nodes and DRPC server nodes.
zebclient config
zebclient config
The zebclient config
command outputs a comprehensive configuration variable reference in table format. This command does not require a functioning configuration. Example:
Agent-only Commands
The following commands are exclusive to agent nodes.
zebclient gc
zebclient gc
The zebclient gc
command can detect and delete leaked objects i.e. shards that aren't referenced by the metadata database. This situation may occur, for instance, after restoring a metadata database backup. The system will function as normal however there will be data in the cold bucket that will never be accessed. Use the zebclient gc
command to free up this space.
This command requires a functioning configuration. Example:
Currently zebclient gc
only supports direct mode and K+M=1+0.
zebclient fsck
zebclient fsck
The zebclient fsck
(file system check) command detects broken inodes i.e. files that are missing ZCFS blocks. This situation can occur if multiple warm nodes are lost before clearing their upload queues. This command requires a functioning configuration.
In the example below, inode number 6 linked by path /abc
is missing data:
Note that zebclient fsck
refuses to run by default if agents are mounted. Use --force
to override.
Currently zebclient fsck
only supports direct mode and K+M=1+0.
zebclient inlet
zebclient inlet
The zebclient inlet
command manages inlets (external, read-only S3 buckets mounted within the ZCFS file system). There are three subcommands:
All subcommands require a functioning configuration.
zebclient inlet add
zebclient inlet add
The zebclient inlet add
command mounts an external S3 bucket to a path within the ZCFS file system i.e. the contents of the bucket will be visible as (read-only) directories and files under the ZCFS mount point. All external data is retrieved on-demand, both metadata and file data. Example:
Explanation of the command-line options:
--inletname
is just an identifier for the inlet. It is only needed when usingzebclient inlet remove
.--inode
is the inode number of the parent directory where the external bucket should be mounted. Use1
for the root directory of the ZCFS file system. Usestat -c '%i' /zcfs/some/path
to retrieve the inode number of subdirectories.--dirname
is the name of the inlet directory i.e. the directory representing the external bucket. If missing, the directory will be created (under the--inode
parent directory).--dirmode
is the permission of the directories under the inlet directory i.e. the directories representing the folder objects in the bucket.--filemode
is the permission of the files under the inlet directory i.e. the files representing the objects in the bucket.--uid
is the owner of the files and directories under the inlet directory.--gid
is the group of the files and directories under the inlet directory.--protocol
is the bucket protocol. Currently onlys3
is supported.--uri
is the bucket endpoint.--region
is the bucket region.--bucket
is the name of the external bucket.--accesskey
is the access key used to access the external bucket.--secretkey
is the secret key used to access the external bucket.
zebclient inlet list
zebclient inlet list
The zebclient inlet list
command lists registered inlets. Example:
zebclient inlet remove
zebclient inlet remove
The zebclient inlet list
command removes a previously registered inlet. Example:
zebclient license
zebclient license
The zebclient license
command manages the ZebClient license. There are three subcommands:
All subcommands require a functioning configuration.
zebclient license install
zebclient license install
The zebclient license install
subcommand loads a ZebClient license file into the database. Example:
Note that, as long a license file is loaded into the database, the ZM_AGENT_LICENSE_KEY
environment variable is ignored.
There is no need to restart the agents after installing a license file. Any running agents will automatically detect the new license.
zebclient license status
zebclient license status
The zebclient license install
subcommand outputs the license information of the system. When using an offline license, the license properties are displayed as well. Example:
When using an online license, the zebclient license status
command currently just verifies that the license key itself is correctly formatted. The license status is not validated with the license server. Example:
zebclient license uninstall
zebclient license uninstall
The zebclient license uninstall
subcommand removes any license loaded into the database. Example:
zebclient memlimit
zebclient memlimit
The zebclient memlimit
command displays how much memory a certain agent configuration requires.
zebclient mount
zebclient mount
The zebclient mount
command starts the agent service which mounts the ZCFS file system. It is normally executed by systemd
, see /etc/systemd/system/zebclient-agent.service
. This command requires a functioning configuration. Example:
zebclient stat
zebclient stat
The zebclient stat
command outputs detailed slice information for inodes. This command requires a functioning configuration.
In following example we show the slice information for inode number 5:
The inode number for a file can be retrieved with e.g. the standard stat
command.
zebclient stats
zebclient stats
The zebclient stats
command outputs real-time performance statistics for an agent mount point. Example:
zebclient status
zebclient status
The zebclient status
command reports the backend status. This command requires a functioning configuration. Example:
DRPC Server-only Commands
The following commands are exclusive to DRPC server nodes.
zebclient store
zebclient store
The zebclient store
command starts the DRPC block store service which serves shards to the agents. It is normally executed by systemd
, see /etc/systemd/system/zebclient-server*.service
. This command requires a functioning configuration. Example:
zebclient verify-shards
zebclient verify-shards
The zebclient verify-shards
command can be executed on the DRPC server nodes in order to verify the integrity of the local shards. This command requires a functioning configuration. Example:
Provide command-line flags --only-failing
and --only-name
for an output that is suitable for piping to e.g. xargs rm
.
Last updated