summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPrasanna Kumar Kalever <prasanna.kalever@redhat.com>2017-05-05 17:47:48 +0530
committerPrasanna Kumar Kalever <pkalever@redhat.com>2017-05-05 12:32:11 +0000
commit551168c38763a0aa49dbd756e8af961ca8bfb4c2 (patch)
tree57df6d583bf085d5afe4f966f6bd95f66fe1d1ad
parent1dbbd7d457251afd1f005bf262b5c366642535e2 (diff)
docs: update readme and man page
Change-Id: If5f63d7cb711d18739782ebd83495f223f9db0da Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
-rw-r--r--README.md41
-rw-r--r--docs/gluster-block.814
2 files changed, 45 insertions, 10 deletions
diff --git a/README.md b/README.md
index 65f72af..d68d50b 100644
--- a/README.md
+++ b/README.md
@@ -55,7 +55,7 @@ managing the command ring buffers
<pre>
# git clone https://github.com/gluster/gluster-block.git
# cd gluster-block/
-# dnf install libuuid-devel glusterfs-api-devel tcmu-runner targetcli (on fedora)
+# dnf install autoconf automake libtool libuuid-devel json-c-devel glusterfs-api-devel tcmu-runner targetcli (on fedora)
# make -j install
</pre>
@@ -64,14 +64,15 @@ managing the command ring buffers
**Prerequisites:** *this guide assume we already have*
- [x] *A gluster volume with name 'block-test'*
- [x] *In all nodes gluster-blockd.service is running*
+- [x] *Open 24007(for glusterd) 24006(gluster-blockd) 3260(iscsi targets) 111(rpcbind) ports and glusterfs service in your firewall*
```script
-# gluster-block (3ba7ec5)
+# gluster-block (0.2)
usage:
- gluster-block <command> <volname[/blockname]> [<args>]
+ gluster-block <command> <volname[/blockname]> [<args>] [--json*]
commands:
- create <volname/blockname> [ha <count>] <host1[,host2,...]> <size>
+ create <volname/blockname> [ha <count>] [auth enable|disable] <host1[,host2,...]> <size>
create block device.
list <volname>
@@ -83,11 +84,17 @@ commands:
delete <volname/blockname>
delete block device.
+ modify <volname/blockname> <auth enable|disable>
+ modify block device.
+
help
show this message and exit.
version
show version info and exit.
+
+supported JSON formats:
+ --json|--json-plain|--json-spaced|--json-pretty
```
#### Example:
@@ -105,10 +112,18 @@ IQN: iqn.2016-12.org.gluster-block:aafea465-9167-4880-b37c-2c36db8562ea
PORTAL(S): 192.168.1.11:3260 192.168.1.12:3260 192.168.1.13:3260
RESULT: SUCCESS
+Enable Authentication (you can do this as part of create as well)
+<b># gluster-block modify block-test/sample-block auth enable</b>
+IQN: iqn.2016-12.org.gluster-block:aafea465-9167-4880-b37c-2c36db8562ea
+USERNAME: aafea465-9167-4880-b37c-2c36db8562ea
+PASSWORD: 4a5c9b84-3a6d-44b4-9668-c9a6d699a5e9
+SUCCESSFUL ON: 192.168.1.11 192.168.1.12 192.168.1.13
+RESULT: SUCCESS
+
<b># gluster-block list block-test</b>
sample-block
-<b># gluster-block info block-test/sample-block</b>
+<b># gluster-block info block-test/sample-block</b>
NAME: sample-block
VOLUME: block-test
GBID: 6b60c53c-8ce0-4d8d-a42c-5b546bca3d09
@@ -123,10 +138,18 @@ BLOCK CONFIG NODE(S): 192.168.1.11 192.168.1.12 192.168.1.13
# dnf install iscsi-initiator-utils
# lsblk (note the available devices)
-Make sure you have multipathd running and configured
-# iscsiadm -m discovery -t st -p 192.168.1.11 -l
-# iscsiadm -m discovery -t st -p 192.168.1.12 -l
-# iscsiadm -m discovery -t st -p 192.168.1.13 -l
+Make sure you have multipathd running and configured in Active/Passive mode
+
+Discovery ...
+# iscsiadm -m discovery -t st -p 192.168.1.11
+
+Update Credentials (Skip this step incase if you have not enabled auth)
+# iscsiadm -m node -T "iqn.2016-12.org.gluster-block:aafea465-9167-4880-b37c-2c36db8562ea" -o update
+ -n node.session.auth.authmethod -v CHAP -n node.session.auth.username -v aafea465-9167-4880-b37c-2c36db8562ea -n node
+.session.auth.password -v 4a5c9b84-3a6d-44b4-9668-c9a6d699a5e9
+
+Login ...
+# iscsiadm -m node -T "iqn.2016-12.org.gluster-block:aafea465-9167-4880-b37c-2c36db8562ea" -l
# lsblk (note the new devices, let's say sdb, sdc and sdd multipath to mpatha)
# mkfs.xfs /dev/mapper/mpatha
diff --git a/docs/gluster-block.8 b/docs/gluster-block.8
index 1ae08af..44da3d3 100644
--- a/docs/gluster-block.8
+++ b/docs/gluster-block.8
@@ -25,12 +25,15 @@ Note that the gluster-blockd daemon is responsible for block management, hence t
.SH COMMANDS
.SS
-\fBcreate\fR <VOLNAME/NEW-BLOCKNAME> [ha <COUNT>] <HOST1[,HOST2,..]> <BYTES>
+\fBcreate\fR <VOLNAME/NEW-BLOCKNAME> [ha <COUNT>] [auth enable|disable] <HOST1[,HOST2,..]> <BYTES>
create block device.
.TP
[ha <COUNT>]
multipath requirement for high availability (default: 1)
.TP
+[auth enable|disable]
+authentication setting (default: disable)
+.TP
<HOST1,[HOST2....]>
servers in the pool where targets will be exported.
.TP
@@ -76,6 +79,9 @@ show version info and exit.
To create a block device of size 1GiB
.B # gluster-block create blockVol/sampleBlock ${HOST} 1GiB
+To create a block device of size 1GiB with auth enable
+.B # gluster-block create blockVol/sampleBlock auth enable ${HOST} 1GiB
+
To create a block device of size 1GiB with multi-path(replica) 3
.B # gluster-block create blockVol/sampleBlock ha 3 ${HOST1},${HOST2},${HOST3} 1GiB
@@ -86,6 +92,12 @@ You can pass more no. of nodes than ha count, this will actually help create in
failures, incase creation of block fails on any of scheduled(always first in list) ha count nodes.
.B # gluster-block create blockVol/sampleBlock ha 3 ${HOST1},${HOST2},${HOST3},${HOST4},${HOST5} 1GiB
+To disable auth on a block device
+.B # gluster-block modify blockVol/sampleBlock auth disable
+
+To enable auth on a block device
+.B # gluster-block modify blockVol/sampleBlock auth enable
+
To list available block devices
.B # gluster-block list blockVol