1gluster-block(8)                 Red Hat, Inc.                gluster-block(8)
2
3
4

NAME

6       gluster-block  -  Gluster  Block  Storage Console Manager (command line
7       utility)
8

SYNOPSIS

10       gluster-block   [timeout    <seconds>]    <create|list|info|delete|mod‐
11       ify|replace|genconfig> <volname[/blockname]> [<args>] [--json*]
12

DESCRIPTION

14       The Gluster Block Storage Console Manager(gluster-block) is a CLI util‐
15       ity, which aims at making gluster backed  block  storage  creation  and
16       maintenance as simple as possible.
17
18       Note  that  the  gluster-blockd daemon is responsible for block manage‐
19       ment, hence the daemon must be running on all servers.
20

COMMANDS

22   create <VOLNAME/NEW-BLOCKNAME> [ha <COUNT>] [auth <enable|disable>] [preal‐
23       loc  <full|no>]  [storage  <filename>] [ring-buffer <size-in-MB-units>]
24       <HOST1[,HOST2,..]> [BYTES]
25       create block device.
26
27       [ha <COUNT>]
28              multipath requirement for high availability (default: 1)
29
30       [auth <enable|disable>]
31              authentication setting (default: disable)
32
33       [prealloc <full|no>]
34              "full" mode preallocates  space  by  writing  zeros  to  storage
35              (default: full)
36
37       [storage <filename>]
38              existing file(only name) in the gluster volume, that needs to be
39              linked while creating block (default: creates a new file)
40
41       [ring-buffer <size-in-MB-units>]
42              kernel ring buffer size for  exchanging  iSCSI  commands,  range
43              [1MB - 64MB] (default: as per kernel)
44
45       <HOST1,[HOST2....]>
46              servers in the pool where targets will be exported
47
48       [BYTES]
49              size in B|KiB|MiB|GiB|TiB|PiB ... (default: bytes)
50
51   list <VOLNAME>
52       list available block devices.
53
54   info <VOLNAME/BLOCKNAME>
55       details about block device.
56
57   delete <VOLNAME/BLOCKNAME> [unlink-storage <yes|no>] [force]
58       delete block device.
59
60       [unlink-storage <yes|no>]
61              unlink the backend file from gluster volume (default: yes)
62
63   modify <VOLNAME/BLOCKNAME> [<auth enable|disable>] [size <size>] [force]
64       modify block device.
65
66       [<auth enable|disable>]
67              modify authentication on the device
68
69       [size <size>]
70              modify size of the device
71
72   replace <VOLNAME/BLOCKNAME> <old-node> <new-node> [force]
73       replace block device.
74
75   genconfig <VOLNAME1[,VOLNAME2,VOLNAME3,...]> enable-tpg <host>
76       generate the block volumes target configuration.
77
78       enable-tpg <host>
79              specify the active path node
80
81   help
82       show help message and exit.
83
84   version
85       show version info and exit.
86

COMMON CLI OPTIONS

88   [timeout <seconds>]
89       it  is  the  time  in  seconds  that cli can wait for daemon to respond
90       (default: 300)
91
92   [--json*]
93       used to request the output result in json format (default: plain  text)
94       and  supported  JSON formats: --json|--json-plain|--json-spaced|--json-
95       pretty
96

EXAMPLES

98       To create a block device of size 1GiB
99       # gluster-block create blockVol/sampleBlock ${HOST} 1GiB
100
101       To create a block device of size 1GiB with timeout 300 seconds
102       # gluster-block timeout 300 create blockVol/sampleBlock ${HOST} 1GiB
103
104       To create a block device of size 1GiB with auth enable
105       # gluster-block create blockVol/sampleBlock auth enable ${HOST} 1GiB
106
107       To create a block device of size 1GiB, by preallocating storage with zero fill
108       # gluster-block create blockVol/sampleBlock prealloc full ${HOST} 1GiB
109
110       To create a thinly-provisioned block device of size 1GiB
111       # gluster-block create blockVol/sampleBlock prealloc no ${HOST} 1GiB
112
113       To create a block device with existing file in blockVol
114       # gluster-block create blockVol/sampleBlock storage 3c242959-9238-4ce0-a1ed-19086aa23c7b ${HOST}
115
116       To create a block device with ring buffer size 16MB
117       # gluster-block create blockVol/sampleBlock ring-buffer 16 ${HOST} 1GiB
118
119       To create a block device of size 1GiB with multi-path(replica) 3
120       # gluster-block create blockVol/sampleBlock ha 3 ${HOST1},${HOST2},${HOST3} 1GiB
121
122       To create a block device of size 1GiB and expect response in json format
123       # gluster-block create blockVol/sampleBlock ${HOST} 1GiB --json
124
125       You can pass more no. of nodes than ha count, this will actually help create in recovering from
126       failures, incase creation of block fails on any of scheduled(always first in list) ha count nodes.
127       # gluster-block create blockVol/sampleBlock ha 3 ${HOST1},${HOST2},${HOST3},${HOST4},${HOST5} 1GiB
128
129       To disable auth on a block device
130       # gluster-block modify blockVol/sampleBlock auth disable
131
132       To enable auth on a block device
133       # gluster-block modify blockVol/sampleBlock auth enable
134
135       To resize an existing block device sampleBlock of size 1GiB to new size 2GiB
136       # gluster-block modify blockVol/sampleBlock size 2GiB
137
138       To list available block devices
139       # gluster-block list blockVol
140
141       To get details of a block device
142       # gluster-block info blockVol/sampleBlock
143
144       To delete a block device
145       # gluster-block delete blockVol/sampleBlock
146
147       To delete a block device, but let backend file persist in blockVol(for later use)
148       # gluster-block delete blockVol/sampleBlock unlink-storage no
149
150       To replace a block device from ${NODE1} to ${NODE2}
151       # gluster-block replace blockVol/sampleBlock ${NODE1} ${NODE2}
152
153       To simply generate the block volumes target configuration.
154       # gluster-block genconfig blockVol1[,blockVol2,blockVol3,...] enable-tpg ${HOST} | tee new_saveconfig.json
155
156       To generate the block volumes target configuration and load it
157       # mv /etc/target/saveconfig.json /etc/target/saveconfig.json.bak
158       # gluster-block genconfig blockVol1[,blockVol2,blockVol3,...] enable-tpg ${HOST} | tee /etc/target/saveconfig.json
159       # systemctl restart gluster-blockd tcmu-runner
160

FILES

162       /var/log/gluster-block/*
163       /var/run/gluster-block.socket
164       /var/run/gluster-block.lock
165       /etc/sysconfig/gluster-blockd
166       /etc/logrotate.d/gluster-block
167

REPORTING BUGS

169       Report bugs via gluster-devel <gluster-devel@gluster.org
170       or <https://github.com/gluster/gluster-block/issues>
171
172
173

AUTHOR

175       Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
176
177

THANKS

179       Vijay Bellur <vbellur@redhat.com>
180       Pranith Kumar Karampuri <pkarampu@redhat.com>
181
182
183
184

SEE ALSO

186       gluster-blockd(8), targetcli(8), tcmu-runner(8), glusterfs(8), glusterd(8), gluster(8)
187
189       Copyright (c) 2016 Red Hat, Inc. <http://www.redhat.com>
190
191 26 Feb 2017                 command line utility             gluster-block(8)
Impressum