gluster-block - Man Page
Gluster Block Storage Console Manager (command line utility)
Synopsis
gluster-block [timeout <seconds>] <create|list|info|delete|modify|replace|genconfig> <volname[/blockname]> [<args>] [--json*]
Description
The Gluster Block Storage Console Manager(gluster-block) is a CLI utility, which aims at making gluster backed block storage creation and maintenance as simple as possible.
Note that the gluster-blockd daemon is responsible for block management, hence the daemon must be running on all servers.
Commands
create <VOLNAME/NEW-BLOCKNAME> [ha <COUNT>] [auth <enable|disable>] [prealloc <full|no>] [storage <filename>] [ring-buffer <size-in-MB-units>] [block-size <size-in-Byte-units>] [io-timeout <N in Second>] <HOST1[,HOST2,..]> [BYTES]
create block device.
- [ha <COUNT>]
multipath requirement for high availability (default: 1)
- [auth <enable|disable>]
authentication setting (default: disable)
- [prealloc <full|no>]
"full" mode preallocates space by writing zeros to storage (default: full)
- [storage <filename>]
existing file(only name) in the gluster volume, that needs to be linked while creating block (default: creates a new file)
- [ring-buffer <size-in-MB-units>]
kernel ring buffer size for exchanging iSCSI commands, range [1MB - 1024MB] (default: as per kernel)
- [block-size <size-in-Byte-units>]
kernel hw block size, aligns to 512 (default: as per kernel)
- [io-timeout <N in Second>]
time duration for which the tcmu-runner waits to check if the IO from gluster block hosting volume server is responsive. Ideally this value should be kept larger than both IO timeout value (default is 30s) in the iscsi client/initiator side and the gluster ping timeout (default is 42s), (default: 43s)
- <HOST1,[HOST2....]>
servers in the pool where targets will be exported
- [BYTES]
size in B|KiB|MiB|GiB|TiB|PiB ... (default: bytes)
list <VOLNAME>
list available block devices.
info <VOLNAME/BLOCKNAME>
details about block device.
delete <VOLNAME/BLOCKNAME> [unlink-storage <yes|no>] [force]
delete block device.
- [unlink-storage <yes|no>]
unlink the backend file from gluster volume (default: yes)
modify <VOLNAME/BLOCKNAME> [<auth enable|disable>] [size <size> [force]]
modify block device.
- [<auth enable|disable>]
modify authentication on the device
- [size <size> [force]]
modify size of the device
replace <VOLNAME/BLOCKNAME> <old-node> <new-node> [force]
replace block device.
reload <volname/blockname> [force]
reload a block device.
genconfig <VOLNAME1[,VOLNAME2,VOLNAME3,...]> enable-tpg <host>
generate the block volumes target configuration.
- enable-tpg <host>
specify the active path node
help
show help message and exit.
version
show version info and exit.
Common CLI Options
[timeout <seconds>]
it is the time in seconds that cli can wait for daemon to respond (default: 300)
[--json*]
used to request the output result in json format (default: plain text) and supported JSON formats: --json|--json-plain|--json-spaced|--json-pretty
Examples
To create a block device of size 1GiB # gluster-block create blockVol/sampleBlock ${HOST} 1GiB To create a block device of size 1GiB with timeout 300 seconds # gluster-block timeout 300 create blockVol/sampleBlock ${HOST} 1GiB To create a block device of size 1GiB with auth enable # gluster-block create blockVol/sampleBlock auth enable ${HOST} 1GiB To create a block device of size 1GiB, by preallocating storage with zero fill # gluster-block create blockVol/sampleBlock prealloc full ${HOST} 1GiB To create a thinly-provisioned block device of size 1GiB # gluster-block create blockVol/sampleBlock prealloc no ${HOST} 1GiB To create a block device with existing file in blockVol # gluster-block create blockVol/sampleBlock storage 3c242959-9238-4ce0-a1ed-19086aa23c7b ${HOST} To create a block device with ring buffer size 16MiB # gluster-block create blockVol/sampleBlock ring-buffer 16 ${HOST} 1GiB To create a block device with block size 1024 # gluster-block create blockVol/sampleBlock block-size 1024 ${HOST} 1GiB To create a block device of size 1GiB with multi-path(replica) 3 # gluster-block create blockVol/sampleBlock ha 3 ${HOST1},${HOST2},${HOST3} 1GiB To create a block device of size 1GiB and expect response in json format # gluster-block create blockVol/sampleBlock ${HOST} 1GiB --json To disable auth on a block device # gluster-block modify blockVol/sampleBlock auth disable To enable auth on a block device # gluster-block modify blockVol/sampleBlock auth enable To resize an existing block device sampleBlock of size 1GiB to new size 2GiB # gluster-block modify blockVol/sampleBlock size 2GiB To list available block devices # gluster-block list blockVol To get details of a block device # gluster-block info blockVol/sampleBlock To delete a block device # gluster-block delete blockVol/sampleBlock To delete a block device, but let backend file persist in blockVol(for later use) # gluster-block delete blockVol/sampleBlock unlink-storage no To replace a block device from ${NODE1} to ${NODE2} # gluster-block replace blockVol/sampleBlock ${NODE1} ${NODE2} To reload a block device in all the HA nodes # gluster-block reload blockVol/sampleBlock To simply generate the block volumes target configuration. # gluster-block genconfig blockVol1[,blockVol2,blockVol3,...] enable-tpg ${HOST} | tee new_saveconfig.json To generate the block volumes target configuration and load it # mv /etc/target/saveconfig.json /etc/target/saveconfig.json.bak # gluster-block genconfig blockVol1[,blockVol2,blockVol3,...] enable-tpg ${HOST} | tee /etc/target/saveconfig.json # systemctl restart gluster-blockd tcmu-runner
Files
/var/log/gluster-block/*
/var/run/gluster-block.socket
/var/run/gluster-block.lock
/etc/sysconfig/gluster-blockd
/etc/logrotate.d/gluster-block
Reporting Bugs
Report bugs via gluster-devel <gluster-devel@gluster.org
or <https://github.com/gluster/gluster-block/issues>
Author
Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
Thanks
Vijay Bellur <vbellur@redhat.com>
Pranith Kumar Karampuri <pkarampu@redhat.com>
See Also
gluster-blockd(8), targetcli(8), tcmu-runner(8), glusterfs(8), glusterd(8), gluster(8)
Copyright
Copyright (c) 2016 Red Hat, Inc. <http://www.redhat.com>