Skip to content
This repository was archived by the owner on Apr 24, 2026. It is now read-only.
This repository was archived by the owner on Apr 24, 2026. It is now read-only.

How to bring-up gluster-block on Ubuntu ? #215

Description

@pkalever

Steps to bring gluster-block up and running on ubuntu (tested on 18.04):

[ Lets create a doc based on this later ]

Env details:

root@block:~# uname -a
Linux block 4.15.0-47-generic #50-Ubuntu SMP Wed Mar 13 10:44:52 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

root@block:~# cat /etc/os-release
NAME="Ubuntu"
VERSION="18.04.2 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.2 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
root@block:~# 

Installing gluster-block build time dependencies:

# wget -O - http://download.gluster.org/pub/gluster/glusterfs/5/rsa.pub | apt-key add -
# apt-get install glusterfs-common glusterfs-server
# apt-get install git autoconf automake gcc libtool make file pkg-config libjson-c-dev uuid-dev libtirpc-dev targetcli-fb 

Compiling from source and installing:

# git clone https://github.com/gluster/gluster-block
# cd gluster-block
# ./autogen.sh
# ./configure --with-systemddir=/usr/lib/systemd/system --enable-tirpc=no
# make -j install

Tcmu-runner and targetcli are runtime dependencies, lets install them:

# git clone https://github.com/open-iscsi/tcmu-runner
# cd tcmu-runner
# apt-get install cmake make gcc libnl-3-dev libnl-genl-3-dev libglib2.0-dev zlib1g-dev kmod libkmod-dev
# cmake -DSUPPORT_SYSTEMD=ON -DCMAKE_INSTALL_PREFIX=/usr -Dwith-rbd=false -Dwith-qcow=false -Dwith-zbc=false -Dwi
th-fbo=false
# make install

targetcli, rtslib, configshell packages available on on ubuntu are way old, hence had to install them from source:

# apt-get remove targetcli-fb python-rtslib-fb python3-configshell-fb python3-rtslib-fb
# apt-get install python-setuptools python-gobject
# mkdir /etc/target

# git clone https://github.com/open-iscsi/targetcli-fb
# cd targetcli-fb
# ./setup.py install
# cd - 

# git clone https://github.com/open-iscsi/rtslib-fb
# cd rtslib-fb/
# ./setup.py install
# cp systemd/target.service /usr/lib/systemd/system/target.service
# cd -

# git clone https://github.com/open-iscsi/configshell-fb
# cd configshell-fb/
# ./setup.py install
# cd -

Starting glusterd and creating a block hosting volume:

# systemctl daemon-reload
# systemctl start glusterd

# Lets create a gluster block hosting volume:
# gluster vol create sample 192.168.124.208:/brick force
# gluster vol start sample

Starting gluster-blockd and creating a block volume on top of previously created block hosting volume:

# systemctl start gluster-blockd

# gluster-block create sample/block 192.168.124.208 1GiB --json-pretty
{
  "IQN":"iqn.2016-12.org.gluster-block:01dc0c3c-4597-42b1-9037-444563d477fa",
  "PORTAL(S)":[
    "192.168.124.208:3260"
  ],
  "RESULT":"SUCCESS"
}

# gluster-block delete sample/block --json-pretty
{
  "SUCCESSFUL ON":[
    "192.168.124.208"
  ],
  "RESULT":"SUCCESS"
}

Explore more tests at https://github.com/gluster/gluster-block/blob/master/tests/basic.t and README/Man-Pages.

happy blocking!!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    referenceTo Help frequently asked questions.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions