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       [block-size   <size-in-Byte-units>]   [io-timeout   <N   in    Second>]
25       <HOST1[,HOST2,..]> [BYTES]
26       create block device.
27
28       [ha <COUNT>]
29              multipath requirement for high availability (default: 1)
30
31       [auth <enable|disable>]
32              authentication setting (default: disable)
33
34       [prealloc <full|no>]
35              "full"  mode  preallocates  space  by  writing  zeros to storage
36              (default: full)
37
38       [storage <filename>]
39              existing file(only name) in the gluster volume, that needs to be
40              linked while creating block (default: creates a new file)
41
42       [ring-buffer <size-in-MB-units>]
43              kernel  ring  buffer  size  for exchanging iSCSI commands, range
44              [1MB - 1024MB] (default: as per kernel)
45
46       [block-size <size-in-Byte-units>]
47              kernel hw block size, aligns to 512 (default: as per kernel)
48
49       [io-timeout <N in Second>]
50              time duration for which the tcmu-runner waits to check if the IO
51              from  gluster block hosting volume server is responsive. Ideally
52              this value should be kept larger  than  both  IO  timeout  value
53              (default  is  30s)  in  the  iscsi client/initiator side and the
54              gluster ping timeout (default is 42s), (default: 43s)
55
56
57       <HOST1,[HOST2....]>
58              servers in the pool where targets will be exported
59
60       [BYTES]
61              size in B|KiB|MiB|GiB|TiB|PiB ... (default: bytes)
62
63   list <VOLNAME>
64       list available block devices.
65
66   info <VOLNAME/BLOCKNAME>
67       details about block device.
68
69   delete <VOLNAME/BLOCKNAME> [unlink-storage <yes|no>] [force]
70       delete block device.
71
72       [unlink-storage <yes|no>]
73              unlink the backend file from gluster volume (default: yes)
74
75   modify <VOLNAME/BLOCKNAME> [<auth enable|disable>] [size <size> [force]]
76       modify block device.
77
78       [<auth enable|disable>]
79              modify authentication on the device
80
81       [size <size> [force]]
82              modify size of the device
83
84   replace <VOLNAME/BLOCKNAME> <old-node> <new-node> [force]
85       replace block device.
86
87   reload <volname/blockname> [force]
88       reload a block device.
89
90   genconfig <VOLNAME1[,VOLNAME2,VOLNAME3,...]> enable-tpg <host>
91       generate the block volumes target configuration.
92
93       enable-tpg <host>
94              specify the active path node
95
96   help
97       show help message and exit.
98
99   version
100       show version info and exit.
101

COMMON CLI OPTIONS

103   [timeout <seconds>]
104       it is the time in seconds that cli  can  wait  for  daemon  to  respond
105       (default: 300)
106
107   [--json*]
108       used  to request the output result in json format (default: plain text)
109       and supported JSON  formats:  --json|--json-plain|--json-spaced|--json-
110       pretty
111

EXAMPLES

113       To create a block device of size 1GiB
114       # gluster-block create blockVol/sampleBlock ${HOST} 1GiB
115
116       To create a block device of size 1GiB with timeout 300 seconds
117       # gluster-block timeout 300 create blockVol/sampleBlock ${HOST} 1GiB
118
119       To create a block device of size 1GiB with auth enable
120       # gluster-block create blockVol/sampleBlock auth enable ${HOST} 1GiB
121
122       To create a block device of size 1GiB, by preallocating storage with zero fill
123       # gluster-block create blockVol/sampleBlock prealloc full ${HOST} 1GiB
124
125       To create a thinly-provisioned block device of size 1GiB
126       # gluster-block create blockVol/sampleBlock prealloc no ${HOST} 1GiB
127
128       To create a block device with existing file in blockVol
129       # gluster-block create blockVol/sampleBlock storage 3c242959-9238-4ce0-a1ed-19086aa23c7b ${HOST}
130
131       To create a block device with ring buffer size 16MiB
132       # gluster-block create blockVol/sampleBlock ring-buffer 16 ${HOST} 1GiB
133
134       To create a block device with block size 1024
135       # gluster-block create blockVol/sampleBlock block-size 1024 ${HOST} 1GiB
136
137       To create a block device of size 1GiB with multi-path(replica) 3
138       # gluster-block create blockVol/sampleBlock ha 3 ${HOST1},${HOST2},${HOST3} 1GiB
139
140       To create a block device of size 1GiB and expect response in json format
141       # gluster-block create blockVol/sampleBlock ${HOST} 1GiB --json
142
143       To disable auth on a block device
144       # gluster-block modify blockVol/sampleBlock auth disable
145
146       To enable auth on a block device
147       # gluster-block modify blockVol/sampleBlock auth enable
148
149       To resize an existing block device sampleBlock of size 1GiB to new size 2GiB
150       # gluster-block modify blockVol/sampleBlock size 2GiB
151
152       To list available block devices
153       # gluster-block list blockVol
154
155       To get details of a block device
156       # gluster-block info blockVol/sampleBlock
157
158       To delete a block device
159       # gluster-block delete blockVol/sampleBlock
160
161       To delete a block device, but let backend file persist in blockVol(for later use)
162       # gluster-block delete blockVol/sampleBlock unlink-storage no
163
164       To replace a block device from ${NODE1} to ${NODE2}
165       # gluster-block replace blockVol/sampleBlock ${NODE1} ${NODE2}
166
167       To reload a block device in all the HA nodes
168       # gluster-block reload blockVol/sampleBlock
169
170       To simply generate the block volumes target configuration.
171       # gluster-block genconfig blockVol1[,blockVol2,blockVol3,...] enable-tpg ${HOST} | tee new_saveconfig.json
172
173       To generate the block volumes target configuration and load it
174       # mv /etc/target/saveconfig.json /etc/target/saveconfig.json.bak
175       # gluster-block genconfig blockVol1[,blockVol2,blockVol3,...] enable-tpg ${HOST} | tee /etc/target/saveconfig.json
176       # systemctl restart gluster-blockd tcmu-runner
177

FILES

179       /var/log/gluster-block/*
180       /var/run/gluster-block.socket
181       /var/run/gluster-block.lock
182       /etc/sysconfig/gluster-blockd
183       /etc/logrotate.d/gluster-block
184

REPORTING BUGS

186       Report bugs via gluster-devel <gluster-devel@gluster.org
187       or <https://github.com/gluster/gluster-block/issues>
188
189
190

AUTHOR

192       Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
193
194

THANKS

196       Vijay Bellur <vbellur@redhat.com>
197       Pranith Kumar Karampuri <pkarampu@redhat.com>
198
199
200
201

SEE ALSO

203       gluster-blockd(8), targetcli(8), tcmu-runner(8), glusterfs(8), glusterd(8), gluster(8)
204
206       Copyright (c) 2016 Red Hat, Inc. <http://www.redhat.com>
207
208 26 Feb 2017                 command line utility             gluster-block(8)
Impressum