please add glusterfs support

Bug #1224517 reported by André Bauer
46
This bug affects 9 people
Affects Status Importance Assigned to Milestone
qemu (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

when trying to create an img on glusterfs in ubuntu 13.04 with qemu 1.4 via:

qemu-img create gluster://server/gv0/test.img 5G

i get the follwoing error:

qemu-img: Unknown protocol 'gluster://server/gv0/test.img 5G'

qemu should support this since version 1.3 but it seems its compiled without --with-glusterfs.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Unfortunately glusterfs support would require linking against libraries which are in universe, which we can't do. The first step to enable glusterfs would be to file an MIR for glusterfs. See https://wiki.ubuntu.com/MainInclusionProcess for more information.

Changed in qemu (Ubuntu):
status: New → Won't Fix
Revision history for this message
Jiri Hoogeveen (wica128) wrote :

Hi,

I'm on 13.10 and did the following to get glusterfs support in qemu.

== Install GlusterFS PPA
Add PPA repo from semiosis
sudo add-apt-repository ppa:semiosis/ubuntu-glusterfs-3.4
sudo apt-get update
sudo apt-get -y install glusterfs-client glusterfs-server

== Get GlusterFS glfs.h

wget http://download.gluster.org/pub/gluster/glusterfs/3.4/LATEST/glusterfs-3.4.1.tar.gz
tar xzf glusterfs*
mkdir -p /usr/include/glusterfs/api/
cp glusterfs*/api/src/glfs.h /usr/include/glusterfs/api/
rm -rf glusterfs*

== Rebuild qemu deb
mkdir rebuild-qemu
cd rebuild-qemu
apt-get source qemu
sudo apt-get -y build-dep qemu
cd qemu*
sed -i -e '/^XSBC-Original-Maintainer/d' -e 's/Maintainer/XSBC-Original-Maintainer/' -e '4iMaintainer: minime < <email address hidden> >' debian/control
dch -l custom
dch -r saucy
sed '3iDEB_CONFIGURE_EXTRA_FLAGS="--enable-glusterfs"' debian/rules
debuild -us -uc -j$(($(grep processor /proc/cpuinfo |wc -l) + 2))

Put this devs in you own repo and install them :)

Revision history for this message
Alan Vallance (alan-g) wrote :

Jiri,
Great info thanks for posting!

One thing to add...

The line [sed '3iDEB_CONFIGURE_EXTRA_FLAGS="--enable-glusterfs"' debian/rules] didn't work for me.. I just had to manually add the [DEB_CONFIGURE_EXTRA_FLAGS="--enable-glusterfs"] to the debian/rules file. Build worked fine and if anyone is confused by the "Put this devs in you own repo and install them :)".. Just do this..

cd ..
dpkg -i qemu*.deb

You can verify that qemu is gluster aware by doing something like this:
qemu-img create gluster://[node]/[volume]/test.img 5G

Revision history for this message
Databay (rs-databay) wrote :

Hello Jiri,

also thanks for this solution. I agree to Alan that I needed to manually add the DEB_CONFIGURE_EXTRA_FLAGS="--enable-glusterfs".

In addition I can confirm that above workaround to get native glusterfs support to qemu also works on Ubuntu LTS 12.04.3 (Precise) by using the latest packages for Openstack Havana from The Ubuntu Cloud Archive: See https://wiki.ubuntu.com/ServerTeam/CloudArchive which will be supported until 2017. They are also compiled without qemu native glusterfs support !

First I upgraded all packages of my LTS-Server. It's also already running raring kernels-series 3.8.x (sudo apt-get install linux-generic-lts-raring)
sudo apt-get upgrade

I added this repo:
sudo add-apt-repository cloud-archive:havana

To void dependency problems during package-configuration this leads to completely upgraded and configured packages:
sudo apt-get install qemu-kvm librados2 librbd1 libvirt-bin libvirt0 python-libvirt qemu-common qemu-kvm qemu-utils qemu-system-x86 qemu-system-common
sudo apt-get upgrade

Afterwards I followed your steps to get qemu build with native glusterfs support.

Bye

Revision history for this message
Jiri Hoogeveen (wica128) wrote :

Hi,

Strange, I see it to that the sed '3i...' only works on Ubuntu 13.10 sed version: 4.2.2. Thanks for the info.

@Ralf, thnx for testing this on Ubuntu 12.04.3 and OpenStack Havana.

Revision history for this message
Bernhard Glomm (bernhard-glomm) wrote :

Hi,
I'm trying to recompile qemu on ubuntu 13.10
as described above but keep hitting errors like:
...
In file included from /usr/include/libfdt.h:55:0,
                 from /usr/src/rebuild-qemu/qemu-1.5.0+dfsg/device_tree.c:28:
/usr/include/fdt.h:58:2: error: unknown type name âfdt32_tâ
  fdt32_t magic; /* magic word FDT_MAGIC */
  ^
...

that is for:
  /usr/include/fdt.h and
  /usr/include/libfdt.h

...

Any ideas how to proceed

as for your sed '3i...' code line, it seems the -i switch is missing?

Revision history for this message
Jiri Hoogeveen (wica128) wrote :

Hi Bernhard,

I have rebuild it it with 1.5.0+dfsg-3ubuntu5.2, but did not get the messages :/

And yep, it seams sed like the -i.

update: nieuwe glusterfs version 3.4.2 and the new packages from ubuntu 13.10

== Install GlusterFS PPA
Add PPA repo from semiosis
sudo add-apt-repository ppa:semiosis/ubuntu-glusterfs-3.4
sudo apt-get update
sudo apt-get -y install glusterfs-client glusterfs-server

== Get GlusterFS glfs.h

wget http://download.gluster.org/pub/gluster/glusterfs/3.4/LATEST/glusterfs-3.4.2.tar.gz
tar xzf glusterfs*
mkdir -p /usr/include/glusterfs/api/
cp glusterfs*/api/src/glfs.h /usr/include/glusterfs/api/
rm -rf glusterfs*

== Rebuild qemu deb
mkdir rebuild-qemu
cd rebuild-qemu
apt-get source qemu
sudo apt-get -y build-dep qemu
cd qemu*
sed -i -e '/^XSBC-Original-Maintainer/d' -e 's/Maintainer/XSBC-Original-Maintainer/' -e '4iMaintainer: minime < <email address hidden> >' debian/control
dch -l custom
dch -r saucy
sed -i '3iDEB_CONFIGURE_EXTRA_FLAGS="--enable-glusterfs"' debian/rules
debuild -us -uc -j$(($(grep processor /proc/cpuinfo |wc -l) + 2))

Revision history for this message
André Bauer (monotek) wrote :

Maybe also worth to have a look at: https://bugs.launchpad.net/cloud-archive/+bug/1246924

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.