Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
pkalever opened this issue Apr 18, 2019 · 4 comments

Comments

Projects
None yet
2 participants
@pkalever
Copy link
Contributor

commented Apr 18, 2019

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!!

@salamani

This comment has been minimized.

Copy link

commented Apr 22, 2019

@pkalever Above steps are good for ubuntu. I am able to create the gluster-volume now. I had to copy service files manually and run them. Does make install copied the service files to right locations for you on ubuntu?

@pkalever

This comment has been minimized.

Copy link
Contributor Author

commented Apr 22, 2019

@pkalever Above steps are good for ubuntu. I am able to create the gluster-volume now. I had to copy service files manually and run them. Does make install copied the service files to right locations for you on ubuntu?

@salamani have you noticed '--with-systemddir' flag to configure in my above steps ?
# ./configure --with-systemddir=/usr/lib/systemd/system --enable-tirpc=no

That should do it for you. Try '# make distclean' and then start fresh.

@salamani

This comment has been minimized.

Copy link

commented May 17, 2019

Above steps are good! My sincere apologies for it taking so long to confirm it.

@pkalever

This comment has been minimized.

Copy link
Contributor Author

commented May 17, 2019

@salamani no problem and I'm glad that it worked for you. Thanks for confirming.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.