SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG
DONATE


YUM REPOSITORY

 
 

MAN page from CentOS 7 heketi-client-9.0.0-1.el7.x86_64.rpm

heketi-cli

Section: The heketi Authors (8)
Updated: Heketi command line program
Index 

NAME

heketi-cli - Command line program for Heketi 

SYNOPSIS

heketi-cli [commands] [options] 

DESCRIPTION

Command line program for Heketi 

COMMANDS

 

Cluster Commands

heketi-cli cluster create [--file[=false]] [--block[=false]]

Create a cluster

Options

--file[=false]
Optional:Allow the user to control the possibility of creating regular file volumes on the cluster to be created.This is enabled by default.Use '--file=false' to disable creation of regular file volumes on this cluster.(default true)
--block[=false]
Optional:Allow the user to control the possibility of creating block volumes on the cluster to be created.This is enabled by default.Use '--block=false' to disable creation of block volumes on this cluster.(default true)

Example

$ heketi-cli cluster create --block=false

heketi-cli cluster setflags [--file=true|false] [--block=true|false] <Cluster-ID>

Set file and block flags on a cluster.

Options

--file=true|false
Optional:Allow the user to control the possibility of creating regular file volumes on the cluster.Use '--file=true' to enable and '--file=false' to disable creation of regular file volumes on this cluster.
--block=true|false
Optional:Allow the user to control the possibility of creating block volumes on the cluster.Use '--block=true' to enable and '--block=false' to disable creation of block volumes on this cluster.

Example

$ heketi-cli cluster setflags --block=false 886a86a868711bef83001

heketi-cli cluster delete <CLUSTER-ID>

Delete a cluster

Example

$ heketi-cli cluster delete 886a86a868711bef83001

heketi-cli cluster info <CLUSTER-ID>

Retrieves information about cluster

Example

$ heketi-cli cluster info 886a86a868711bef83001

heketi-cli cluster list

Lists the clusters managed by Heketi

Example

$ heketi-cli cluster list
 

Device Commands

heketi-cli device add --name=<DEVICE-NAME> --node=<NODE-ID>

Add new device to node to be managed by Heketi

Options

--name=""
Name of device to add
--node=""
Id of the node which has this device
--destroy-existing-data
Optional:Destroy existing data on the device (DANGEROUS).

Example

$ heketi-cli device add \    --name=/dev/sdb \    --node=3e098cb4407d7109806bb196d9e8f095

heketi-cli device delete <DEVICE-ID>

Deletes a device from Heketi node

Options

--force-forget
Optional:Remove the device from heketi regardless of it's state on the node (DANGEROUS).

Example

$ heketi-cli device delete 886a86a868711bef83001

heketi-cli device disable <DEVICE-ID>

Disallow usage of a device by placing it offline

Example

$ heketi-cli device disable 886a86a868711bef83001

heketi-cli device enable <DEVICE-ID>

Allows device to go online

Example

$ heketi-cli device enable 886a86a868711bef83001

heketi-cli device info <DEVICE-ID>

Retrieves information about device

Example

$ heketi-cli device info 886a86a868711bef83001

heketi-cli device remove <DEVICE-ID>

Moves a device to removed/failed state, replacing all its bricks by bricks on other devices. This requires the device to be brought to disabled/offline state first.

Example

$ heketi-cli device remove 886a86a868711bef83001

heketi-cli device resync <DEVICE-ID>

Resync storage information about the device with operation system

Example

$ heketi-cli device resync 886a86a868711bef83001

heketi-cli device settags <DEVICE-ID> <TAG>:<VALUE> ...

Set metadata tags on a given device. Tags are free-form key value pairsthat are stored by Heketi and may be used for extra configuration.One or more <TAG>:<TAG-VALUE> pairs may be provided.

Options

--exact
Optional:Overwrite the existing tags with the exactly set of tags (and values)specified on this command line. Without this option, the command willadd or update tags.

Example

$ heketi-cli device settags 886a86a868711bef83001 arbiter:required flavor:strawberry

heketi-cli device rmtags <DEVICE-ID> <TAG> ...

Remove metadata tags from a given device.

Options

--all
Optional:Remove all tags from the specified device. May not be combined withspecifying tag names.

Example

$ heketi-cli device rmtags 886a86a868711bef83001 arbiter
 

Node Commands

heketi-cli node add --zone=<ZONE-NUMBER> --cluster=<CLUSTER-ID> --management-host-name=<MANAGEMENT-HOSTNAME> --storage-host-name=<STORAGE-HOSTNAME>

Add new node to be managed by Heketi

Options

--cluster=""
The cluster in which the node should reside
--management-host-name=""
Management host name
--storage-host-name=""
Storage host name
--zone=-1
The zone in which the node should reside

Example

$ heketi-cli node add \    --zone=3 \    --cluster=3e098cb4407d7109806bb196d9e8f095 \    --management-host-name=node1-manage.gluster.lab.com \    --storage-host-name=node1-storage.gluster.lab.com

heketi-cli node delete <NODE-ID>

Deletes a node from Heketi management

Example

$ heketi-cli node delete 886a86a868711bef83001

heketi-cli node disable <NODE-ID>

Disallow usage of a node by placing it offline

Example

$ heketi-cli node disable 886a86a868711bef83001

heketi-cli node enable <NODE-ID>

Allows node to go online

Example

$ heketi-cli node enable 886a86a868711bef83001

heketi-cli node info <NODE-ID>

Retrieves information about node

Example

$ heketi-cli node info 886a86a868711bef83001

heketi-cli node list

List all nodes in cluster

Example

$ heketi-cli node list

heketi-cli node settags <NODE-ID> <TAG>:<VALUE> ...

Set metadata tags on a given node. Tags are free-form key value pairsthat are stored by Heketi and may be used for extra configuration.One or more <TAG>:<TAG-VALUE> pairs may be provided.

Options

--exact
Optional:Overwrite the existing tags with the exactly set of tags (and values)specified on this command line. Without this option, the command willadd or update tags.

Example

$ heketi-cli node settags 886a86a868711bef83001 arbiter:required flavor:strawberry

heketi-cli node rmtags <NODE-ID> <TAG> ...

Remove metadata tags from a given node.

Options

--all
Optional:Remove all tags from the specified node. May not be combined withspecifying tag names.

Example

$ heketi-cli node rmtags 886a86a868711bef83001 arbiter
 

Setup OpenShift/Kubernetes persistent storage for Heketi

heketi-cli setup-openshift-heketi-storage

Creates a dedicated GlusterFS volume for Heketi.Once the volume is created, a Kubernetes/OpenShiftlist object is created to configure the volume.

Options

--listfile="heketi-storage.json"
Filename to contain list of objects
--listfile="heketi-storage.json"
Filename to contain list of objects
--durability="replicate"
Optional: Durability type.Values are:
none: No durability, for testing with single storage server environments.
replicate: (Default) Replica volume.
--replica=3
Replica value for durability type 'replicate'.Default is 3

Example

$ heketi-cli setup-openshift-heketi-storage

 

Topology Commands

heketi-cli topology load --json=<JSON-FILENAME>

Add devices to Heketi from a configuration file

Options

-j, --json=""
Configuration containing devices, nodes, and clusters, in JSON format

Example

$ heketi-cli topology load --json=topo.json

heketi-cli topology info

Retreives information about the current Topology

Example

$ heketi-cli topology info
 

Volume Commands

heketi-cli volume create --clusters=<CLUSTER-IDS> --disperse-data=<DISPERSION-VALUE> --durability=<TYPE> --name=<VOLUME-NAME> --redundancy=<REDUNDENCY-VALUE> --replica=<REPLICA-VALUE> --size=<VOLUME-SIZE> --snapshot-factor=<SNAPSHOT-FACTOR-VALUE>

Create a GlusterFS volume

Options

--clusters=""
Optional: Comma separated list of cluster ids where this volume must be allocated.If omitted, Heketi will allocate the volume on any of the configured clusters which have the available space.Providing a set of clusters will ensure Heketi allocates storage for this volume only in the clusters specified.
--disperse-data=4
Optional: Dispersion value for durability type 'disperse'.Default is 4
--durability="replicate"
Optional: Durability type.Values are:
none: No durability. Distributed volume only.
replicate: (Default) Distributed-Replica volume.
disperse: Distributed-Erasure Coded volume.
--gid=0
Optional: Initialize volume with the specified group id.Default is 0.
--name=""
Optional: Name of volume. Only set if really necessary
--persistent-volume[=false]
Optional: Output to standard out a persistent volume JSON file for OpenShift orKubernetes with the name provided.
--persistent-volume-endpoint=""
Optional: Endpoint name for the persistent volume
--persistent-volume-file=""
Optional: Create a persistent volume JSON file for OpenShift orKubernetes with the name provided.
--redundancy=2
Optional: Redundancy value for durability type 'disperse'.Default is 2.
--replica=3
Replica value for durability type 'replicate'.Default is 3.
--size=-1
Size of volume in GiB.
--snapshot-factor=1
Optional: Amount of storage to allocate for snapshot support.Must be greater 1.0.For example if a 10TiB volume requires 5TiB of snapshot storage, then snapshot-factor would be set to 1.5.If the value is set to 1, then snapshots will not be enabled for this volume.

Note:The volume size created depends upon the underlying brick size.For example, for a 2 way/3 way replica volume, the minimum volume size is 1GiB as theunderlying minimum brick size is constrained to 1GiB.So, it is not possible create a volume of size less than 1GiB.

Examples

Create a 100GiB replica 3 volume:

$ heketi-cli volume create --size=100

Create a 100GiB replica 3 volume specifying two specific clusters:

$ heketi-cli volume create --size=100 \    --clusters=0995098e1284ddccb46c7752d142c832,60d46d518074b13a04ce1022c8c7193c

Create a 100GiB replica 2 volume with 50GiB of snapshot storage:

$ heketi-cli volume create --size=100 \    --snapshot-factor=1.5 --replica=2

Create a 100GiB distributed volume

$ heketi-cli volume create --size=100 --durability=none

Create a 100GiB erasure coded 4+2 volume with 25GiB snapshot storage:

$ heketi-cli volume create --size=100 --durability=disperse \    --snapshot-factor=1.25

Create a 100GiB erasure coded 8+3 volume with 25GiB snapshot storage:

$ heketi-cli volume create --size=100 --durability=disperse \    --snapshot-factor=1.25 \    --disperse-data=8 --redundancy=3

heketi-cli volume delete <VOLUME-ID>

Deletes the volume

Example

$ heketi-cli volume delete 886a86a868711bef83001

heketi-cli volume expand --expand-size=<SIZE> --volume=<VOLUME-ID>

Expand a volume

Options

--expand=""
Amount in GiB to add to the volume
--volume=""
Id of volume to expand

Example

Add 10GiB to a volume:

$ heketi-cli volume expand --volume=60d46d518074b13a04ce1022c8c7193c    --expand-size=10

heketi-cli volume info <VOLUME-ID>

Retrieves information about volume


 Example

$ heketi-cli volume info 886a86a868711bef83001

heketi-cli volume list

Lists the volumes managed by Heketi

Example

$ heketi-cli volume list

 

GLOBAL OPTIONS

--json[=false]
Print response as JSON
--secret=""
Secret key for specified user.Can also be set using the environment variable HEKETI_CLI_KEY.
-s, --server=""
Heketi server.Can also be set using the environment variable HEKETI_CLI_SERVER.
--user=""
Heketi user.Can also be set using the environment variable HEKETI_CLI_USER.
-v, --version[=false]
Print version.

 

EXAMPLES

 

List Volumes

Specify the Heketi server to contact using an environment variableand list the volumes.

$ export HEKETI_CLI_SERVER=http://localhost:8080$ heketi-cli volume list

 

Create a Volume

Create a 4 GiB volume.

$ heketi-cli volume create --size 4

 

Create an Arbiter Volume

Create a 4 GiB volume that uses the arbiter feature.

$ heketi-cli volume create --size 4 --gluster-volume-options='user.heketi.arbiter true'
 

COPYRIGHT

Copyright (c) 2015-2018 The heketi Authors


 

Index

NAME
SYNOPSIS
DESCRIPTION
COMMANDS
Cluster Commands
Device Commands
Node Commands
Setup OpenShift/Kubernetes persistent storage for Heketi
Topology Commands
Volume Commands
GLOBAL OPTIONS
EXAMPLES
List Volumes
Create a Volume
Create an Arbiter Volume
COPYRIGHT

This document was created byman2html,using the manual pages.